-
-
Notifications
You must be signed in to change notification settings - Fork 646
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
add scala_platform to export output for metals! #8370
add scala_platform to export output for metals! #8370
Conversation
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.
This is great! Thank you. I’ll update the Metals PR to use the new Scala platform key if it exists with a fallback to the current workaround.
Thanks, @cosmicexplorer ! looks good. One thing we need to bump the export version from
|
@wisechengyi bumped the export format version and added docs, and also added testing! It required adding a lot of new targets in order to allow the export task to pull the scala platform jars, which will always be injected in a normal pants build, but not in v1 task tests such as this. |
)" This commit failed to pass CI. This reverts commit b6981e5.
#8370 was broken, and I failed to ensure it passed CI before merging it. See e.g. the failure [here](https://travis-ci.org/pantsbuild/pants/jobs/592373373).
…sbuild#8370)" (pantsbuild#8379)" This reverts commit f673fd2.
…antsbuild#8380)" (pantsbuild#8386)" This reverts commit d2bf825.
…8389) ### Problem See #8370. This PR fixes an integration test failure which required reverting in #8379, then we attempted to unrevert in #8380, then was reverted again in #8386. ### Solution - Remove the `--ivy-cache-dir` arguments from the export task invocation in the export integration test. ### Result The test passes!
Problem
We would like to support the Metals VSCode plugin -- see associated PR at scalameta/metals#935. Pants currently does not have any fields which specifically provide the scala version and the compiler jars, so that PR currently iterates over the
libraries
keys, which doesn't provide all the scala compiler jars.Solution
Add a
scala_platform
key to the./pants export
output containing thescala_version
andcompiler_classpath
:Result
Using the branch at https://github.com/cosmicexplorer/language-server/tree/sohamr/add-pants-build-tool (which is based off of scalameta/metals#935), I have been able to show that metals can extract the
scala_platform
from the json!