Skip to content

Sbt doesn't propagate SBT_OPTS to the generated bsp config #7469

@kasiaMarek

Description

@kasiaMarek

steps

  1. Set -Dsbt.boot.directory=<some_path> in SBT_OPTS env variable,
  2. run sbt bspConfig,
  3. run the args generated in the config sbt.json, which in my case look like this: [...]/java -Xms100m -Xmx100m -classpath [...]/sbt-launch.jar -Dsbt.script=[...]/sbt xsbt.boot.Boot -bsp.

problem

-Dsbt.boot.directory=<some_path> option doesn't seem to be propagated to args generated in the bsp config, and the launcher starting the sbt server uses the default sbt.boot.directory.

expectation

SBT_OPTS to be propagated to the generated bsp config where relevant and possibly add the necessary args to the generated config:
[...]/java -Xms100m -Xmx100m -classpath [...]/sbt-launch.jar -Dsbt.script=[...]/sbt -Dsbt.boot.directory=<some_path> xsbt.boot.Boot -bsp

notes

connected to: scalameta/metals#5796

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions