- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 741
 
feat(lsp): report progress while scanning the project #7961
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
base: next
Are you sure you want to change the base?
Conversation
          🦋 Changeset detectedLatest commit: 8a68fd9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 14 packages
 Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR  | 
    
          
CodSpeed Performance ReportMerging #7961 will not alter performanceComparing  Summary
 Footnotes
  | 
    
          
WalkthroughAdds a changeset file bumping @biomejs/biome. Introduces the  Suggested labels
 Suggested reviewers
 Pre-merge checks and finishing touches✅ Passed checks (2 passed)
 ✨ Finishing touches
 🧪 Generate unit tests (beta)
 📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
 🧰 Additional context used📓 Path-based instructions (2)**/*.{rs,toml}📄 CodeRabbit inference engine (CONTRIBUTING.md) 
 Files: 
 **/*.rs📄 CodeRabbit inference engine (CONTRIBUTING.md) 
 Files: 
 🧠 Learnings (5)📓 Common learnings📚 Learning: 2025-10-15T09:25:05.698ZApplied to files: 
 📚 Learning: 2025-10-15T09:25:05.698ZApplied to files: 
 📚 Learning: 2025-10-15T09:22:46.002ZApplied to files: 
 📚 Learning: 2025-10-15T09:25:05.698ZApplied to files: 
 ⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (22)
 🔇 Additional comments (2)
 Comment   | 
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
crates/biome_lsp/src/session.rs (1)
691-759: Solid progress reporting implementation.The code correctly checks client capabilities, creates unique progress tokens using UUID v4, and properly manages the progress lifecycle. The silent error handling on line 709 (
.ok()) forWorkDoneProgressCreateis appropriate since progress reporting is optional.One consideration: the progress indicator shows only begin/end states without intermediate updates during scanning. For projects with lengthy scans, adding periodic progress updates (e.g., reporting file count or percentage) could improve user experience, but the current implementation is perfectly acceptable.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lockand included by**
📒 Files selected for processing (4)
.changeset/clever-clocks-decide.md(1 hunks)Cargo.toml(1 hunks)crates/biome_lsp/Cargo.toml(1 hunks)crates/biome_lsp/src/session.rs(3 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{rs,toml}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Format Rust and TOML files before committing (e.g., via
just f)
Files:
crates/biome_lsp/Cargo.tomlcrates/biome_lsp/src/session.rsCargo.toml
{Cargo.toml,crates/**/Cargo.toml}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
{Cargo.toml,crates/**/Cargo.toml}: Use workspace dependencies for internal crates (setworkspace = truein Cargo.toml)
Use path dependencies for dev-dependencies to avoid relying on published versions
During releases, update all crates to the same version in their Cargo.toml files
Files:
crates/biome_lsp/Cargo.tomlCargo.toml
**/*.rs
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Document rules, assists, and their options with inline rustdoc in the Rust source
Files:
crates/biome_lsp/src/session.rs
.changeset/*.md
📄 CodeRabbit inference engine (CONTRIBUTING.md)
.changeset/*.md: In changeset files, only use #### or ##### headers
Changesets should describe user-facing changes; internal-only changes do not need changesets
Use past tense for what you did in the changeset description and present tense for current behavior
For bug fixes, start the changeset description with a link to the issue (e.g., Fixed #1234: ...)
When referencing a rule or assist in a changeset, include a link to the rule/assist page on the website
Include a code block in the changeset when applicable to illustrate the change
End every sentence in a changeset with a full stop (.)
Files:
.changeset/clever-clocks-decide.md
🧠 Learnings (14)
📓 Common learnings
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace.rs : Implement and expose the Workspace trait in src/workspace.rs
📚 Learning: 2025-10-26T15:28:00.951Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-10-26T15:28:00.951Z
Learning: Applies to {Cargo.toml,crates/**/Cargo.toml} : Use workspace dependencies for internal crates (set `workspace = true` in Cargo.toml)
Applied to files:
crates/biome_lsp/Cargo.tomlCargo.toml
📚 Learning: 2025-10-15T09:22:46.002Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:46.002Z
Learning: Applies to crates/biome_js_formatter/**/Cargo.toml : Declare the dependency `biome_js_formatter = { version = "0.0.1", path = "../biome_js_formatter" }` for internal installation
Applied to files:
crates/biome_lsp/Cargo.tomlCargo.toml
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/**/Cargo.toml : Add the specified dev-dependencies under [dev-dependencies] for the test infrastructure
Applied to files:
crates/biome_lsp/Cargo.tomlCargo.toml
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace.rs : Implement and expose the Workspace trait in src/workspace.rs
Applied to files:
crates/biome_lsp/Cargo.tomlcrates/biome_lsp/src/session.rs
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace/watcher.tests.rs : Place watcher tests related to workspace methods in src/workspace/watcher.tests.rs
Applied to files:
crates/biome_lsp/Cargo.tomlcrates/biome_lsp/src/session.rs
📚 Learning: 2025-10-26T15:28:00.951Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-10-26T15:28:00.951Z
Learning: Applies to {Cargo.toml,crates/**/Cargo.toml} : Use path dependencies for dev-dependencies to avoid relying on published versions
Applied to files:
crates/biome_lsp/Cargo.tomlCargo.toml
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/../biome_lsp/src/server.tests.rs : Keep end-to-end LSP tests in ../biome_lsp/src/server.tests.rs
Applied to files:
crates/biome_lsp/Cargo.tomlcrates/biome_lsp/src/session.rs
📚 Learning: 2025-10-15T09:24:31.042Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/crates/biome_*_{syntax,factory}/** : Create per-language crates biome_<lang>_syntax and biome_<lang>_factory under crates/
Applied to files:
crates/biome_lsp/Cargo.toml
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/**/*.rs : After generation, remove usages of `format_verbatim_node` and implement real formatting with biome_formatter utilities
Applied to files:
crates/biome_lsp/Cargo.toml
📚 Learning: 2025-10-24T21:24:58.650Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-10-24T21:24:58.650Z
Learning: Applies to crates/biome_analyze/crates/biome_rule_options/lib/**/*.rs : When schema feature is enabled, derive schemars::JsonSchema for options and related enums
Applied to files:
crates/biome_lsp/Cargo.toml
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace/server.rs : WorkspaceServer must maintain workspace state and is used in the daemon and CLI daemonless mode
Applied to files:
crates/biome_lsp/src/session.rs
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace/client.rs : WorkspaceClient is for creating connections to the daemon and communicating with WorkspaceServer
Applied to files:
crates/biome_lsp/src/session.rs
📚 Learning: 2025-10-26T15:28:00.951Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-10-26T15:28:00.951Z
Learning: Applies to .changeset/*.md : Changesets should describe user-facing changes; internal-only changes do not need changesets
Applied to files:
.changeset/clever-clocks-decide.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (21)
- GitHub Check: Bench (biome_graphql_formatter)
 - GitHub Check: Bench (biome_graphql_parser)
 - GitHub Check: Bench (biome_js_formatter)
 - GitHub Check: Bench (biome_js_analyze)
 - GitHub Check: Bench (biome_js_parser)
 - GitHub Check: Bench (biome_json_formatter)
 - GitHub Check: Bench (biome_css_parser)
 - GitHub Check: Bench (biome_module_graph)
 - GitHub Check: autofix
 - GitHub Check: Bench (biome_json_analyze)
 - GitHub Check: Bench (biome_json_parser)
 - GitHub Check: Documentation
 - GitHub Check: Bench (biome_css_formatter)
 - GitHub Check: Bench (biome_css_analyze)
 - GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
 - GitHub Check: Test (depot-ubuntu-24.04-arm-16)
 - GitHub Check: Check Dependencies
 - GitHub Check: Test (depot-windows-2022-16)
 - GitHub Check: Lint project (depot-windows-2022)
 - GitHub Check: Bench (biome_package)
 - GitHub Check: Bench (biome_configuration)
 
🔇 Additional comments (4)
crates/biome_lsp/Cargo.toml (1)
40-40: LGTM!The dependency correctly uses workspace configuration and specifies the v4 feature needed for generating random progress tokens.
.changeset/clever-clocks-decide.md (1)
1-5: Well-crafted changeset.Clear description of the user-facing improvement. The present tense and full stop are correctly applied per guidelines.
crates/biome_lsp/src/session.rs (1)
50-50: LGTM!UUID import added to support progress token generation.
Cargo.toml (1)
244-244: No action required—uuid is already on the latest version.The verification confirms that
uuid1.18.1 is the current latest version on crates.io, and there are no security vulnerabilities. The dependency is up-to-date and secure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
crates/biome_lsp/src/session.rs (1)
728-728: Consider a more descriptive progress message.The message could indicate the scan type or project being scanned, e.g.,
format!("Biome is scanning the project ({scan_kind:?})"), though the current message is perfectly adequate.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lockand included by**
📒 Files selected for processing (2)
Cargo.toml(1 hunks)crates/biome_lsp/src/session.rs(3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- Cargo.toml
 
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{rs,toml}
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Format Rust and TOML files before committing (e.g., via
just f)
Files:
crates/biome_lsp/src/session.rs
**/*.rs
📄 CodeRabbit inference engine (CONTRIBUTING.md)
Document rules, assists, and their options with inline rustdoc in the Rust source
Files:
crates/biome_lsp/src/session.rs
🧠 Learnings (5)
📓 Common learnings
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace.rs : Implement and expose the Workspace trait in src/workspace.rs
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace/server.rs : WorkspaceServer must maintain workspace state and is used in the daemon and CLI daemonless mode
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/../biome_lsp/src/server.tests.rs : Keep end-to-end LSP tests in ../biome_lsp/src/server.tests.rs
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace/watcher.tests.rs : Place watcher tests related to workspace methods in src/workspace/watcher.tests.rs
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace/client.rs : WorkspaceClient is for creating connections to the daemon and communicating with WorkspaceServer
Learnt from: CR
Repo: biomejs/biome PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-10-26T15:28:00.951Z
Learning: Applies to {Cargo.toml,crates/**/Cargo.toml} : Use workspace dependencies for internal crates (set `workspace = true` in Cargo.toml)
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_parser/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:24:31.042Z
Learning: Applies to crates/biome_parser/crates/biome_*_{syntax,factory}/** : Create per-language crates biome_<lang>_syntax and biome_<lang>_factory under crates/
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace.rs : Implement and expose the Workspace trait in src/workspace.rs
Applied to files:
crates/biome_lsp/src/session.rs
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace/client.rs : WorkspaceClient is for creating connections to the daemon and communicating with WorkspaceServer
Applied to files:
crates/biome_lsp/src/session.rs
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace/server.rs : WorkspaceServer must maintain workspace state and is used in the daemon and CLI daemonless mode
Applied to files:
crates/biome_lsp/src/session.rs
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace/watcher.tests.rs : Place watcher tests related to workspace methods in src/workspace/watcher.tests.rs
Applied to files:
crates/biome_lsp/src/session.rs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (22)
- GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
 - GitHub Check: Test (depot-ubuntu-24.04-arm-16)
 - GitHub Check: Test (depot-windows-2022-16)
 - GitHub Check: End-to-end tests
 - GitHub Check: Documentation
 - GitHub Check: Lint project (depot-windows-2022)
 - GitHub Check: Check Dependencies
 - GitHub Check: Bench (biome_configuration)
 - GitHub Check: Bench (biome_css_formatter)
 - GitHub Check: Bench (biome_css_parser)
 - GitHub Check: Bench (biome_css_analyze)
 - GitHub Check: Bench (biome_json_parser)
 - GitHub Check: Bench (biome_js_parser)
 - GitHub Check: Bench (biome_json_analyze)
 - GitHub Check: Bench (biome_json_formatter)
 - GitHub Check: Bench (biome_js_formatter)
 - GitHub Check: Bench (biome_js_analyze)
 - GitHub Check: autofix
 - GitHub Check: Bench (biome_module_graph)
 - GitHub Check: Bench (biome_package)
 - GitHub Check: Bench (biome_graphql_parser)
 - GitHub Check: Bench (biome_graphql_formatter)
 
🔇 Additional comments (1)
crates/biome_lsp/src/session.rs (1)
50-50: LGTM!Clean import for UUID generation. The v4 UUIDs work nicely as unique progress tokens.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet!
Summary
The scanner can take a long time depending on the project size and its structure. All other instructions including formatting and code actions won't work until the scanning is finished. By using the
$/progressnotification, we can let the user know the scanner is running and taking a while.Test Plan
Tested on my machine with VS Code.
Docs
Added a changeset.