-
Notifications
You must be signed in to change notification settings - Fork 121
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
Fix sbt/sbt#3736. Recurse into classloader of the class not the root #473
Conversation
Fix blog link in CONTRIBUTING
Hi @ravwojdyla, Thank you for your contribution! We really value the time you've taken to put this together. Before we proceed with reviewing this pull request, please sign the Lightbend Contributors License Agreement: |
d8deb1d
to
5293311
Compare
Thanks for the contribution @ravwojdyla ❤️. Could you check if this fixes sbt/sbt#3736? I would like to see some tests here to be 100% sure that this does the right thing. |
I’ve gone into the details of this patch and the fix looks good to me, by the way. I’m surprised it hasn’t been caught before. |
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.
Given ClasspathFilter
's purpose is to verify "that all classes loaded through parent
either come from root
or classpath
" (from its scaladoc) I agree changing from traversing the root classloader's parents to the class's classloader's parents looks right.
And I'm equally surprised this wasn't caught before.
Ideally we'd have a test that accurately reproduces the downstream issue, but I'm happy to merge this without.
5293311
to
4f9f038
Compare
Thanks for reviews @dwijnand, @jvican. Sorry, I have made a mistake by referencing wrong sbt issue, this solves only sbt/sbt#3736. I updated the commit message and title of this PR. Regarding sbt/sbt#3515, this change does not solve it. |
To me, this is good to go IMO. Further investigation can take care of sbt/sbt#3736 😄. |
@jvican thanks. This patch also fixes sbt/sbt/issues/3647, sbt/sbt/issues/3608 and sbt/sbt/issues/3733 |
FYI I have signed the CLA. |
@ravwojdyla Hi, thanks for your contribution. I'm trying to verify this by adding a scripted test locally, and I am unable to confirm using https://github.com/raboof/sbt-run-classloading/blob/master/src/main/scala/Main.scala. Does it run for you? I am still getting
|
Never mind. I think there was some internal discrepancy in scripted due to relative path vs absolute path. Let me send a PR on top of your PR. |
Thanks @eed3si9n . Merged. |
Thanks @ravwojdyla! 🎉 |
Having this issue on System: Mac OSX Mojave 10.14.3 (18D109) |
@elliotvilhelm hmm, I can't reproduce that (though I'm running Linux, so that might be a difference) How exactly did you test this? Did you use the 'Create a project for me' button and then run 'sbt run'? What does the error look like, exactly, for you? |
sbt/sbt#3736