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
Is your feature request related to a problem? Please describe.
The problem occurred for me when I was migrating a big pile of simple bash scripts to scala-cli.
I have multiple *.sc files, each with scala-cli in shebang, so I can just call them the same way I call bash scripts (just scripts/buildBase.sc) . I also want to have utils.scala file with common definitions for all the scripts. It is not possible to include the utils without needing to specify them explicitly every time I call a script.
scala-cli scripts/buildBase.sc scripts/utils.scala is rather long in comparison with scripts/buildBase.sc.
Describe the solution you'd like
I would like to be able to specify something like //> using file "utils.scala" which would add utils file to the classpath every time I compile and run my script.
Describe alternatives you've considered
I'm now calling my scripts using scala-cli scripts --main-class buildBase_sc. This is not elegant. Also, It loads dozens of scripts on classpath which may result in some unexpected problems in rare cases.
Additional context
In bash, the user is able to just source other scripts. The necessity of specifying each scala dependency on every script invocation may discourage people from migrating scripts from bash to scala.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
The problem occurred for me when I was migrating a big pile of simple bash scripts to scala-cli.
I have multiple
*.sc
files, each with scala-cli in shebang, so I can just call them the same way I call bash scripts (justscripts/buildBase.sc
) . I also want to haveutils.scala
file with common definitions for all the scripts. It is not possible to include the utils without needing to specify them explicitly every time I call a script.scala-cli scripts/buildBase.sc scripts/utils.scala
is rather long in comparison withscripts/buildBase.sc
.Describe the solution you'd like
I would like to be able to specify something like
//> using file "utils.scala"
which would add utils file to the classpath every time I compile and run my script.Describe alternatives you've considered
I'm now calling my scripts using
scala-cli scripts --main-class buildBase_sc
. This is not elegant. Also, It loads dozens of scripts on classpath which may result in some unexpected problems in rare cases.Additional context
In bash, the user is able to just
source
other scripts. The necessity of specifying each scala dependency on every script invocation may discourage people from migrating scripts from bash to scala.The text was updated successfully, but these errors were encountered: