Bug 570709 - Unnecessary full build when using --release option
Summary: Unnecessary full build when using --release option
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.18   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: needinfo
Depends on:
Blocks:
 
Reported: 2021-01-28 03:48 EST by Philippe Cadé CLA
Modified: 2021-01-29 07:56 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Cadé CLA 2021-01-28 03:48:44 EST
We are using Java 11 and we have noticed that Eclipse would perform a clean build after startup and changing only one file in the workspace.

We used the following debug options to track the problem:
org.eclipse.jdt.core/debug=true
org.eclipse.jdt.core/debug/builder=true
org.eclipse.jdt.core/debug/builder/stats=true
org.eclipse.jdt.core/debug/compiler=true

We can see in the log the following:

...
Successfully read state for our_project
JavaBuilder: New location: Classpath jrt file D:\install\software\Java\jre11.0.7+10-jfx11-windows\lib\jrt-fs.jar with --release option 11
!= old location: Classpath jrt file D:\install\software\Java\jre11.0.7+10-jfx11-windows\lib\jrt-fs.jar
JavaBuilder: New locations:
  ... our classpath ...
JavaBuilder: Old locations:
  ... our classpath, identical to the above ...

This then showed us that the --release option has something to do with it. When we removed this option on the project level, only an incremental build was performed.

Note: we are using a custom JRE for our project.
Comment 1 Andrey Loskutov CLA 2021-01-28 06:03:06 EST
Would be great if you could provide a sample project and exact steps to reproduce. Is the problem only related to the custom JRE, or can be reproduced with anyone? Which Eclipse version is used - 4.18?
Comment 2 Philippe Cadé CLA 2021-01-29 07:35:17 EST
So I have looked more into this: this can be reproduced with Eclipse 4.13 but not anymore with 4.18. Sorry for the wrong version number initially reported.

It has nothing to do with our custom JRE, it can be reproduced with a regular JDK also.

Since it is corrected with the latest Eclipse I guess this bug can be closed. For earlier versions of Eclipse, the workaround is to remove the --release option if not used.

This will work for us since we don't cross compile.