Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow ignoring re-exported required bundles #728

Open
HannesWell opened this issue Aug 30, 2023 · 3 comments
Open

Allow ignoring re-exported required bundles #728

HannesWell opened this issue Aug 30, 2023 · 3 comments

Comments

@HannesWell
Copy link
Member

HannesWell commented Aug 30, 2023

In order to prepare Plugins for a future removal of re-exports in required bundles PDE should have an option to ignore require-bundle re-exports in its Target-Platform state and Plugin Dependencies Classpath Container.
This would allow to fix transitive dependents long before a re-export is really removed.

The preference could have three options:

  • Ignore re-exports -> Error if a Plug-in relies on a re-exported required-bundle
  • Warn if a Plug-in relies on a re-exported required-bundle
  • Consider (effectively the current behavior)

By default we could set it to warning for now.

@merks
Copy link
Contributor

merks commented Aug 31, 2023

Sometimes one runs into a error that some class is transitively required and then one must explicitly require the bundle or import the package. It makes me I wonder how one determines whether a plug-in relies on a re-rexport when there might be no explicit uses of any of the re-exported classes.

@laeubi
Copy link
Contributor

laeubi commented Aug 31, 2023

Sometimes one runs into a error that some class is transitively required and then one must explicitly require the bundle or import the package.

I always thought about this of a bug of either JDT or PDE but not mandated by the OSGi spec per se, re-rexport makes this even worse as PDE offers one to require completely unrelated bundles, e.g. using IProgressMonitor PDE suggests to even to require different bundles depending on what is used already but not the equinox-common where this is really exported :-\

It makes me I wonder how one determines whether a plug-in relies on a re-rexport when there might be no explicit uses of any of the re-exported classes.

You just need to collect all packages and check if the package is imported, or the required bundle that currently exports its to the project has an export for this.

@merks
Copy link
Contributor

merks commented Aug 31, 2023

You just need to collect all packages and check if the package is imported, or the required bundle that currently exports its to the project has an export for this.

Is this statement with respect to looking at *.java files or at *.class files? My point is that one gets such errors when there is no explicit reference to the class in the source at all. Anyway, without a concrete example, my comment is not very helpful...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants