Error on JDT configuration ignoring OSGi restrictions#2339
Merged
HannesWell merged 1 commit intoMay 18, 2026
Conversation
merks
approved these changes
May 18, 2026
Contributor
merks
left a comment
There was a problem hiding this comment.
Just nits. Looks fine. Would be good for the current cycle given the PDE changes to the classpath.
laeubi
reviewed
May 18, 2026
laeubi
reviewed
May 18, 2026
laeubi
approved these changes
May 18, 2026
Contributor
laeubi
left a comment
There was a problem hiding this comment.
I'm a bit doubtful this brings much value but it would also not harm.
a18fc9b to
06ca7b2
Compare
Member
Author
Usually not, but since we saw also in the Eclipse SDK some projects being configured with Thanks for your reviews. I'll submit this once the build is ready to have this included in tonight's I-build. |
This was referenced May 19, 2026
hazendaz
pushed a commit
to spotbugs/spotbugs
that referenced
this pull request
May 19, 2026
* Fix PDE "OSGi access" error introduced in 4.40 Eclipse See eclipse-pde/eclipse.pde#2339 Fixes #4052 * Fix plugin build error in IDE on missing jakarta annotations See 579746b change. Fixes #4052 * Updated changelog for #4052
akurtakov
added a commit
to akurtakov/chemclipse
that referenced
this pull request
May 21, 2026
PDE has a new warning eclipse-pde/eclipse.pde#2339 that shows errors in the workspace.
akurtakov
added a commit
to akurtakov/chemclipse
that referenced
this pull request
May 21, 2026
PDE has a new warning eclipse-pde/eclipse.pde#2339 that shows errors in the workspace.
Mailaender
pushed a commit
to eclipse-chemclipse/chemclipse
that referenced
this pull request
May 21, 2026
PDE has a new warning eclipse-pde/eclipse.pde#2339 that shows errors in the workspace.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As described in #2244 (comment), a value of the
org.eclipse.jdt.core.compiler.problem.forbiddenReferencepreference other thanerroreffectively disables the enforcement of almost all OSGi access rules. This potentially leads to classloading errors at runtime because access rule violations are not detected anymore at compile-time/in the IDE.With this change, users are now informed about such misconfiguration of PDE projects, by an error on the
build.propertiesfile.Alternatively the error marker could be added to the
org.eclipse.jdt.core.prefsfile of a project, but I think this is unusual.For those that really want to ignore OSGi access rules at compile-time, I'm considering to add yet another preference to degrade this check to warning, info or to ignore. It's currently missing, but I plan to add it this evening.
I know we're now late in the development cycle, but in the context of #2218, I think it's important to have this for the upcoming release.