Skip to content
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

usejavacp property can't be set to false in presentation compiler #9159

Open
scabug opened this issue Feb 18, 2015 · 3 comments
Open

usejavacp property can't be set to false in presentation compiler #9159

scabug opened this issue Feb 18, 2015 · 3 comments

Comments

@scabug
Copy link

scabug commented Feb 18, 2015

To reproduce in REPL (I included only relevant output):

scala> import scala.tools.nsc._; import interactive.Global; import reporters._; val settings = new Settings; settings.Ylogcp.value = true; settings.usejavacp.value=false; new Global(settings, new ConsoleReporter(settings))
...
Calculated: object Calculated {
...  
  useJavaClassPath     = true
...
}
...

useJavaClassPath is set to true, despite having set it as false in the settings passed to Global.

@scabug
Copy link
Author

scabug commented Feb 18, 2015

Imported From: https://issues.scala-lang.org/browse/SI-9159?orig=1
Reporter: Alejandro Pedraza (alpeb)
Affected Versions: 2.11.5

@scabug
Copy link
Author

scabug commented Feb 18, 2015

@som-snytt said (edited on Feb 18, 2015 5:55:29 PM UTC):
The comment in the scala runner script:

# SI-8358, SI-8368 -- the default should really be false,
# but I don't want to flip the default during 2.11's RC cycle
OVERRIDE_USEJAVACP="-Dscala.usejavacp=true"

If you start with -Dscala.usejavacp=false, your example uses your settings.

Perhaps the other ticket means the switch will be flipped for 2.12.

But even then, should -Dscala.usejavacp=false override settings? If an option can be set from sys property, command line, property file or programmatic default, I usually expect the first setting to win. That won't happen here.

@scabug
Copy link
Author

scabug commented Jan 13, 2016

@szeiger said:
Related PR: scala/scala#4342

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants