mill
mill copied to clipboard
POC: Make BSP modular and support dynamic extensions
Introduce a BspExtension trait, which holds a class name and it's potential ivy dependencies.
Split up the various BSP server extensions and instantiate them independently. They are now concrete classes with either a default contructor or one accepting the new MillBuildServerBase parameter.
The BspModule now has a new bspExtensions method, which declares what BSP extension should be used to support the module. The extension is loaded via reflection. JavaModule and ScalaModule now explicitly declare their extensions. That means, if no ScalaModule is part of the project, we also should not load the extension.
- Fix https://github.com/com-lihaoyi/mill/issues/2598
- Related discussion: https://github.com/build-server-protocol/build-server-protocol/discussions/651