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

[POC] Start Bloop using bloop-rifle from Scala CLI… #4103

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

alexarchambault
Copy link
Contributor

…rather than the launcher module from Bloop. See scalacenter/bloop#1753 for context.

bloop-rifle from Scala CLI is somehow a clean rewrite of both the launcher and the bloopgun modules of Bloop. It starts / stop Bloop servers, runs Bloop commands via the nailgun protocol, and opens BSP connections to the Bloop server.

Note that this PR isn't ready to be merged yet: bloop-rifle currently requires Java 17 to work well (for its domain socket support, but also to start the Bloop daemon too, that also needs this support). So this should wait until Metals switches to it. This also starts Scala CLI's own Bloop fork, so we should rather wait until Bloop mainline and this fork converged.

The bloop-rifle module from Scala CLI should be moved to a repository of its own, and be polished from there, so that it's not too tied to Scala CLI. Some directory conventions are hard-coded in this PR, and should rather live in bloop-rifle.

Note that this doesn't make Metals use the same server instance as Scala CLI yet. In the PR here, I tried to settle for shared conventions for Bloop directories (location of the directory containing the nailgun socket file, the PID file, the server output file, and location of the directory containing BSP socket files). Scala CLI doesn't use these directories yet, but puts these in directories of its own for now.

@ckipp01 ckipp01 changed the title Start Bloop using bloop-rifle from Scala CLI… [POC] Start Bloop using bloop-rifle from Scala CLI… Jan 2, 2023
@ckipp01 ckipp01 added up for debate Discussion about a decision to be made BSP Generic BSP related tickets bloop Bloop related tickets labels Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bloop Bloop related tickets BSP Generic BSP related tickets up for debate Discussion about a decision to be made
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants