This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Strange behavior with scala scripts

3 replies
Tom Malone
Joined: 2009-04-01,
User offline. Last seen 42 years 45 weeks ago.
if i run the following command

scala -e println "HelloWorld"

I end up with this process afterwards

77723 scala.tools.nsc.MainGenericRunner

if this a bug or am i doing something wrong.

This happens if I run scala someScript.scala as well

Thanks

Tom

Mark Harrah
Joined: 2008-12-18,
User offline. Last seen 35 weeks 3 days ago.
Re: Strange behavior with scala scripts

scala has to compile the script before running it and by default uses a compilation daemon to speed up future compilations. This daemon is the process you see.

If you don't want the daemon:
scala -nocompdaemon

To shut down the daemon:
fsc -shutdown

You might want to use the option to save compiled scripts so they aren't recompiled if they haven't changed:
scala -savecompiled someScript.scala

-Mark

On Wednesday 01 April 2009 06:16, Tom Malone wrote:
> if i run the following command
>
> scala -e println "HelloWorld"
>
> I end up with this process afterwards
>
> 77723 scala.tools.nsc.MainGenericRunner
>
> if this a bug or am i doing something wrong.
>
> This happens if I run scala someScript.scala as well
>
> Thanks
>
> Tom
>

Antonio Cunei 2
Joined: 2008-12-20,
User offline. Last seen 42 years 45 weeks ago.
Re: Strange behavior with scala scripts

Also, the daemon will automatically terminate after being idle for 30 minutes.
Toni

Mark Harrah wrote:
> scala has to compile the script before running it and by default uses a compilation daemon to speed up future compilations. This daemon is the process you see.
>
> If you don't want the daemon:
> scala -nocompdaemon
>
> To shut down the daemon:
> fsc -shutdown
>
> You might want to use the option to save compiled scripts so they aren't recompiled if they haven't changed:
> scala -savecompiled someScript.scala
>
> -Mark
>
>
> On Wednesday 01 April 2009 06:16, Tom Malone wrote:
>> if i run the following command
>>
>> scala -e println "HelloWorld"
>>
>> I end up with this process afterwards
>>
>> 77723 scala.tools.nsc.MainGenericRunner
>>
>> if this a bug or am i doing something wrong.
>>
>> This happens if I run scala someScript.scala as well
>>
>> Thanks
>>
>> Tom
>>
>

Tom Malone
Joined: 2009-04-01,
User offline. Last seen 42 years 45 weeks ago.
Re: Strange behavior with scala scripts
Thanks really helpful

Tom

On Wed, Apr 1, 2009 at 5:24 PM, Antonio Cunei <scala_ml@cunei.com> wrote:
Also, the daemon will automatically terminate after being idle for 30 minutes.
Toni

Mark Harrah wrote:
scala has to compile the script before running it and by default uses a compilation daemon to speed up future compilations.  This daemon is the process you see.

If you don't want the daemon:
scala -nocompdaemon

To shut down the daemon:
fsc -shutdown

You might want to use the option to save compiled scripts so they aren't recompiled if they haven't changed:
scala -savecompiled someScript.scala

-Mark


On Wednesday 01 April 2009 06:16, Tom Malone wrote:
if i run the following command

scala -e println "HelloWorld"

I end up with this process afterwards

77723 scala.tools.nsc.MainGenericRunner

if this a bug or am i doing something wrong.

This happens if I run scala someScript.scala as well

Thanks

Tom




Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland