-
Notifications
You must be signed in to change notification settings - Fork 202
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
feat: fallback to source
and javadoc
classifiers when exporting projects from sbt
#2118
Conversation
a48818e
to
8fe341f
Compare
Hmm... I tried rebase but broke something, let fix that in sec. |
8fe341f
to
ea971c7
Compare
ea971c7
to
1a83daa
Compare
Seems like my change broke something in classifiers? I'll have a look at it tomorrow. |
source
when exporting projects from sbtsource
and javadoc
classifiers when exporting projects from sbt
@tgodzik it seems that |
@@ -144,6 +144,7 @@ object BloopDefaults { | |||
Option(System.getProperty("bloop.export-jar-classifiers")) | |||
.orElse(Option(System.getenv("BLOOP_EXPORT_JAR_CLASSIFIERS"))) | |||
.map(_.split(",").toSet) | |||
.orElse(Some(Set("sources", "javadoc"))) |
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.
@tgodzik sources
classifier is useful for metals, but is javadoc
useful? I do wonder if this isn't too much, wdyt?
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.
It might be useful in some potential cases, though it's unused currently in Metal
As a power user I often use
bloopInstall
from already opened sbt session as it is much faster thanMetals: Import Build
(warm JVM with sbt, etc.). However, there is one main advantage thatMetals: Import Build
has - it runs sbt with-Dbloop.export-jar-classifiers=sources
.Even though it is possible to configure bloop's sbt plugin to download sources, by tweaking build.sbt I don't consider it as a viable option because:
Not having sources for dependencies results in really bad UX in Metals, as they can't e.g. go to the definition of given class. They instead fail silently, or go to the completely different class which happens to have the same symbol name.
I do understand that this may lead to slightly longer downloading times, but I think it's better to sacrifice a bit of time once, rather than UX every time when there are no sources.