You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.
The scala script has a larger amount of sophistication than our current ./bin/dotr. Help text from scala script:
Usage: scala <options> [<script|class|object|jar> <arguments>]
or scala -help
All options to scalac (see scalac -help) are also allowed.
The first given argument other than options to scala designates
what to run. Runnable targets are:
- a file containing scala source
- the name of a compiled class
- a runnable jar file with a valid Main-Class attribute
- or if no argument is given, the repl (interactive shell) is started
Options to scala which reach the java runtime:
-Dname=prop passed directly to java to set system properties
-J<arg> -J is stripped and <arg> passed to java as-is
-nobootcp do not put the scala jars on the boot classpath (slower)
Other startup options:
-howtorun what to run <script|object|jar|guess> (default: guess)
-i <file> preload <file> before starting the repl
-e <string> execute <string> as if entered in the repl
-save save the compiled script in a jar for future use
-nc no compilation daemon: do not use the fsc offline compiler
A file argument will be run as a scala script unless it contains only
self-contained compilation units (classes and objects) and exactly one
runnable main method. In that case the file will be compiled and the
main method invoked. This provides a bridge between scripts and standard
scala source.
When running a script or using -e, an already running compilation daemon
(fsc) is used, or a new one started on demand. The -nc option can be
used to prevent this.
With that being said what we'd actually like to do is to have main command with sub commands - think git or go.
E.g. to compile you'd go:
$ ./bin/dotc compile <ARGS>
to launch an interactive repl you'd say:
$ ./bin/dotc repl
The text was updated successfully, but these errors were encountered:
felixmulder
changed the title
Make ./bin/dotr on-par with scala script
Make bin-script on-par with scala script
Oct 11, 2016
@felixmulder Assuming this is still a novice issue, is the end goal to combine both dotc and dotr into simply dotc? I would love it if you'd provide more insight into this. Thanks!
It sort of is, but it's not really a pressing issue. We've decided to do the first releases without scripts.
That being said, the scripts are in need of some form of update. But, we're still considering how to package things. I'd hold off on this for a little while..
The
scala
script has a larger amount of sophistication than our current./bin/dotr
. Help text fromscala
script:With that being said what we'd actually like to do is to have main command with sub commands - think
git
orgo
.E.g. to compile you'd go:
to launch an interactive repl you'd say:
The text was updated successfully, but these errors were encountered: