-
Notifications
You must be signed in to change notification settings - Fork 120
Always consider fragments that specify a platform filter #1939
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
base: master
Are you sure you want to change the base?
Always consider fragments that specify a platform filter #1939
Conversation
162d976
to
3a4eaad
Compare
Test Results 324 files - 441 324 suites - 441 40m 1s ⏱️ - 12m 2s For more details on these failures and errors, see this check. Results for commit 3a11ebb. ± Comparison against base commit ebb6634. This pull request removes 2651 tests.
♻️ This comment has been updated with latest results. |
This should be included once master is open unless someone things we should have this in RC1 |
ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDEAuxiliaryState.java
Outdated
Show resolved
Hide resolved
3a4eaad
to
5e73f3c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As elaborated in #1929 (comment) this is IMO the wrong approach and we should not extend the set of included fragments based on a heuristic that might or might not be correct. And incorrect inclusions can really ruin the runtime without any possibility to intervene except for specifying a launch completely manually.
Furthermore this now affects all calls to the computation method that don't specify any options. If at all this should only be done on explicit request, that could then be done for Plugin test launches.
But still I think the alternatives I suggested above are more suitable.
@HannesWell can you please give an example where "incorrect inclusions can really ruin the runtime" I can not really think about any case where this would be wrong (but many cases where it is missing). For me this is not really any heuristic, it is actually the reverse of Extensible-Api header, I never seen a case where one defines a Eclipse-PlatformFilter but don't want the fragment included, it is more the other way round that we take many efforts (e.g. additional |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm personally fine with this approach.
5e73f3c
to
a82ae8b
Compare
I now introduced a new option that is only activated in the |
All of this is in my opinion just a workaround because it's currently not possible to declare a requirement from a host to one of it's fragments and building the same in one reactor with Maven/Tycho. Please see my answer in #1929 (comment)
As written in the issue I'll probably reluctantly approve this, if this is only enabled for shrieked |
Actually native fragments (and Eclipse-PlatformFilter) are the "workaround", OSGi has standard means to declare and select appropriate native code by platform, anyways its an Eclipse Extension and PDE can/should support it. "required fragments" is really something completely alien from OSGi point-of-view ... if it is required then it should be part of the bundle, if it is truly optional then it can be a fragment, but both does not really make sense.
The whole purpose (and power) of "include required automatically" is that it works without specify it explicitly. SO of course one wants this for products and plain OSGi launches as well! I really don't understand the concerns mentioned in the ticket they are talking about fragments that pull in more dependencies, about test fragments and so one none of this applies to the proposed solution here:
|
a82ae8b
to
90c4bc1
Compare
A fragment can declare a Eclipse-PlatformFilter to be only installed on a given platform. If such fragment is currently wired to a host bundle, it is quite likely that fragment is needed but the host usually do not declare an Eclipse-ExtensibleAPI so we currently miss to add such fragment making the native code loading fails. This now adds some code to store the platform filter and if one is given the fragment is always included. Fix eclipse-pde#1929
90c4bc1
to
3a11ebb
Compare
A fragment can declare a Eclipse-PlatformFilter to be only installed on a given platform. If such fragment is currently wired to a host bundle, it is quite likely that fragment is needed but the host usually do not declare an Eclipse-ExtensibleAPI so we currently miss to add such fragment making the native code loading fails.
This now adds some code to store the platform filter and if one is given the fragment is always included.
Fix #1929