Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
steinybot opened this issue Jan 23, 2024 · 1 comment
Open

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

steinybot opened this issue Jan 23, 2024 · 1 comment
Labels

Comments

@steinybot
Copy link
Contributor

steinybot commented Jan 23, 2024

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

@steinybot steinybot added the Bug label Jan 23, 2024
@adpi2
Copy link
Member

adpi2 commented Jan 24, 2024

Thanks for the report! Would you like to open a PR to fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants