-
Notifications
You must be signed in to change notification settings - Fork 194
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
Only add matching fragments to the classpath #4408
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.
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.
Awesome. Thank you, @laeubi! 🥇 I have not taken a look at the change itself, but I have successfully tested whether it fixes the original issue (in the SWT build). To do so, I did the following on a MacOS laptop:
I ran the builds multiple times to hopefully exclude any potential flaky behavior. |
Test Results 603 files 603 suites 4h 20m 28s ⏱️ For more details on these failures, see this check. Results for commit 7ee7426. |
Thanks for the verification, I also see the test Once this is backported we can probably use Tycho 4.0.10-SNAPSHOT for the platform builds. |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
1 similar comment
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation and see the Github Action logs for details |
Supersedes #4293