-
Notifications
You must be signed in to change notification settings - Fork 21
Inconsistent, forced {{-Dscala.usejavacp}} treatment #8368
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
Comments
Imported From: https://issues.scala-lang.org/browse/SI-8368?orig=1
|
@som-snytt said: Just for fun, the comment from the transitional period before the switch: - /** I have distilled everyone's classpath hopes and dreams into the
- * question of how to resolve this boolean. Right at this moment if I
- * do anything but default to true right here, partest chokes. I'm
- * steadily reworking all the places partest gets its hands on the
- * classpath so eventually I'll be able to remedy that, at which point
- * my current plan is to have this default to false unless some
- * property or command line option is supplied. This is negotiable,
- * but at this point I can say with confidence that less magic and
- * less autodetection is more better.
- */
- def useJavaClassPath = true
- // hypothetically:
- // def useJavaClassPath = propIsSet("scala.classpath.guess") That's four years ago, right after the "Decade of Sane Class Paths" initiative was announced. |
@gkossakowski said: In #8358 we are confused about what should be included in classpath as well. |
@huitseeker said: |
@dragos said: As Francois suggests, having a way to override the default would be good enough. |
@adriaanm said: |
@adriaanm said (edited on Mar 7, 2014 6:46:59 PM UTC): |
@som-snytt said: |
@adriaanm said: |
As per https://github.com/scala/scala/blob/master/src/repl/scala/tools/nsc/interpreter/AbstractOrMissingHandler.scala#L28
{quote}{code}
|** Note that as of 2.8 scala does not assume use of the java classpath.
|** For the old behavior pass -usejavacp to scala, or if using a Settings
|** object programatically, settings.usejavacp.value = true."""
{code}{quote}
Except the Scalac tools force the setting to
-Dscala.usejavacp=true
:https://github.com/scala/scala/blob/master/src/compiler/scala/tools/ant/templates/tool-unix.tmpl#L202
https://github.com/scala/scala/blob/master/src/compiler/scala/tools/ant/templates/tool-windows.tmpl#L129
And yet tools/tests visibly expect the tool to set
usejavacp=false
since they override the setting:More worryingly, both scripts ignore the setting that may be passed to them by the user, preemptively forcing their own stuff by placing it after java args.
Attached is a patch that fixes things for
src/compiler/scala/tools/ant/templates/tool-unix.tmpl
. I have no idea how to proceed with the windows equivalent.The text was updated successfully, but these errors were encountered: