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

Precompile -i files for script runner #8349

Merged
merged 1 commit into from Sep 3, 2019
Merged

Conversation

som-snytt
Copy link
Contributor

This enables scala -howtorun:script -i t4033b.scala -- t4033.scala
where the main script depends on utility code in the -i files.

Fixes scala/bug#5161

@scala-jenkins scala-jenkins added this to the 2.13.1 milestone Aug 19, 2019
globalError("can only compile one script at a time")
Nil
}
else filenames.map(getSourceFile)
Copy link
Member

Choose a reason for hiding this comment

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

What did returning ever do to you?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Poor return on investment of time in reading that line.

@som-snytt
Copy link
Contributor Author

@SethTisue Is it possible that Travis just isn't very good at his job? Or maybe he's going through a rough patch at home that has affected his work. Is there something I should type after a Travis failure?

@SethTisue
Copy link
Member

SethTisue commented Aug 21, 2019

re: Travis, I hit "restart" in the web UI. so let's see. but for the record, the error was

java.nio.file.NoSuchFileException: /tmp/scala.picklecache7643988611803649817/tmp/pipelineBase3274412707466812224/projects/m1/p1/target.jar
606	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
607	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
608	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
609	at sun.nio.fs.UnixPath.toRealPath(UnixPath.java:837)
610	at scala.tools.nsc.PipelineMainClass.$anonfun$newCompiler$1(PipelineMain.scala:622)
611	at scala.tools.nsc.PipelineMainClass.newCompiler(PipelineMain.scala:619)
612	at scala.tools.nsc.PipelineMainClass$Task.liftedTree1$1(PipelineMain.scala:432)
613	at scala.tools.nsc.PipelineMainClass$Task.compiler$lzycompute(PipelineMain.scala:431)
614	at scala.tools.nsc.PipelineMainClass$Task.compiler(PipelineMain.scala:431)
615	at scala.tools.nsc.PipelineMainClass.$anonfun$process$57(PipelineMain.scala:261)
616	at scala.tools.nsc.PipelineMainClass.$anonfun$process$57$adapted(PipelineMain.scala:261)
617	at scala.concurrent.impl.Promise$Transformation.run(Promise.scala:447)
618	at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402)
619	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
620	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
621	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
622	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

@retronym does that concern you?

@som-snytt
Copy link
Contributor Author

I believe it's in the Australian national character not to get too concerned about things.

@som-snytt
Copy link
Contributor Author

Woo-hoo! It used to be, "Man proposes, God disposes," but now it's, "OMG, what do I do? and Seth clicks a button."

I was curious where that epigram comes from.

https://en.wikipedia.org/wiki/Man_Proposes%2C_God_Disposes

The picture shows some campers who didn't stow their food in the bear-proof locker. The painting depicts the bears from the Coca-cola ad campaign, and is a metaphor for how corporate America feeds on the corpses of its intrepid entrepreneurs.

Now @hrhino can have a beer and click accept.

@hrhino
Copy link
Member

hrhino commented Aug 21, 2019

Oh come on, it's not like I ever use the script runner. -howtorun looks like a verbose way of writing --help; can we abbreviate it as -h? If you get the syntax wrong it could un-pun it for you and you'd get the explanation of how-to-run with -howtorun.

edit: I can say that it doesn't look obviously wrong.

@som-snytt
Copy link
Contributor Author

PR incoming for --how-to-pun.

@lrytz
Copy link
Member

lrytz commented Aug 23, 2019

scala -howtorun:script -i t4033b.scala -- t4033.scala

I wonder if anyone could ever discover this on their own..

@som-snytt
Copy link
Contributor Author

@lrytz "Normally, there's no way to know this..."

scala/bug#5161 (comment)

@lrytz lrytz self-assigned this Sep 3, 2019
This enables `scala -howtorun:script -i t4033b.scala -- t4033.scala`
where the main script depends on utility code in the `-i` files.
@lrytz lrytz merged commit 58e34bf into scala:2.13.x Sep 3, 2019
@szeiger szeiger added the release-notes worth highlighting in next release notes label Sep 9, 2019
@som-snytt som-snytt deleted the issue/5161 branch September 20, 2019 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes worth highlighting in next release notes
Projects
None yet
6 participants