-
-
Notifications
You must be signed in to change notification settings - Fork 302
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change improves the editing experience for `build.sc` files in Metals. We now rudimentary detect ammonite includes (`$file` and `$ivy`). We somewhat break the BSP protocol now, as we return `sources` as paths to single files instead of directories. It is known, that IDEA does not handle it well, but Metals seems to have no problem with it. We don't report directories as the `build.sc` is located in the project top-level directory, and it would contain all other project files too, which is definitely not what we want. Also I refined the module dependencies: `compileIvyDeps` now returns Mill-provided fixed dependencies, `ivyDeps` returns all extra resources included via Ammonite `$ivy` imports, and `scalacPluginIvyDeps` now includes Mill own compiler plugins which among other things make the `override` keyword optional. I also restructured some source files in `mill.scalalib.bsp` package. Fixed the overridden-check for `compiledClassesAndSemanticDbFiles`. This should significantly speed things up for larger projects. Pull request: #2291
- Loading branch information
Showing
12 changed files
with
299 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package mill.scalalib.bsp | ||
|
||
case class BspBuildTarget( | ||
displayName: Option[String], | ||
baseDirectory: Option[os.Path], | ||
tags: Seq[String], | ||
languageIds: Seq[String], | ||
canCompile: Boolean, | ||
canTest: Boolean, | ||
canRun: Boolean, | ||
canDebug: Boolean | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package mill.scalalib.bsp | ||
|
||
case class BspUri(uri: String) | ||
|
||
object BspUri { | ||
def apply(path: os.Path): BspUri = BspUri(path.toNIO.toUri.toString) | ||
} |
Oops, something went wrong.