Skip to content

Fix #6007: Get the classloader that loaded the application #6017

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 5 commits into from
Apr 3, 2019

Conversation

biboudis
Copy link
Contributor

@biboudis biboudis commented Mar 4, 2019

The issue is that the classloader used to load the library is not the same as the one that loads the rest of the aplication. The toolbox requires the classloader that loaded the main of the application, the one that has all the classpath dependencies of the appliaction.

@biboudis biboudis requested a review from nicolasstucki March 4, 2019 13:03
@biboudis biboudis changed the title Fix #6007: Add a repl scripted test Fix #6007 and #6008: Add tests Mar 4, 2019
@biboudis biboudis self-assigned this Mar 4, 2019
@biboudis
Copy link
Contributor Author

biboudis commented Mar 6, 2019

Added a scripted test to emulate #6007

> sbt-dotty/scripted sbt-dotty/quoted-example-project

@biboudis biboudis changed the title Fix #6007 and #6008: Add tests Fix #6008: Add scripted test for projects with quotes Mar 7, 2019
@biboudis biboudis changed the title Fix #6008: Add scripted test for projects with quotes Fix #6007: Add scripted test for projects with quotes Mar 7, 2019
@nicolasstucki nicolasstucki self-assigned this Mar 29, 2019
@nicolasstucki nicolasstucki changed the title Fix #6007: Add scripted test for projects with quotes Fix #6007: Get the classloader that loaded the application Mar 31, 2019
@nicolasstucki nicolasstucki force-pushed the fix-#6007 branch 2 times, most recently from fb73a43 to c40ec10 Compare April 1, 2019 05:49
@nicolasstucki nicolasstucki requested review from liufengyun and removed request for nicolasstucki April 1, 2019 05:49
@nicolasstucki nicolasstucki added this to the 0.14 Tech Preview milestone Apr 1, 2019
Copy link
Contributor Author

@biboudis biboudis left a comment

Choose a reason for hiding this comment

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

LGTM

biboudis and others added 5 commits April 3, 2019 14:16
It is impossible ensure that the correct classloader is used.
Bail out on trying to figure out the class loader and force the user to provide it.
As it was done in Scala 2.
Copy link
Contributor

@liufengyun liufengyun left a comment

Choose a reason for hiding this comment

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

LGTM

@liufengyun liufengyun merged commit 8270aed into scala:master Apr 3, 2019
@liufengyun liufengyun deleted the fix-#6007 branch April 3, 2019 12:57
@ghost ghost removed the stat:needs review label Apr 3, 2019
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.

5 participants