Skip to content

Use correct parent classloader for worksheets. #2631

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

Merged
merged 1 commit into from
Mar 25, 2021

Conversation

ckipp01
Copy link
Member

@ckipp01 ckipp01 commented Mar 25, 2021

Instead of passing in null when we extend ClassLoader in our
MdocClassLoader this passes in the actual parent since on Java +9 when
using null that's the bootstrap classloader which doesn't contain
modules like java.sql.

Big thanks to @smarter pointing this out in scala/scala3#11658.

Fixes #2187

@ckipp01 ckipp01 force-pushed the worksheet-classpath branch from 029f9f6 to 8382d66 Compare March 25, 2021 08:44
Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking into that! We are having some issues with Scala 2.13 and Scala 3 worksheets.

@tgodzik
Copy link
Contributor

tgodzik commented Mar 25, 2021

Also, #2525 is probably related.

Instead of passing in `null` when we extend ClassLoader in our
MdocClassLoader this passes in the actual parent since on Java +9 when
using `null` that's the bootstrap classloader which doesn't contain
modules like java.sql.

Big thanks to @smarter pointing this out in scala/scala3#11658.

Fixes scalameta#2187
@ckipp01 ckipp01 force-pushed the worksheet-classpath branch from 8382d66 to cd1568b Compare March 25, 2021 09:45
@ckipp01
Copy link
Member Author

ckipp01 commented Mar 25, 2021

Also, #2525 is probably related.

Playing around with it a bit, this doesn't change that behavior at all, so I don't think it is, but could totally be wrong.

@tgodzik
Copy link
Contributor

tgodzik commented Mar 25, 2021

Also, #2525 is probably related.

Playing around with it a bit, this doesn't change that behavior at all, so I don't think it is.

The resources in akka are coming most likely from the classloader, which we change, so I thought it might be connected 🤔 I will take a look at it.

@ckipp01 ckipp01 requested a review from tgodzik March 25, 2021 10:30
Copy link
Contributor

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@ckipp01 ckipp01 merged commit fd5d58a into scalameta:main Mar 25, 2021
@ckipp01 ckipp01 deleted the worksheet-classpath branch March 25, 2021 10:54
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.

ClassDefNotFound error only in Worksheet
2 participants