Skip to content

Is it possible to set bspEnable := false by default? #193

@ckipp01

Description

@ckipp01

There has been a few different issues that have popped up for us over in Metals that boil down to having Jmh set as a build target in BSP terms that cause odd issues that are pretty hard to track down. When .enablePlugins(JmhPlugin) is added to a module, it adds an additional /project/#module/Jmh build target that often errors when buildTarget/sources is sent to sbt when sbt is serving as a BSP server. You can see an example of this here in this issue.

One of the recommendations from the sbt side is:

Ideally the Jmh / bspEnabled := false should be set by the JmhPlugin itself.

This would still cause everything to work as expected with the plugin, but it just wouldn't add the extra Jmh build target for the module when using sbt as a BSP server.

Setting this in the plugin itself is quite easy, but the key only exists in sbt >= 1.4.0. I'm not 100% sure then if it's possibly to set this in the plugin without requiring users to use sbt >= 1.4.0 (which I know isn't ideal), or if there is a fancy way to only set it if using sbt >= 1.4.0.

If there is any other details I can provide for this, please let me know, but it'd be great to have this disabled by default to users that are using it while also using sbt as a BSP server don't get tripped up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions