-
-
Notifications
You must be signed in to change notification settings - Fork 354
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
fix sourceItem for mill-build #1349
Conversation
due to hardcode `sourceItem(evaluator.rootModule.millSourcePath / "src", generated = false)`, Metals not recognize build.sc as source file when user choose mill-bsp build server, no auto-complete and hover tooltips available This commit fix com-lihaoyi#1159
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 hardcodes the build file, which is ok, but will miss any included file.
E.g. in mill we have some additional files:
import $file.ci.shared
import $file.ci.upload
Those will still be missing.
Won't those be imported by regular ammonite support? |
AFAIK, mill BSP server does not provide any "regular" ammonite support (yet, see #971). So, either you mean the native support of your editor, or some separately started ammonite BSP server. But neither will have any knowledge of the right classpath to be used. |
I was thinking of the editor support. But I forgot about that point, that if the separate files depend on the classpath as well, that support won't be enough. Does Ammonite have anything that lets us obtain a list of |
I don't know Ammonite well enough, but I think the answer is yet. Ammonite itself seems to provide BSP support, so the best would be to look into that implementation. Back to this concrete PR, as |
set source path to https://build-server-protocol.github.io/docs/specification.html#build-target-sources-request
|
The path will be translated to an absolute path, though? Which would end with a forward slash. Ah, but every document could be considered to belong to the build target. That is obviously a problem. |
|
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.
Thank you!
due to hardcode
sourceItem(evaluator.rootModule.millSourcePath / "src", generated = false)
,Metals not recognize build.sc as source file when user choose mill-bsp build server,
no auto-complete and hover tooltips available
This commit fix #1159