Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

Warn users if no lockfile is detected on the configured workspace #945

Merged
merged 1 commit into from
Dec 19, 2023

Conversation

vinistock
Copy link
Member

Motivation

Closes Shopify/ruby-lsp#1691, closes Shopify/ruby-lsp#1693

The change to support multi-root workspaces is causing some confusion for users. Previously, because we always activated the LSP on the first workspace folder entry, the LSP would "work" even in a monorepo without proper multi-root configuration. It would not find the bundle and then just start as if you had none.

Now, with adequate multi-root support, we don't activate if the workspace doesn't include a bundle. We can do better to direct users into applying the proper configurations.

Implementation

My proposed solution is to show a warning when we try to activate the LSP in a workspace that doesn't contain a bundle, allowing the user to take 3 actions:

  • Launch the LSP anyway. This will simply ignore the fact that we didn't find a bundle and the LSP will be launched on its own. This is still useful for scripts
  • See the documentation for multi-root workspaces and monorepos, so that they can configure VS Code to identify each directory as a workspace
  • Permanently ignore this warning and always launch the LSP

@vinistock vinistock added the enhancement New feature or request label Dec 14, 2023
@vinistock vinistock self-assigned this Dec 14, 2023
@vinistock vinistock requested a review from a team as a code owner December 14, 2023 18:49
src/rubyLsp.ts Outdated Show resolved Hide resolved
src/rubyLsp.ts Outdated Show resolved Hide resolved
src/rubyLsp.ts Show resolved Hide resolved
src/rubyLsp.ts Outdated Show resolved Hide resolved
src/rubyLsp.ts Outdated Show resolved Hide resolved
@vinistock vinistock merged commit 2611f46 into main Dec 19, 2023
10 checks passed
@vinistock vinistock deleted the vs/warn_on_missing_lockfile branch December 19, 2023 14:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
2 participants