-
Notifications
You must be signed in to change notification settings - Fork 46
[fix] add support for Scala SDK provided by rules_jvm_external #403
Conversation
Updated the regex used for determing Scala SDK versions to allow the jars to optionally include a 'processed_' prefix. This allows jars provided by rules_jvm_external to be properly matched by ScalaSdkResolver.
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.
thanks a lot, please update changelog as well
Hi @abrams27, I've updated the CHANGELOG (had missed the contributor docs) and have also attempted to fix the formatting error CI was complaining about. |
I recommend to disable stamping (see bazel-contrib/rules_jvm_external#786) Bsp will also have trouble with detecting right jars and source jars for libraries with stamping enabled. |
@lukaszwawrzyk does it mean that this shouldn't be merged or maybe we need something more? |
I mean, for purpose of valid just a valid scala sdk it might be fine. On the other hand I am not sure if it is worth maintaining. |
Hi @lukaszwawrzyk, thanks for the additional background. I've only recently picked From a purely UX perspective, my opinion is that |
To work out of the box, I think it would just need to add this flag to the build. This is not the best, because builds from the command line would invalidate the cache. I guess the documentation is the way to go here. WDYT @abrams27 |
hmm in the perfect scenario we'd like to support such cases out of the box as well, but in this release cycle (till end of the july) scala is not our priority so we dont have enough resources to investigate it deeply; imo we should support it anyway, but maybe not now since u are not sure about it @lukaszwawrzyk - we can include it in the readme for now |
hi, sorry for such delay, thanks a lot for the PR once again! pls rebase it and we are good to go |
okey i managed to fix the changelog |
Thanks for the assist, @abrams27! I unfortunately haven't had the cycles for this PR this week. |
While
bazel-bsp
is able to properly pick up Scala SDK JAR files provided by therules_scala
default toolchain, it currently fails to identify the SDK version when the scala toolchain is configured to use JARs provided byrules_jvm_external
. This occurs becauserules_jvm_external
prepends aprocessed_
prefix to the jar name (source).This PR addresses the above issue by extending the regex in
ScalaSdkResolver
to allow for an optionalprocessed_
prefix.