Bug 186254 - [preferences] Dialog prompts for full rebuild though compiler settings have not changed
Summary: [preferences] Dialog prompts for full rebuild though compiler settings have n...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 minor (vote)
Target Milestone: 3.3 RC1   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-09 16:54 EDT by Karen Stutesman CLA
Modified: 2007-05-15 05:15 EDT (History)
3 users (show)

See Also:
philippe_mulet: review+


Attachments
Proposed fix (1.73 KB, patch)
2007-05-10 10:22 EDT, Olivier Thomann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Karen Stutesman CLA 2007-05-09 16:54:45 EDT
1. Go to Windows -> Preferences -> Java -> Compiler
2. Leave it at 5.0. Don't change anything.
3. Hit OK

Expected: The dialog is dismissed. Nothing else since you made no changes.
Actual: You are prompted that the compiler changed and a full rebuild is required (even in a new workspace where there is no projects).
Comment 1 Martin Aeschlimann CLA 2007-05-10 03:59:54 EDT
The reason is the option COMPILER_CODEGEN_INLINE_JSR_BYTECODE: when compliance >= 1.5 we force it to 'ENABLED' what can be a change from the settings set by the launching plug-in on startup.

Olivier, what do you think is the correct thing to do: Always set the option to 'ENABLED' when in 1.5 or 1. mode. Or as this option ignored anyways; don't care what setting is?

If you think it's better to write it to 'ENABLED'; then JavaCore.setComplianceOptions should implement this too.
If you think we should not care about the value in 1.5 or 1.6 mode, I can fix this on the preference page.


Comment 2 Olivier Thomann CLA 2007-05-10 10:16:47 EDT
This option should be set to ENABLED. IN 1.5 and 1.6, the jsr and ret bytecodes are not supposed to be generated anymore and this can only happen if this option is set.
Therefore it should be set in JavaCore.setComplianceOptions(..).
So moving to JDT/Core.

Philippe, ok to change this? This method is called to set the right options according to the compliance. I missed the inlineJsr option.
Comment 3 Olivier Thomann CLA 2007-05-10 10:17:13 EDT
Since this can trigger a full build, I would fix it for RC1.
Comment 4 Olivier Thomann CLA 2007-05-10 10:21:47 EDT
We do override it in the org.eclipse.jdt.internal.compiler.impl.CompilerOptions.set(Map) method, but this is still consider as an option change.
I'll provide a patch.
Comment 5 Olivier Thomann CLA 2007-05-10 10:22:36 EDT
Created attachment 66677 [details]
Proposed fix
Comment 6 Olivier Thomann CLA 2007-05-10 12:04:24 EDT
(In reply to comment #1)
> If you think we should not care about the value in 1.5 or 1.6 mode, I can fix
> this on the preference page.
We are overriding it anyway if target >= 1.5. So whatever value you have for this option, we set it to ENABLED.

Philippe, should we handle this in the JavaCore method or let the preference page take care of it?
Comment 7 Philipe Mulet CLA 2007-05-10 12:32:24 EDT
+1 for RC1. This is consistent with our other preferences which are compliance specific.
Comment 8 Olivier Thomann CLA 2007-05-10 13:45:02 EDT
Release for 3.3RC1.
Martin, please confirm this is fixing the issue on the UI side as well.
Comment 9 Martin Aeschlimann CLA 2007-05-11 03:53:17 EDT
scenario as described in comment 0 seems to work now
Comment 10 Frederic Fusier CLA 2007-05-15 05:15:14 EDT
Verified for 3.3 RC1 using I20070515-0010