Should scripts work with .scala files #442
alvinj
started this conversation in
Using directives and cmd configuration options
Replies: 2 comments
-
Yep, thank you for pointing it out! We need to somehow document/clarify this. The first example would work if you run
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Note that I also opened #466 which suggests that scripts with no file extension at all ought to be allowed. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was just wondering if
.sc
scripts are supposed to work with.scala
files that are in the current directory, or in a resources directory?I tried this, with both files in the same directory, and it didn’t work:
Then I tried this and it also didn’t work:
That second attempt results in this error:
$ ./TestPerson.sc [error] ./TestPerson.sc:2:4: Unrecognized directive: using resourceDir ./resources [error] // using resourceDir "./resources" [error] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This isn’t a huge deal, just a question. I didn’t know if scripts were meant to be totally included in one file, but then I saw that they work with jar files, so it made me wonder what the difference was between using a
.scala
file in the current directory (or a resources directory) compared to using a jar file. Thanks.Totally unrelated, but it’s cool that
using
directives like these work:Once you get used to it, it’s a really clever idea.
Beta Was this translation helpful? Give feedback.
All reactions