[tycho-4.0.x] Add test case for invalid compilation against fragments from P2 repo | Only add matching fragments to the classpath#4410
Merged
eclipse-tycho-bot merged 2 commits intotycho-4.0.xfrom Nov 4, 2024
Conversation
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)
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.
Backport
This will backport the following commits from
maintotycho-4.0.x:Questions ?
Please refer to the Backport tool documentation