Bug 575903 - call of deprecated function clean(IProgressMonitor monitor) from within CommonBuilder
Summary: call of deprecated function clean(IProgressMonitor monitor) from within Comm...
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-build (show other bugs)
Version: 10.3.2   Edit
Hardware: PC Linux
: P3 critical (vote)
Target Milestone: 10.3.3   Edit
Assignee: Jonah Graham CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-09 12:36 EDT by Malte Langermann CLA
Modified: 2021-09-10 15:04 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Malte Langermann CLA 2021-09-09 12:36:37 EDT
I am CMake4Eclipse in Eclipse 2021-06 or 2021-09rc1

When trying to buld a project this error message appears (incuding the typo):

Errors occurred during the build.
Errors running builder 'CDT Builder' on project 'dipra-switch-v2.21'.
Unexpcted/incorrect call to old clean method. Client code must call clean(Map,IProgressMonitor)

The old clean method is not called from CMake4Eclipse, but from the CommonBuilder itself.

Exception Strack Trace:
java.lang.IllegalStateException: Unexpcted/incorrect call to old clean method. Client code must call clean(Map,IProgressMonitor)
	at org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder.clean(CommonBuilder.java:1039)
	at org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder.performCleanning(CommonBuilder.java:972)
	at org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder.performPrebuildGeneration(CommonBuilder.java:868)
	at org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder.build(CommonBuilder.java:754)
	at org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder.build(CommonBuilder.java:517)
	at org.eclipse.cdt.managedbuilder.internal.core.CommonBuilder.build(CommonBuilder.java:463)
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:853)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:232)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:281)
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:334)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:337)
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:389)
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:410)
	at org.eclipse.core.internal.resources.Workspace.buildInternal(Workspace.java:516)
	at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:413)
	at org.eclipse.ui.actions.BuildAction$1.runInWorkspace(BuildAction.java:291)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:42)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)


Session-Data:
eclipse.buildId=4.21.0.I20210830-0600
java.version=11.0.11
java.vendor=Ubuntu
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=de_DE
Framework arguments:  -product org.eclipse.epp.package.cpp.product --help
Command-line arguments:  -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.cpp.product --help
Comment 1 Jonah Graham CLA 2021-09-09 14:32:11 EDT
Hello Malte,

Thank you very much for this bug report!

@Torbjörn - FYI It looks like I missed a call to clean when removing the old clean method. Bug 571134 introduced this problem. The code paths aren't hit in normal CDT - the call to clean is itself in CommonBuilder in a "catch Throwable" block.

Frustratingly for timing we can't respin 10.4.0 without causing a full respin of the release at this point. Instead I suggest we roll out a 10.4.1 at the same time as the release, and I can put out a 10.3.4 right away.
Comment 2 Jonah Graham CLA 2021-09-09 14:35:26 EDT
10.3.3 is the next version on this branch.
Comment 3 Eclipse Genie CLA 2021-09-09 14:45:36 EDT
New Gerrit change created: https://git.eclipse.org/r/c/cdt/org.eclipse.cdt/+/185265
Comment 5 Jonah Graham CLA 2021-09-09 20:30:51 EDT
@Malte - Can you test this release candidate and if it works I will promote it for everyone.

https://download.eclipse.org/tools/cdt/builds/10.3/cdt-10.3.3-rc1/

Update instructions:
1) Add above URL to the list in Preferences -> Install/Update -> Available Software Sites
2) From Help menu -> Check for Updates

Thank you,
Jonah
Comment 6 Malte Langermann CLA 2021-09-10 08:08:30 EDT
Hi Jonah,

it does work for me now.
Thank you very much for your quick repsonse and fix.

BR
Malte.
Comment 7 Jonah Graham CLA 2021-09-10 10:06:07 EDT
(In reply to Malte Langermann from comment #6)
> it does work for me now.
Great - thank you for testing.

CDT 10.3.3 has been released now.

The patch needs to be applied to newer branches and this bug will be closed once that happens in the next few hours.
Comment 8 Eclipse Genie CLA 2021-09-10 10:07:39 EDT
New Gerrit change created: https://git.eclipse.org/r/c/cdt/org.eclipse.cdt/+/185304
Comment 9 Eclipse Genie CLA 2021-09-10 10:08:50 EDT
New Gerrit change created: https://git.eclipse.org/r/c/cdt/org.eclipse.cdt/+/185305
Comment 12 Jonah Graham CLA 2021-09-10 14:12:17 EDT
@Martin - FYI as you may see direct reports due to this CDT regression that is now fixed.
Comment 13 Jonah Graham CLA 2021-09-10 14:12:57 EDT
Fixes have been applied. We'll have to release 10.4.1 the same day as 2021-09 so that users can update and get the fix.
Comment 14 Martin Weber CLA 2021-09-10 15:04:02 EDT
@Jonah It noticed i by myself earlier but had not time to fix it.
Originally reported it for cmake4eclipse first.
Thanks for fixing it.