Skip to content

bugfix: ignore out-of-workspace didOpen in fallback (main-v2) - #8738

Open
russwyte wants to merge 3 commits into
scalameta:main-v2from
russwyte:bugfix/no-scala-cli-outside-workspace-v2
Open

bugfix: ignore out-of-workspace didOpen in fallback (main-v2)#8738
russwyte wants to merge 3 commits into
scalameta:main-v2from
russwyte:bugfix/no-scala-cli-outside-workspace-v2

Conversation

@russwyte

@russwyte russwyte commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Port of #8737 onto main-v2 for 2.0 milestones.
  • Fixes #8736: fallback ignores out-of-workspace textDocument/didOpen, clears diagnostics, and skips Scala CLI auto-start / presentation-compiler load.
  • Policy lives in ScalaCliAutoStart and is independent of UserConfiguration.scalaCliEnabled (still opt-in on main-v2). The LSP suite enables scalaCliEnabled so skip assertions are meaningful.

Motivation

Same as #8737: editors can didOpen Scala files outside the workspace folders; Metals previously spawned Scala CLI BSP per orphan and flooded Problems.

Test plan

  • unit/testOnly tests.ScalaCliAutoStartSuite (same policy edges as main, including lexical symlink membership)
  • unit/testOnly tests.OutOfWorkspaceScalaCliLspSuite (outside/sibling/script/non-Scala/repeated outsiders; empty-folder policy against live folder list)
  • Note: full empty-folder Scala CLI auto-start LSP assertion is omitted here because that harness path hangs on main-v2 (SingleFileSuite is already ignored). Policy coverage remains in the unit suite.
  • Reviewers: confirm manual Scala CLI start still works when intentionally enabled

Port of scalameta#8737 for the 2.0 line. Short-circuit fallback didOpen outside
workspace folders, clear diagnostics, and skip Scala CLI auto-start /
presentation-compiler load. Independent of scalaCliEnabled (still
opt-in on main-v2). Fixes scalameta#8736 for milestone builds.
@coderabbitai

coderabbitai Bot commented Jul 26, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 45f29f04-37f3-4824-86c1-ea73f2aa7b26

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@russwyte

Copy link
Copy Markdown
Contributor Author

Backport of #8737 (main / 1.6.x) onto main-v2.

@tgodzik

tgodzik commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

I will be backporting the changes this week in bulk before releasing a new milestone

@tgodzik

tgodzik commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Ach, it's a new one, I will take a look then

russwyte added 2 commits July 29, 2026 07:35
Keep API-only docs, demote ignore logs to debug, and expand unit/LSP
edge cases (including lexical symlink membership) for reviewability.
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.

2 participants