-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
SIP 46 - read classpath from file, remove lib directory in distribution #20631
SIP 46 - read classpath from file, remove lib directory in distribution #20631
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Edit: so this was because on linux it seems the ivy2local was being prioritised by cs fetch, so now we don't use any default repository. |
e55b9b6
to
9d41c7b
Compare
93e22c0
to
bf67032
Compare
Also mentioning @unkarjedy here to see if this classpath idea is sufficient for IntelliJ as mentioned in issue #20413 - the |
it was decided we could do a this in a patch release |
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.
I'm not sure why GitHub says that this file is empty...
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.
Should it be investigated: There is a change of permissions in this file and in /dist/bin/common
but the CI can still execute the script, not sure why
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.
I changed the permissions yeah. Also common is only ran from within other bash scripts with source
so it isn't ever directly executed
This should be backported to the 3.5.0 line
write classpath to file, and do not write the
lib
directory, this saves duplicating the jars in the distribution.In the distribution, we write
/etc/scala.classpath
,/etc/with_compiler.classpath
, and/etc/scaladoc.classpath
. each of these are formatted such that each line is a relative path from the/maven2
directory in the distribution.To produce these files, I use the output of the same
cs fetch
command that is used to populate themaven2
directory - so the correspondence is 1:1. This is a much better solution than the previous manual resolution of classpath from within the bash/batch scripts - as the classpath libraries actually change a lot between versions.The contents look like the following:
scala.classpath (compiler classpath used by scalac)
with_compiler.classpath (concatenated to scala.classpath to run the scalac command)
and scaladoc.classpath
the bash/batch scripts then read these files, concatenating each line to the absolute path of the
maven2
directory, and joining with the systems path separator (and replacing/
with\
in batch)fixes #20711