scalameta / metals-feature-requests

Issue tracker for Metals feature requests
37 stars 4 forks source link

Add support for custom bloopInstall scripts #359

Open crt-31 opened 1 year ago

crt-31 commented 1 year ago

Is your feature request related to a problem? Please describe.

Metals should have a way to configure a custom bloopInstall script or program. This would mean that on 'import build' Metals would call this script (which would create the bloop json files), and then Metals would then use Bloop as the build server.

Describe the solution you'd like

I'd envision adding some fields to the *.bsp file: maybe add a field called "type" and set it to "bloop", and then have another field called "bloopInstallScript". Maybe could have other parameters to configure the bloop like bloopDir, etc. Putting in a .bsp file would be natural and allow for multiple different ones.

The main purpose of this feature would be for build tools that are not currently directly supported by Metals (i.e. being developed or experimenting, or just want to be separate), to have a way for them to generate the bloop json files in same way as the supported tools do.

Thanks.

Describe alternatives you've considered

.

Additional context

No response

Search terms

bloopInstall bloop custom

tgodzik commented 1 year ago

Thanks for reporting! Potentially, you should be able to reuse one of the existing scripts in the settings such the one for mill or maven and just ignore the arguments metals sends. This is a workaround though.

In the future we might want to merge the setting into one with type (be it mill, maven, sbt, gradle or other) and with other you could potentially define the whole command.

tgodzik commented 1 year ago

Thanks for reporting! Potentially, you should be able to reuse one of the existing scripts in the settings such the one for mill or maven and just ignore the arguments metals sends. This is a workaround though.

Although you would also need a fake pom.xml or build.sc :/ for metals to detect it as such