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
Looking at the last change that was made to this code in
com-lihaoyi@65fbd53
it's not clear to me why this line was added where we map everything to
`BspModule` and then filtering the build targets on that which where in
the request. My assumption is that anything that the build client is
requesting to clean _should_ be a valid identifier. If not, then that
originally came from Mill, so I'm unsure why we have this. Before this
change it was causing issues since not everything in `state.rootModules`
was a `BspModule` so you'd get a match exception.
To expand a bit the build targets here in an example `mill-test` (hello
world) project are:
```
BuildTargetIdentifier [
uri = "file:///Users/<me>/Documents/scala-workspace/mill-test/milltest"
],BuildTargetIdentifier [
uri = "file:///Users/<me>/Documents/scala-workspace/mill-test/mill-build"
]
```
But when looking into the `state.rootModules` one of them is
```
/Users/<me>/Documents/scala-workspace/mill-test
```
This was the problematic one. I'm not sure if this is just a mapping
issue or not, but the change I made instead just takes the build target
identifies given from the client, does a look up in the
`state.bspModulesById` mapping, and goes with it. This seems to work and
simplifies this unless this is introducing an issue that I don't see.
closescom-lihaoyi#2915
When using Mill as a BSP server I noticed that I'm getting an internal error when I try to do a clean compile. For example in the logs I see
This then causes the compilation to be cancelled in the clean compile command.
To reproduce
.metals/bsp.trace.json
fileThe text was updated successfully, but these errors were encountered: