-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Script to run compiler #10
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
Conversation
Added a script to run compiler
I really recommend having a more intelligent runner like the one I took from Paul: https://github.com/xeno-by/dotx/blob/master/scala-runner. This one can later be symlinked to |
then | ||
echo "The script is going to build the required jar file $1 by running \"sbt $2\" [5s until build]" | ||
sleep 5 | ||
cd $MINIBOXING_PATH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MINIBOXING_PATH
?
Just to summarize the discussion we just had:
So, the course of action should be:
|
I don't fully understand yet.. You are saying that scala-library.jar needs to be on the bootclasspath to execute What does this have to do with dotty? Also there might be confusion about the (JVM) classpath used to run scalac, and the classpath that scalac reads dependencies from. The two are independent. Only if you use |
@lrytz yes. scalac requires either scala-library.jar on bootclasspath or flag -Dscala.usejavacp=true (later is provided by default scalac script) |
The bootclasspath was only used because startup time was faster. For scalac / dotc it should not matter whether the scala library is on the boot classpath or on the normal (JVM) classpath. Note that the system properties describing the two are not the same: The |
I completely agree that it shouldn't, but currently for dotty it matters
will die with error
while
succeeds. Interesting though that removing -Dscala.usejavacp=true from last command line also makes it fail the same way |
This is kind of expected. |
Works on my machine at least now. |
@@ -0,0 +1,53 @@ | |||
#!/bin/bash | |||
if [[ "$OSTYPE" == "linux-gnu" ]]; then | |||
MY_PATH="`realpath \"$0\"`" # relative, symbolic links resolved |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You shouldn't rely on realpath -- it's not a standard unix util (needed apt-get to install it)
LGTM modulo the Anyone against merging? |
Just for reference, the answer to the question why do we need to set the bootclasspath to run dotty in eclipse/sbt: https://github.com/lampepfl/dotty/wiki/Classpaths-when-running-dotty |
when adding a new page to the wiki, consider adding it to the sidebar navigation. click "edit page" on the wiki, then there's a "sidebar" section. |
Thanks @lrytz, I added the link under Getting Started. |
Running on my macbook i get
I'd suggest
Otherwise it seems to work
|
I already have some commands called dotc and dotty in PATH(I believe they come from graphviz package). |
That's unfortunate.. Are you sure it's from graphviz? I have it installed, so I do have |
Package manager doesn't know where does |
OK. I'd vote for |
Seems
|
I will work on improving the script with features from paulp script. As well as rename it to |
btw, I find the status quo for usejavacp backwards -- it should be opt-out |
It seems that making repo public broke ling between my branch and this PR. |
doc(opaque type alias): revise text, remove workaround
Add dotty-dokka resources appender and installer, append project-specific CSS
Add second line with description to search result
Backport "Let show behave more robustly for Recheck" to LTS
Added a script to run compiler.
Though it still fails to compile even a single empty class.
review @VladUreche