Skip to content

Fix #4841: Load the compiler toolbox reflectively #4849

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
Jul 27, 2018

Conversation

nicolasstucki
Copy link
Contributor

No description provided.

@smarter
Copy link
Member

smarter commented Jul 26, 2018

Can you rebase this PR on top of #4833 to make sure that it works as expected with the stricter checks in that PR (or even better review and merge it :)).

catch {
case ex: ClassNotFoundException =>
throw new ToolboxNotFoundException(
s"""Could not load the Toolbox class `${ex.getMessage}` in the classpath. Make sure that the compiler is on the classpath.""",
Copy link
Member

Choose a reason for hiding this comment

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

"in the classpath" -> "from the JVM classpath"
"on the classpath" -> "on the JVM classpath"
(To distinguish it from the compiler classpath)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed

Copy link
Member

@smarter smarter left a comment

Choose a reason for hiding this comment

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

You should be able to move the {pos,neg}-with-compiler tests that only need the toolbox back to {pos,neg}. You should also be able to remove the exceptions when using -with-compiler with a non-bootstrapped compiler:https://github.com/lampepfl/dotty/blob/master/project/Build.scala#L610-L612 and https://github.com/lampepfl/dotty/blob/master/project/Build.scala#L679-L681

@nicolasstucki
Copy link
Contributor Author

I got some unpickling issues when I moved the tests back.

@nicolasstucki nicolasstucki merged commit c20d1fb into scala:master Jul 27, 2018
@allanrenucci allanrenucci deleted the fix-#4841 branch July 27, 2018 13:31
@allanrenucci
Copy link
Contributor

I got some unpickling issues when I moved the tests back.

Can you investigate? It would be nice that the tests enforce that the compiler is not needed on the classpath

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.

3 participants