-
Notifications
You must be signed in to change notification settings - Fork 41
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
Add optional, greedy and disabled by default requirement to the source #446
Conversation
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.
Looks very good and useful.
b5e1391
to
ec509b6
Compare
Sounds also reasonable for me as well. |
ec509b6
to
d79a560
Compare
I now tested this and in general it works with Tycho but just requires some additional configuration at the moment, I also take the opportunity to fix javadoc errors and extract some constants here, so now this should be ready to submit. |
d79a560
to
9d571f9
Compare
Currently it is quite cumbersome effort to include the source of a bundle with an installation even though there might be multiple demands, for example legal reasons or debugging. This now adds a new greedy, optional requirement that is disabled by a filter so it is not effective by default but enables an install agent to specify a property of org.eclipse.update.install.source=true to include sources of bundles in products whenever available.
9d571f9
to
a6451e3
Compare
In the presence of products, P2 adds a virtual 'tooling.source.default' IU which optionally depends on all sources. If these sources are avaialble in the target platform, this would cause them to be picked up even if assemble-repository was configured with <includeAllSources>false</includeAllSources>. This scenario has become much more likely with recent changes to P2 [1]. To prevent this, we actively prevent this from happening by ignoring the requirements of the 'tooling.source.default' IU unless includeAllSources is explicitly enabled. These would be picked up even if If however, assemble-repository is Fixes eclipse-tycho#3522. [1] eclipse-equinox/p2#446
With eclipse-equinox/p2#446 and Tycho resolving all possibly needed bundles source bundle ends up there in case it's needed.
With eclipse-equinox/p2#446 and Tycho resolving all possibly needed bundles source bundle ends up there in case it's needed.
With eclipse-equinox/p2#446 and Tycho resolving all possibly needed bundles source bundle ends up there in case it's needed. (cherry picked from commit 15c00f1)
With eclipse-equinox/p2#446 and Tycho resolving all possibly needed bundles source bundle ends up there in case it's needed. (cherry picked from commit 15c00f1)
In the presence of products, P2 adds a virtual 'tooling.source.default' IU which optionally depends on all sources. If these sources are available in the target platform, this would cause them to be picked up even if assemble-repository was configured with <includeAllSources>false</includeAllSources>. This scenario has become much more likely with recent changes to P2 [1]. We actively prevent this from happening by ignoring the requirements of the 'tooling.source.default' IU, unless includeAllSources is explicitly enabled. Fixes eclipse-tycho#3522. [1] eclipse-equinox/p2#446
In the presence of products, P2 adds a virtual 'tooling.source.default' IU which optionally depends on all sources. If these sources are available in the target platform, this would cause them to be picked up even if assemble-repository was configured with <includeAllDependencies>true<includeAllDependencies> but with <includeAllSources>false</includeAllSources>. This scenario has become much more likely with recent changes to P2 [1]. We do not want includeAllDependencies to imply includeAllSources, so we actively prevent this from happening by ignoring the <required namespace='org.eclipse.equinox.p2.eclipse.type' name='source' range='0.0.0' optional='true' multiple='true' greedy='false'/> requirements if 'includeAllSources' is not specified. Fixes eclipse-tycho#3522. [1] eclipse-equinox/p2#446
In the presence of products, P2 adds a virtual 'tooling.source.default' IU which optionally depends on all sources. If these sources are available in the target platform, this would cause them to be picked up even if assemble-repository was configured with <includeAllDependencies>true<includeAllDependencies> but with <includeAllSources>false</includeAllSources>. This scenario has become much more likely with recent changes to P2 [1]. We do not want includeAllDependencies to imply includeAllSources, so we actively prevent this from happening by ignoring the <required namespace='org.eclipse.equinox.p2.eclipse.type' name='source' range='0.0.0' optional='true' multiple='true' greedy='false'/> requirements if 'includeAllSources' is not specified. Fixes #3522. [1] eclipse-equinox/p2#446
In the presence of products, P2 adds a virtual 'tooling.source.default' IU which optionally depends on all sources. If these sources are available in the target platform, this would cause them to be picked up even if assemble-repository was configured with <includeAllDependencies>true<includeAllDependencies> but with <includeAllSources>false</includeAllSources>. This scenario has become much more likely with recent changes to P2 [1]. We do not want includeAllDependencies to imply includeAllSources, so we actively prevent this from happening by ignoring the <required namespace='org.eclipse.equinox.p2.eclipse.type' name='source' range='0.0.0' optional='true' multiple='true' greedy='false'/> requirements if 'includeAllSources' is not specified. Fixes #3522. [1] eclipse-equinox/p2#446 (cherry picked from commit 51e39d6)
In the presence of products, P2 adds a virtual 'tooling.source.default' IU which optionally depends on all sources. If these sources are available in the target platform, this would cause them to be picked up even if assemble-repository was configured with <includeAllDependencies>true<includeAllDependencies> but with <includeAllSources>false</includeAllSources>. This scenario has become much more likely with recent changes to P2 [1]. We do not want includeAllDependencies to imply includeAllSources, so we actively prevent this from happening by ignoring the <required namespace='org.eclipse.equinox.p2.eclipse.type' name='source' range='0.0.0' optional='true' multiple='true' greedy='false'/> requirements if 'includeAllSources' is not specified. Fixes #3522. [1] eclipse-equinox/p2#446 (cherry picked from commit 51e39d6)
Currently it is quite cumbersome effort to include the source of a bundle with an installation even though there might be multiple demands, for example legal reasons or debugging.
This now adds a new greedy, optional requirement that is disabled by a filter so it is not effective by default but enables an install agent to specify a property of
org.eclipse.equinox.p2.includesource=true
to include sources of bundles in products whenever available.