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

clean .bsp/scala-cli.json when you run clean #369

Merged
merged 2 commits into from
Nov 15, 2021

Conversation

ckipp01
Copy link
Contributor

@ckipp01 ckipp01 commented Nov 10, 2021

I think it might be best to do this when you run clean. I hit on this a
couple times now where something was out of sync or not working which
caused me to attempt to do a scala-cli clean. However, when you clean
it removes the .scala dir, but not the entry that was created in
.bsp/scala-cli.json which still references the
.scala/ide-options.json file which no longer exists after the clean.
Then since the BSP entry still exists, BSP discovery still triggers in
Metals, and then it sends in the initialize request, but scala-cli just
freezes and doesn't respond. This fix just ensures that when you run
scala-cli clean, it cleans up both the .scala/ and also the
.bsp/scala-json.

alexarchambault and others added 2 commits November 15, 2021 10:43
I think it might be best to do this when you run clean. I hit on this a
couple times now where something was out of sync or not working which
caused me to attempt to do a `scala-cli clean`. However, when you clean
it removes the `.scala/` dir, but not the entry that was created in
`.bsp/scala-cli.json` which still references the
`.scala/ide-options.json` file which no longer exists after the clean.
Then since the BSP entry still exists, BSP discovery still triggers in
Metals, and then it sends in the initialize request, but scala-cli just
freezes and doesn't respond. This fix just ensures that when you run
`scala-cli` clean, it cleans up both the `.scala/` and also the
`.bsp/scala-json`.
Copy link
Contributor

@alexarchambault alexarchambault left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ckipp01!

@alexarchambault alexarchambault merged commit 432996e into VirtusLab:master Nov 15, 2021
@ckipp01 ckipp01 deleted the clean-bsp branch November 15, 2021 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants