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

[tycho-4.0.x] Add test case for invalid compilation against fragments from P2 repo | Only add matching fragments to the classpath #4410

Merged
merged 2 commits into from
Nov 4, 2024

Conversation

eclipse-tycho-bot
Copy link

Backport

This will backport the following commits from main to tycho-4.0.x:

Questions ?

Please refer to the Backport tool documentation

HeikoKlare and others added 2 commits November 4, 2024 11:34
When compiling a fragment for whose hose a fragment exists in a P2 repo
referenced by the build (even if the platform filter does not match),
the classes from that fragment are put on the classpath, such that code
in the currently compiled fragment is illegally compiled against that
fragment code.

This change adds a test case that demonstrates the behavior via a
fragment that uses code from another fragment, which is must not depend
on.

(cherry picked from commit 9464bc9)
Currently all discovered fragments are added to the classpath of a
project for all os/ws combinations. But in the case of os-specific
fragments this is actually wrong and can lead to strange results as
classpath order now controls what classes are visible at compile time.

This now determines the configured environments for a project and only
add those fragments that either have no filter or match any of the given
environments.

(cherry picked from commit 6ae5ee9)
@eclipse-tycho-bot eclipse-tycho-bot enabled auto-merge (rebase) November 4, 2024 11:34
@eclipse-tycho-bot eclipse-tycho-bot merged commit 33a3a95 into tycho-4.0.x Nov 4, 2024
14 checks passed
@akurtakov akurtakov deleted the backport/tycho-4.0.x/pr-4408_pr-4408 branch November 4, 2024 13:32
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

Successfully merging this pull request may close these issues.

3 participants