You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
For build tools that support large monorepos (such as Bazel, Blaze, Pants, Buck, etc) it's typical to have multiple output paths, per build target. Classes, and semanticdb files, are partitioned into different chunks (for different subdirectories), and stored in different places across the filesystem.
Currently Metals is assuming that a single output path is used per BuildTarget (in ScalacOptionsItem.classDirectory). This means that these tools have to resort to ad-hoc solutions, such as copying (or linking) these targets into a single directory.
Describe the solution you'd like
Instead of using a single target output path, support a List[Uri] output locations instead. Either ScalacOptionsItem could be be modified to support this. Or the meaning of OutputPathsRequest could be revisited.
Describe alternatives you've considered
The alternative is to copy (or soft link) the various output paths into a single directory for Metals.
This has a few downsides:
Since this is a problem for several build tools, it's undesirable to push the solution to each of them (where it'll have to be re-solved each time).
In some cases, the solution can be expensive. Sometimes the only option is to copy the separate output locations, into the single directory. This is very expensive for large monorepos.
Additional context
No response
Search terms
Bazel, classDirectory
The text was updated successfully, but these errors were encountered:
This limitation affects also the Mill BSP implementation. Mill is generating semanticDB into a different location than the compiled class-files and needs to work around this issue by copying all files into a third directory.
Is your feature request related to a problem? Please describe.
For build tools that support large monorepos (such as Bazel, Blaze, Pants, Buck, etc) it's typical to have multiple output paths, per build target. Classes, and semanticdb files, are partitioned into different chunks (for different subdirectories), and stored in different places across the filesystem.
Currently Metals is assuming that a single output path is used per BuildTarget (in
ScalacOptionsItem.classDirectory
). This means that these tools have to resort to ad-hoc solutions, such as copying (or linking) these targets into a single directory.Describe the solution you'd like
Instead of using a single target output path, support a
List[Uri]
output locations instead. Either ScalacOptionsItem could be be modified to support this. Or the meaning of OutputPathsRequest could be revisited.Describe alternatives you've considered
The alternative is to copy (or soft link) the various output paths into a single directory for Metals.
This has a few downsides:
Additional context
No response
Search terms
Bazel, classDirectory
The text was updated successfully, but these errors were encountered: