fsc error when running scala script

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

fsc error when running scala script

Noel Yap
This works when using Scala 2.10 and is broken in both 2.11 and 2.12.

The following script:

#!/bin/bash

exec /opt/scala-2.12/bin/scala "$0"
!#
println("aoeu")

errors with:

fscbad option: '-Xsource:2.12.0'
  fsc -help  gives more information
error: source file '/home/nyap/proj/sum-of-power/-Xsource:2.12.0' could not be found
one error found

--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: fsc error when running scala script

som-snytt
You have to kill the compile server before running a different version.

$ scala210 y.scala
hi
$ scala y.scala
fscbad option: '-Xsource:2.12.0'
  fsc -help  gives more information
error: source file '/home/apm/tmp/-Xsource:2.12.0' could not be found
one error found
$ ~/scala-2.10.6/bin/fsc -shutdown
[Compile server exited]
$ scala y.scala
hi
$ ~/scala-2.12.1/bin/fsc -shutdown
[Compile server exited]



On Wednesday, January 4, 2017 at 12:44:01 PM UTC-8, Noel Yap wrote:
This works when using Scala 2.10 and is broken in both 2.11 and 2.12.

The following script:

#!/bin/bash

exec /opt/scala-2.12/bin/scala "$0"
!#
println("aoeu")

errors with:

fscbad option: '-Xsource:2.12.0'
  fsc -help  gives more information
error: source file '/home/nyap/proj/sum-of-power/-Xsource:2.12.0' could not be found
one error found

--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: fsc error when running scala script

Seth Tisue-3
I use -nocompdaemon in all my Scala scripts now, after having been bitten by this far more times than I care to admit.

--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Loading...