Skip to content

sbt -bsp will exit silently if autoStartServer := false is set #7481

@steinybot

Description

@steinybot

steps

  1. set autoStartServer := false
  2. attempt to import project with IntelliJ

problem

It will fail to import without any obvious error.

expectation

It should be able to be imported by IntelliJ.

Similarly, when sbt is being run with -bsp if finds no server running it should reliably start it.

notes

The problem with this is that unless you read all of the build configuration before trying to import the project you have no idea whether or not this might be set. Even if you did know then you may not realise the implications.

I spent about a day trying to figure out why I couldn't import ScalablyTyped/Converter@92885d6...

It looks as though running sbt -bsp will attempt to start sbt server. It passes the --server option to the script. If --server is given then autoStartServer should be ignored. It is not an auto start situation, it is a manual start.

See also https://youtrack.jetbrains.com/issue/SCL-20474/Unable-to-import-BSP-project

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