| Summary: | Project specific compile option missing-packages not read | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] PDE | Reporter: | Gunnar Wagenknecht <gunnar> | ||||||||||||
| Component: | UI | Assignee: | Vikas Chandra <Vikas.Chandra> | ||||||||||||
| Status: | VERIFIED FIXED | QA Contact: | |||||||||||||
| Severity: | normal | ||||||||||||||
| Priority: | P3 | CC: | ben.abernathy, daniel_megert, psuzzi, richardfearn, Vikas.Chandra | ||||||||||||
| Version: | 3.5 | Flags: | Vikas.Chandra:
review+
daniel_megert: review- |
||||||||||||
| Target Milestone: | 4.7 M2 | ||||||||||||||
| Hardware: | PC | ||||||||||||||
| OS: | Windows Vista | ||||||||||||||
| See Also: |
https://git.eclipse.org/r/69069 https://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=58c840600e0b33276fc3e351b57cec0614588b17 https://git.eclipse.org/r/72405 https://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=1470b7c7056bd80c8c283fd937bc0ae07bc453cd |
||||||||||||||
| Whiteboard: | |||||||||||||||
| Bug Depends on: | |||||||||||||||
| Bug Blocks: | 492526 | ||||||||||||||
| Attachments: |
|
||||||||||||||
|
Description
Gunnar Wagenknecht
(In reply to comment #0) > I'll file a separate issue for (a). Filed as bug 259959. Looks like the PDE code is using the wrong flag. Changing the setting for "Missing exported packages" in the preferences page changes the value of compilers.p.missing-packages in .settings/org.eclipse.pde.prefs. This flag is referred to in the Java code as P_MISSING_EXPORT_PKGS: https://git.eclipse.org/c/pde/eclipse.pde.ui.git/tree/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/CompilerFlags.java#n66 However if a missing package is found, the problem is reported using the P_UNRESOLVED_IMPORTS flag: https://git.eclipse.org/c/pde/eclipse.pde.ui.git/tree/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/builders/BundleErrorReporter.java#n844 That flag is the first one in the "Unresolved" section: https://git.eclipse.org/c/pde/eclipse.pde.ui.git/tree/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/PDECompilersConfigurationBlock.java#n550 i.e. "Unresolved dependencies". And indeed, changing that flag does affect how missing imports are treated. (In reply to Richard Fearn from comment #2) > That flag is the first one in the "Unresolved" section: Oops - should have said "Usage" section. > https://git.eclipse.org/c/pde/eclipse.pde.ui.git/tree/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/PDECompilersConfigurationBlock.java#n550 ...and that should be line 535 :-) https://git.eclipse.org/c/pde/eclipse.pde.ui.git/tree/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/preferences/PDECompilersConfigurationBlock.java#n535 New Gerrit change created: https://git.eclipse.org/r/69069 Created attachment 260493 [details] video showing the issue solved Bug 259958 has now a pending patch. Pushing the patch to PDE for Neon would help JSDT developers. Having a review for this change would be good. (In reply to Patrik Suzzi from comment #7) > Having a review for this change would be good. Vikas, please review for M7. Gerrit change https://git.eclipse.org/r/69069 was merged to [master]. Commit: http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=58c840600e0b33276fc3e351b57cec0614588b17 Thanks Patrik verified on Version: Neon (4.6) Build id: N20160419-2000 but by default in a new workspace, missing packages are set to ignore. Is this the correct behavior? CompilerFlags.P_MISSING_EXPORT_PKGS is for "This plug-in does not export all of its packages" So this causes an issue which I spotted in verification ( Bug 492526 - By default, missing packages are set to ignore and not to error or warning). So we should use CompilerFlags.P_UNRESOLVED_IMPORTS for "Package doesnt exist in workspace" for time being( 4.6) Ideally I would want another option for "Package doesnt exist in workspace" tracked by this bug). Based on this I will recommend a revert for 4.6 reopened based on previous comment. Dani, can you give +1 for the revert for 4.6RC1? (In reply to Vikas Chandra from comment #12) > CompilerFlags.P_MISSING_EXPORT_PKGS is for "This plug-in does not export all > of its packages" > > So this causes an issue which I spotted in verification ( Bug 492526 - By > default, missing packages are set to ignore and not to error or warning). > > So we should use CompilerFlags.P_UNRESOLVED_IMPORTS for "Package doesnt > exist in workspace" for time being( 4.6) > > Ideally I would want another option for "Package doesnt exist in workspace" > tracked by this bug). > > Based on this I will recommend a revert for 4.6 That was reported 2016-04-27. Why is this comment coming so late? (In reply to Vikas Chandra from comment #14) > Dani, > > can you give +1 for the revert for 4.6RC1? Please provide the corresponding change for review. Created attachment 261592 [details]
reverted patch
>>That was reported 2016-04-27. Why is this comment coming so late? Initially it appeared as that the default setting needs to changed from ignore to error for this compiler setting. ( opened Bug 492526 for investigation in 4.6) However after changing the setting , not all package exported errors came up. That meant that even the missing package exports was used for something else. In summary, roll back is better than current state but as I have written before, missing package export is a misleading option and probably we need another option for "package not present in current workspace". So a rollback is warranted. New Gerrit change created: https://git.eclipse.org/r/72405 New Gerrit change created: https://git.eclipse.org/r/72407 Gerrit change https://git.eclipse.org/r/72405 was merged to [master]. Commit: http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=1470b7c7056bd80c8c283fd937bc0ae07bc453cd New Gerrit change created: https://git.eclipse.org/r/72408 Created attachment 263506 [details]
Fix
Created attachment 263507 [details]
Image describing the current and past options which control the error in manifest file
The image is self-explanatory.
Created attachment 263508 [details]
Fix with updated license year
Dani, can you look at https://bugs.eclipse.org/bugs/attachment.cgi?id=263507 (In reply to Vikas Chandra from comment #26) > Dani, can you look at https://bugs.eclipse.org/bugs/attachment.cgi?id=263507 I'm fine renaming "Missing exported packages" to "Unexported package". However, adding a sub-option to unresolved dependencies is overkill. I have renamed "Missing exported packages" to "Unexported package" The prime reason for this bug (comment#0 - section b) ) was the confusion "Missing exported packages" caused. It can easily be interpreted as Missing ( in the plugin ) exported packages. It was meant for some package ( at least 1) was not exported but clearly "Missing exported packages" is misleading. With proposal of comment#25 and subsequent suggestion as per comment#27, this confusion should not happen anymore. Fixed with this name change http://git.eclipse.org/c/pde/eclipse.pde.ui.git/commit/?id=17bad3bf3a7a5e873b857338108f4486913344dc Verified on Version: Oxygen (4.7) Build id: I20160912-2000 |