Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@ematipico
Copy link
Member

Summary

Closes #7296

This PR adds new watcher options that allow users to change the behaviour of the file watcher:

A new option called --watcher-kind that accepts:

  • recommended: the current behaviour, and the default option
  • polling: to use the polling strategy
  • none: to turn off the file watcher of the daemon. Risky, but users have the option

A new option called --watcher-polling-interval that accepts a number, and allows changing the polling interval when the polling option is used.

The reason why polling isn't the default is because it's a breaking change. We can change this in v3 if we want.

I also refactored the logging options so they're the same across commands and aren't repeated. We document which options work in daemon mode and which ones work with the CLI.

The feature is that we now offer environment variables to control the logs, which means that people now can reduce the dump of the logs.

Test Plan

Updated current tests.

Manually tested that the new options work.

Docs

The docs will be automatically updated thanks to the biome_flags crate, which is used in the website.

@changeset-bot
Copy link

changeset-bot bot commented Nov 11, 2025

🦋 Changeset detected

Latest commit: 24e8135

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 14 packages
Name Type
@biomejs/biome Minor
@biomejs/cli-win32-x64 Minor
@biomejs/cli-win32-arm64 Minor
@biomejs/cli-darwin-x64 Minor
@biomejs/cli-darwin-arm64 Minor
@biomejs/cli-linux-x64 Minor
@biomejs/cli-linux-arm64 Minor
@biomejs/cli-linux-x64-musl Minor
@biomejs/cli-linux-arm64-musl Minor
@biomejs/wasm-web Minor
@biomejs/wasm-bundler Minor
@biomejs/wasm-nodejs Minor
@biomejs/backend-jsonrpc Patch
@biomejs/js-api Major

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

@ematipico ematipico requested review from a team November 11, 2025 13:48
@github-actions github-actions bot added A-CLI Area: CLI A-Project Area: project A-LSP Area: language server protocol labels Nov 11, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Nov 11, 2025

CodSpeed Performance Report

Merging #8071 will not alter performance

Comparing feat/watcher-options (24e8135) with next (e90b14f)

Summary

✅ 53 untouched
⏩ 85 skipped1

Footnotes

  1. 85 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 11, 2025

Walkthrough

This PR centralises logging into a new public LogOptions struct (CLI flags and env aliases: --log-file, --log-prefix-name, --log-path, --log-level, --log-kind) and introduces WatcherOptions/WatcherKind (--watcher-kind, --watcher-polling-interval, env aliases). Those options are threaded through CLI commands, daemon spawn/ensure paths, and LSP/watch code. Watcher::new now accepts WatcherOptions; daemon spawn/ensure signatures changed to accept watcher and log option structs. KeyValuePair gains padding/configured constructor and tests/help snapshots updated.

Possibly related PRs

Suggested labels

A-Tooling, A-Core

Suggested reviewers

  • arendjr

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed Title accurately describes the main change: adding watcher options (--watcher-kind and --watcher-polling-interval) for file-watcher configuration control.
Description check ✅ Passed Description clearly explains the motivation (file-locking issues on Windows), the new watcher options, logging refactoring, and testing approach, directly addressing issue #7296.
Linked Issues check ✅ Passed The PR implements a solution to issue #7296 by adding --watcher-kind option with 'none' mode to disable the daemon file watcher, directly addressing Windows file-locking problems that prevent file operations.
Out of Scope Changes check ✅ Passed All changes are in scope: watcher configuration (WatcherOptions, WatcherKind), logging refactoring (LogOptions), CLI integration, and related test updates align with PR objectives and issue requirements.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/watcher-options

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e176612 and 24e8135.

⛔ Files ignored due to path filters (1)
  • crates/biome_cli/tests/snapshots/main_commands_explain/explain_logs.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (1)
  • crates/biome_cli/tests/snap_test.rs (1 hunks)
🧰 Additional context used
🧠 Learnings (11)
📓 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_watcher.rs : WorkspaceWatcher should synchronize workspace state with the filesystem and be active only in daemon mode (not used by the CLI)
📚 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_cli/tests/snap_test.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/../biome_lsp/src/server.tests.rs : Keep end-to-end LSP tests in ../biome_lsp/src/server.tests.rs

Applied to files:

  • crates/biome_cli/tests/snap_test.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_cli/tests/snap_test.rs
📚 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/tests/spec_test.rs : Implement a `run` function in tests/spec_test.rs that wires SpecSnapshot and includes!("language.rs") as shown

Applied to files:

  • crates/biome_cli/tests/snap_test.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_cli/tests/snap_test.rs
📚 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/tests/** : Create a tests directory containing a specs subfolder and the files spec_test.rs, spec_tests.rs, and language.rs

Applied to files:

  • crates/biome_cli/tests/snap_test.rs
📚 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/tests/spec_tests.rs : In tests/spec_tests.rs, generate tests with `tests_macros::gen_tests! {"tests/specs/html/**/*.html", crate::spec_test::run, ""}`

Applied to files:

  • crates/biome_cli/tests/snap_test.rs
📚 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/**/*.rs : Do not attempt to fix code; if a mandatory token/node is missing, return `None` instead

Applied to files:

  • crates/biome_cli/tests/snap_test.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.rs : Implement and expose the Workspace trait in src/workspace.rs

Applied to files:

  • crates/biome_cli/tests/snap_test.rs
📚 Learning: 2025-10-15T09:20:45.587Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_aria_metadata/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:20:45.587Z
Learning: Applies to crates/biome_aria_metadata/**/{build.rs,aria-data.json} : Keep aria-data.json at the expected location/name because build.rs uses it to generate ARIA metadata

Applied to files:

  • crates/biome_cli/tests/snap_test.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). (20)
  • GitHub Check: Documentation
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Bench (biome_graphql_formatter)
  • GitHub Check: End-to-end tests
  • GitHub Check: Check Dependencies
  • GitHub Check: Bench (biome_graphql_parser)
  • GitHub Check: Bench (biome_js_analyze)
  • GitHub Check: Bench (biome_js_formatter)
  • GitHub Check: Bench (biome_configuration)
  • GitHub Check: Bench (biome_module_graph)
  • GitHub Check: autofix
  • GitHub Check: Bench (biome_js_parser)
  • GitHub Check: Bench (biome_package)
  • GitHub Check: Bench (biome_json_parser)
  • GitHub Check: Bench (biome_json_analyze)
  • GitHub Check: Bench (biome_json_formatter)
  • GitHub Check: Bench (biome_css_parser)
  • GitHub Check: Bench (biome_css_formatter)
  • GitHub Check: Bench (biome_css_analyze)
🔇 Additional comments (1)
crates/biome_cli/tests/snap_test.rs (1)

277-278: Inconsistency is real, but purpose unclear—verify against actual logging format.

The replace_biome_dir function (lines 277–278) trims whitespace and adds an explicit space, whereas replace_temp_dir (line 237) preserves the original whitespace. This difference could affect snapshot matching if the logging output contains intentional spacing or indentation.

Confirm whether this divergent handling is intentional for biome cache paths specifically, or if both functions should follow the same approach for consistency.


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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 7

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
crates/biome_flags/src/lib.rs (1)

104-152: Display implementation missing the new environment variables.

The Display implementation for BiomeEnv doesn't include the four newly added environment variables (biome_watcher_kind, biome_watcher_polling_interval, biome_log_level, biome_log_kind). This means they won't be printed when displaying the environment configuration.

Add display logic for the new fields following the existing pattern:

        match self.biome_watcher_kind.value() {
            None => {
                KeyValuePair(self.biome_watcher_kind.name, markup! { <Dim>"unset"</Dim> })
                    .fmt(fmt)?;
            }
            Some(value) => {
                KeyValuePair(self.biome_watcher_kind.name, markup! {{DebugDisplay(value)}})
                    .fmt(fmt)?;
            }
        };

        match self.biome_watcher_polling_interval.value() {
            None => {
                KeyValuePair(
                    self.biome_watcher_polling_interval.name,
                    markup! { <Dim>"unset"</Dim> },
                )
                .fmt(fmt)?;
            }
            Some(value) => {
                KeyValuePair(
                    self.biome_watcher_polling_interval.name,
                    markup! {{DebugDisplay(value)}},
                )
                .fmt(fmt)?;
            }
        };

        match self.biome_log_level.value() {
            None => {
                KeyValuePair(self.biome_log_level.name, markup! { <Dim>"unset"</Dim> })
                    .fmt(fmt)?;
            }
            Some(value) => {
                KeyValuePair(self.biome_log_level.name, markup! {{DebugDisplay(value)}})
                    .fmt(fmt)?;
            }
        };

        match self.biome_log_kind.value() {
            None => {
                KeyValuePair(self.biome_log_kind.name, markup! { <Dim>"unset"</Dim> })
                    .fmt(fmt)?;
            }
            Some(value) => {
                KeyValuePair(self.biome_log_kind.name, markup! {{DebugDisplay(value)}})
                    .fmt(fmt)?;
            }
        }
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e90b14f and 6b6dc52.

⛔ Files ignored due to path filters (9)
  • Cargo.lock is excluded by !**/*.lock and included by **
  • crates/biome_cli/tests/snapshots/main_commands_check/check_help.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_ci/ci_help.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_format/format_help.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_lint/lint_help.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_lsp_proxy/lsp_proxy_help.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_migrate/migrate_help.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_rage/rage_help.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_start/start_help.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (19)
  • .changeset/curly-facts-kick.md (1 hunks)
  • .changeset/every-beers-sleep.md (1 hunks)
  • crates/biome_cli/src/cli_options.rs (0 hunks)
  • crates/biome_cli/src/commands/daemon.rs (6 hunks)
  • crates/biome_cli/src/commands/mod.rs (14 hunks)
  • crates/biome_cli/src/lib.rs (11 hunks)
  • crates/biome_cli/src/logging.rs (2 hunks)
  • crates/biome_cli/src/service/unix.rs (5 hunks)
  • crates/biome_cli/src/service/windows.rs (5 hunks)
  • crates/biome_cli/tests/commands/mod.rs (1 hunks)
  • crates/biome_cli/tests/commands/start.rs (1 hunks)
  • crates/biome_configuration/src/vcs.rs (1 hunks)
  • crates/biome_flags/src/lib.rs (2 hunks)
  • crates/biome_lsp/src/server.tests.rs (4 hunks)
  • crates/biome_service/Cargo.toml (1 hunks)
  • crates/biome_service/src/lib.rs (1 hunks)
  • crates/biome_service/src/scanner.rs (2 hunks)
  • crates/biome_service/src/scanner/watcher.rs (6 hunks)
  • crates/biome_service/src/scanner/watcher.tests.rs (2 hunks)
💤 Files with no reviewable changes (1)
  • crates/biome_cli/src/cli_options.rs
🧰 Additional context used
📓 Path-based instructions (1)
crates/biome_service/../biome_lsp/src/server.tests.rs

📄 CodeRabbit inference engine (crates/biome_service/CONTRIBUTING.md)

Keep end-to-end LSP tests in ../biome_lsp/src/server.tests.rs

Files:

  • crates/biome_lsp/src/server.tests.rs
🧠 Learnings (26)
📓 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_watcher.rs : WorkspaceWatcher should synchronize workspace state with the filesystem and be active only in daemon mode (not used by the CLI)
📚 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/tests/spec_test.rs : Implement a `run` function in tests/spec_test.rs that wires SpecSnapshot and includes!("language.rs") as shown

Applied to files:

  • crates/biome_cli/tests/commands/start.rs
  • crates/biome_cli/tests/commands/mod.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/../biome_lsp/src/server.tests.rs : Keep end-to-end LSP tests in ../biome_lsp/src/server.tests.rs

Applied to files:

  • crates/biome_cli/tests/commands/start.rs
  • crates/biome_cli/tests/commands/mod.rs
  • crates/biome_service/src/scanner.rs
  • crates/biome_service/src/scanner/watcher.tests.rs
  • crates/biome_cli/src/service/unix.rs
  • crates/biome_cli/src/service/windows.rs
  • crates/biome_lsp/src/server.tests.rs
  • crates/biome_cli/src/commands/mod.rs
  • crates/biome_service/Cargo.toml
  • crates/biome_cli/src/commands/daemon.rs
  • crates/biome_cli/src/lib.rs
📚 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/tests/spec_tests.rs : In tests/spec_tests.rs, generate tests with `tests_macros::gen_tests! {"tests/specs/html/**/*.html", crate::spec_test::run, ""}`

Applied to files:

  • crates/biome_cli/tests/commands/start.rs
  • crates/biome_cli/tests/commands/mod.rs
📚 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/tests/** : Create a tests directory containing a specs subfolder and the files spec_test.rs, spec_tests.rs, and language.rs

Applied to files:

  • crates/biome_cli/tests/commands/start.rs
  • crates/biome_cli/tests/commands/mod.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_cli/tests/commands/start.rs
  • crates/biome_cli/tests/commands/mod.rs
  • crates/biome_service/src/scanner.rs
  • crates/biome_service/src/scanner/watcher.tests.rs
  • crates/biome_service/src/scanner/watcher.rs
  • crates/biome_cli/src/service/unix.rs
  • crates/biome_cli/src/service/windows.rs
  • crates/biome_service/src/lib.rs
  • crates/biome_lsp/src/server.tests.rs
  • crates/biome_cli/src/commands/mod.rs
  • crates/biome_service/Cargo.toml
  • crates/biome_cli/src/commands/daemon.rs
📚 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/tests/language.rs : Create tests/language.rs defining `HtmlTestFormatLanguage` and implement the TestFormatLanguage trait

Applied to files:

  • crates/biome_cli/tests/commands/start.rs
📚 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_cli/tests/commands/start.rs
  • crates/biome_cli/tests/commands/mod.rs
  • crates/biome_service/Cargo.toml
📚 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/**/src/lexer/mod.rs : Create a lexer module at crates/<parser_crate>/src/lexer/mod.rs

Applied to files:

  • crates/biome_cli/tests/commands/mod.rs
📚 Learning: 2025-10-15T09:23:33.055Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:23:33.055Z
Learning: Applies to crates/biome_js_type_info/biome_module_graph/src/**/*.rs : Do not copy or clone data between module graph entries (including behind Arc). Each module must avoid holding duplicated data from another module to enable simple invalidation.

Applied to files:

  • crates/biome_cli/tests/commands/mod.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.rs : WorkspaceWatcher should synchronize workspace state with the filesystem and be active only in daemon mode (not used by the CLI)

Applied to files:

  • crates/biome_service/src/scanner.rs
  • crates/biome_service/src/scanner/watcher.rs
  • crates/biome_cli/src/service/unix.rs
  • crates/biome_cli/src/service/windows.rs
  • crates/biome_service/src/lib.rs
  • crates/biome_lsp/src/server.tests.rs
  • crates/biome_cli/src/commands/mod.rs
  • crates/biome_service/Cargo.toml
  • crates/biome_cli/src/commands/daemon.rs
  • crates/biome_cli/src/lib.rs
📚 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_service/src/scanner.rs
  • crates/biome_flags/src/lib.rs
  • crates/biome_cli/src/commands/mod.rs
  • crates/biome_service/Cargo.toml
  • crates/biome_cli/src/lib.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/xtask/codegen/src/*_kinds_src.rs : Add src/<lang>_kinds_src.rs under xtask/codegen that returns a static KindSrc

Applied to files:

  • crates/biome_service/src/scanner.rs
  • crates/biome_configuration/src/vcs.rs
📚 Learning: 2025-10-15T09:21:24.116Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:21:24.116Z
Learning: Prefer implementing the Diagnostic trait via `#[derive(Diagnostic)]`

Applied to files:

  • crates/biome_service/src/scanner.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.rs : Implement and expose the Workspace trait in src/workspace.rs

Applied to files:

  • crates/biome_service/src/scanner.rs
  • crates/biome_service/src/scanner/watcher.rs
  • crates/biome_service/src/lib.rs
  • crates/biome_cli/src/commands/mod.rs
  • crates/biome_service/Cargo.toml
  • crates/biome_cli/src/commands/daemon.rs
📚 Learning: 2025-10-15T09:21:24.116Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:21:24.116Z
Learning: Applies to crates/biome_diagnostics/crates/biome_diagnostics_categories/src/categories.rs : Register any new diagnostic category in `crates/biome_diagnostics_categories/src/categories.rs`

Applied to files:

  • crates/biome_service/src/scanner.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_service/src/scanner.rs
  • crates/biome_service/src/scanner/watcher.rs
  • crates/biome_cli/src/service/unix.rs
  • crates/biome_cli/src/service/windows.rs
  • crates/biome_service/src/lib.rs
  • crates/biome_cli/src/commands/mod.rs
  • crates/biome_service/Cargo.toml
  • crates/biome_cli/src/commands/daemon.rs
  • crates/biome_cli/src/lib.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_service/src/scanner.rs
  • crates/biome_cli/src/service/unix.rs
  • crates/biome_cli/src/service/windows.rs
  • crates/biome_cli/src/commands/mod.rs
  • crates/biome_cli/src/commands/daemon.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_flags/src/lib.rs
  • crates/biome_service/Cargo.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_flags/src/lib.rs
  • crates/biome_service/Cargo.toml
📚 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: Lexer must implement the biome_parser::Lexer trait

Applied to files:

  • crates/biome_lsp/src/server.tests.rs
📚 Learning: 2025-10-15T09:20:45.587Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_aria_metadata/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:20:45.587Z
Learning: Applies to crates/biome_aria_metadata/**/{build.rs,aria-data.json} : Keep aria-data.json at the expected location/name because build.rs uses it to generate ARIA metadata

Applied to files:

  • crates/biome_service/Cargo.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/**/*.rs : Do not attempt to fix code; if a mandatory token/node is missing, return `None` instead

Applied to files:

  • crates/biome_service/Cargo.toml
📚 Learning: 2025-10-15T09:23:33.055Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:23:33.055Z
Learning: Applies to crates/biome_js_type_info/src/{type_info,local_inference,resolver,flattening}.rs : Avoid recursive type structures and cross-module Arcs; represent links between types using TypeReference and TypeData::Reference.

Applied to files:

  • crates/biome_service/Cargo.toml
📚 Learning: 2025-08-05T14:43:29.581Z
Learnt from: dyc3
Repo: biomejs/biome PR: 7081
File: packages/@biomejs/biome/configuration_schema.json:7765-7781
Timestamp: 2025-08-05T14:43:29.581Z
Learning: The file `packages/biomejs/biome/configuration_schema.json` is auto-generated and should not be manually edited or reviewed for schema issues; any changes should be made at the code generation source.

Applied to files:

  • crates/biome_service/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: Use the provided CLI-based debugging flow for the watcher (start daemon, run commands against it, inspect logs in the cache folder)

Applied to files:

  • crates/biome_cli/src/commands/daemon.rs
🧬 Code graph analysis (10)
crates/biome_cli/tests/commands/start.rs (2)
crates/biome_cli/tests/main.rs (1)
  • run_cli (332-347)
crates/biome_cli/tests/snap_test.rs (1)
  • assert_cli_snapshot (407-409)
crates/biome_cli/tests/commands/mod.rs (1)
crates/biome_cli/src/commands/daemon.rs (1)
  • start (27-46)
crates/biome_service/src/scanner.rs (3)
crates/biome_service/src/workspace/server.rs (1)
  • diagnostics (1404-1407)
crates/biome_service/src/scanner/workspace_bridges.rs (1)
  • diagnostics (246-249)
packages/@biomejs/js-api/src/wasm.ts (1)
  • ProjectKey (2-2)
crates/biome_service/src/scanner/watcher.tests.rs (1)
crates/biome_service/src/scanner/watcher.rs (1)
  • new (142-189)
crates/biome_flags/src/lib.rs (1)
crates/biome_service/src/scanner/watcher.rs (1)
  • new (142-189)
crates/biome_cli/src/service/unix.rs (2)
crates/biome_service/src/scanner/watcher.rs (1)
  • new (142-189)
crates/biome_cli/src/service/windows.rs (1)
  • ensure_daemon (189-213)
crates/biome_cli/src/service/windows.rs (3)
crates/biome_cli/src/commands/mod.rs (1)
  • log_options (632-652)
crates/biome_service/src/scanner/watcher.rs (1)
  • new (142-189)
crates/biome_cli/src/service/unix.rs (1)
  • ensure_daemon (131-189)
crates/biome_cli/src/commands/mod.rs (2)
crates/biome_cli/src/lib.rs (1)
  • run (68-313)
crates/biome_cli/src/logging.rs (1)
  • setup_cli_subscriber (74-144)
crates/biome_cli/src/commands/daemon.rs (4)
crates/biome_cli/src/service/unix.rs (2)
  • ensure_daemon (131-189)
  • open_socket (110-125)
crates/biome_cli/src/service/windows.rs (2)
  • ensure_daemon (189-213)
  • open_socket (107-121)
crates/biome_cli/src/commands/mod.rs (1)
  • log_options (632-652)
crates/biome_service/src/scanner/watcher.rs (1)
  • new (142-189)
crates/biome_cli/src/lib.rs (2)
crates/biome_cli/src/commands/mod.rs (2)
  • log_options (632-652)
  • cli_options (610-630)
crates/biome_cli/src/commands/daemon.rs (3)
  • start (27-46)
  • lsp_proxy (121-129)
  • run_server (72-113)
🪛 LanguageTool
.changeset/curly-facts-kick.md

[misspelling] ~44-~44: Did you mean “now”?
Context: ...uce the quantity of these logs, you can know customise it: ```shell BIOME_LOG_LEVEL...

(KNOW_NOW)


[style] ~44-~44: Would you like to use the Oxford spelling “customize”? The spelling ‘customise’ is also correct.
Context: ...he quantity of these logs, you can know customise it: ```shell BIOME_LOG_LEVEL=info biom...

(OXFORD_SPELLING_Z_NOT_S)

.changeset/every-beers-sleep.md

[uncategorized] ~14-~14: Loose punctuation mark.
Context: ...er for the current platform. - polling: uses the polling strategy. - none: it...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~15-~15: Loose punctuation mark.
Context: ...ng: uses the polling strategy. - none`: it doesn't enable the watcher. When the...

(UNLIKELY_OPENING_PUNCTUATION)


[locale-violation] ~15-~15: In British English, the spelling ‘anymore’ is sometimes considered incorrect. Did you mean “any more”?
Context: ...abled, changes to files aren't recorded anymore by Biome. This might have repercussio...

(ANYMORE)

⏰ 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_css_parser)
  • GitHub Check: Bench (biome_css_analyze)
  • GitHub Check: Bench (biome_css_formatter)
  • GitHub Check: autofix
  • GitHub Check: Documentation
  • GitHub Check: End-to-end tests
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Check Dependencies
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: Bench (biome_js_formatter)
  • GitHub Check: Bench (biome_graphql_formatter)
  • GitHub Check: Bench (biome_js_analyze)
  • GitHub Check: Bench (biome_graphql_parser)
  • GitHub Check: Bench (biome_js_parser)
  • GitHub Check: Bench (biome_json_formatter)
  • GitHub Check: Bench (biome_json_analyze)
  • GitHub Check: Bench (biome_json_parser)
  • GitHub Check: Bench (biome_configuration)
  • GitHub Check: Bench (biome_module_graph)
  • GitHub Check: Bench (biome_package)
🔇 Additional comments (11)
crates/biome_service/Cargo.toml (2)

2-12: Formatting changes look good.

The whitespace adjustments in the package metadata, dependencies, and features sections don't introduce functional changes—they appear to be stylistic consistency improvements.

Also applies to: 17-80, 88-103


81-81: All clear — workspace dependency properly configured.

The addition of bpaf follows the correct workspace dependency pattern. It's declared at the workspace root with version 0.9.20 and the ["derive"] feature, and your crate correctly references it with workspace = true. Ship it.

crates/biome_service/src/scanner.rs (1)

32-32: LGTM!

The expanded re-export properly surfaces the new watcher configuration types, enabling consumers to construct and configure watchers with the new options API.

.changeset/every-beers-sleep.md (1)

1-24: Clear documentation of the new watcher options.

The changelog entry accurately describes the new CLI options and their behaviour. The static analysis hints about punctuation and "anymore" are false positives and can be safely ignored.

crates/biome_cli/tests/commands/mod.rs (1)

13-13: LGTM!

Standard module declaration for the new test module.

crates/biome_cli/tests/commands/start.rs (1)

7-23: LGTM!

Standard snapshot test for the start command help output. The test structure aligns with existing patterns in the test suite.

crates/biome_service/src/lib.rs (1)

30-30: LGTM!

The expanded public re-export properly exposes the new watcher configuration API to external consumers.

crates/biome_flags/src/lib.rs (1)

24-27: New environment variables added correctly.

The four new environment variables are properly declared with appropriate names and descriptions.

crates/biome_service/src/scanner/watcher.tests.rs (2)

41-42: LGTM!

Tests correctly updated to use the new WatcherOptions API. Using WatcherOptions::default() is appropriate for these tests.


112-113: LGTM!

Tests correctly updated to use the new WatcherOptions API.

crates/biome_cli/src/lib.rs (1)

324-332: Cheers for piping log options through the runner

Neat to see the log configuration handed to every command runner; this keeps CLI logging consistent without repeating wiring elsewhere.

Copy link
Contributor

@arendjr arendjr left a comment

Choose a reason for hiding this comment

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

Nice work!

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c9da7c2 and db1d032.

⛔ Files ignored due to path filters (16)
  • crates/biome_cli/tests/snapshots/main_commands_check/check_help.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_ci/ci_help.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_format/format_help.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_lint/lint_help.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_lsp_proxy/lsp_proxy_help.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_migrate/migrate_help.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_rage/rage_help.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_rage/rage_ok.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_rage/with_configuration.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_rage/with_formatter_configuration.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_rage/with_jsonc_configuration.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_rage/with_linter_configuration.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_rage/with_malformed_configuration.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_rage/with_no_configuration.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_rage/with_server_logs.snap is excluded by !**/*.snap and included by **
  • crates/biome_cli/tests/snapshots/main_commands_start/start_help.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (13)
  • .changeset/curly-facts-kick.md (1 hunks)
  • .changeset/every-beers-sleep.md (1 hunks)
  • crates/biome_cli/src/commands/daemon.rs (6 hunks)
  • crates/biome_cli/src/commands/mod.rs (14 hunks)
  • crates/biome_cli/src/commands/rage.rs (11 hunks)
  • crates/biome_cli/src/lib.rs (11 hunks)
  • crates/biome_cli/src/logging.rs (2 hunks)
  • crates/biome_cli/src/service/windows.rs (5 hunks)
  • crates/biome_configuration/src/lib.rs (1 hunks)
  • crates/biome_configuration/src/vcs.rs (1 hunks)
  • crates/biome_console/src/utils.rs (1 hunks)
  • crates/biome_flags/src/lib.rs (3 hunks)
  • crates/biome_service/src/scanner/watcher.rs (6 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • .changeset/curly-facts-kick.md
  • crates/biome_cli/src/logging.rs
  • crates/biome_configuration/src/vcs.rs
🧰 Additional context used
🧠 Learnings (18)
📓 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_watcher.rs : WorkspaceWatcher should synchronize workspace state with the filesystem and be active only in daemon mode (not used by the CLI)
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Use the provided CLI-based debugging flow for the watcher (start daemon, run commands against it, inspect logs in the cache folder)
📚 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_flags/src/lib.rs
  • crates/biome_cli/src/commands/rage.rs
  • crates/biome_cli/src/commands/mod.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_flags/src/lib.rs
📚 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_flags/src/lib.rs
📚 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/**/*.rs : Use `dbg_write!` to debug and inspect the emitted IR during formatting

Applied to files:

  • crates/biome_flags/src/lib.rs
  • crates/biome_cli/src/commands/rage.rs
📚 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/lib.rs : Add the provided AsFormat, IntoFormat, and iterator plumbing code to lib.rs

Applied to files:

  • crates/biome_flags/src/lib.rs
📚 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/**/*.rs : Implement the `Format` trait for your node type and use `JsFormatter` with `write!`/`format_args!` to define formatting

Applied to files:

  • crates/biome_flags/src/lib.rs
📚 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/lib.rs : Expose a documented public function `format_node(options: HtmlFormatOptions, root: &HtmlSyntaxNode) -> FormatResult<Formatted<HtmlFormatContext>>` delegating to `biome_formatter::format_node`

Applied to files:

  • crates/biome_flags/src/lib.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.rs : WorkspaceWatcher should synchronize workspace state with the filesystem and be active only in daemon mode (not used by the CLI)

Applied to files:

  • crates/biome_cli/src/commands/daemon.rs
  • crates/biome_cli/src/lib.rs
  • crates/biome_cli/src/commands/mod.rs
  • crates/biome_cli/src/service/windows.rs
  • crates/biome_service/src/scanner/watcher.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_cli/src/commands/daemon.rs
  • crates/biome_cli/src/lib.rs
  • crates/biome_cli/src/commands/mod.rs
  • crates/biome_cli/src/service/windows.rs
  • crates/biome_service/src/scanner/watcher.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/../biome_lsp/src/server.tests.rs : Keep end-to-end LSP tests in ../biome_lsp/src/server.tests.rs

Applied to files:

  • crates/biome_cli/src/commands/daemon.rs
  • crates/biome_cli/src/lib.rs
  • crates/biome_cli/src/commands/mod.rs
  • crates/biome_cli/src/service/windows.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_cli/src/commands/daemon.rs
  • crates/biome_cli/src/commands/mod.rs
  • crates/biome_cli/src/service/windows.rs
  • crates/biome_service/src/scanner/watcher.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_cli/src/commands/daemon.rs
  • crates/biome_cli/src/lib.rs
  • crates/biome_cli/src/commands/mod.rs
  • crates/biome_cli/src/service/windows.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.rs : Implement and expose the Workspace trait in src/workspace.rs

Applied to files:

  • crates/biome_cli/src/commands/daemon.rs
  • crates/biome_cli/src/commands/mod.rs
  • crates/biome_service/src/scanner/watcher.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: Use the provided CLI-based debugging flow for the watcher (start daemon, run commands against it, inspect logs in the cache folder)

Applied to files:

  • crates/biome_cli/src/commands/daemon.rs
📚 Learning: 2025-10-15T09:21:24.116Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:21:24.116Z
Learning: Specify static properties (category, severity, description, message, location, tags) with `#[diagnostic(...)]`

Applied to files:

  • crates/biome_cli/src/commands/rage.rs
📚 Learning: 2025-10-15T09:21:24.116Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:21:24.116Z
Learning: Prefer implementing the Diagnostic trait via `#[derive(Diagnostic)]`

Applied to files:

  • crates/biome_cli/src/commands/rage.rs
📚 Learning: 2025-10-15T09:21:24.116Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_diagnostics/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:21:24.116Z
Learning: `#[derive(Diagnostic)]` is supported on enums; each variant must contain a type that is itself a diagnostic

Applied to files:

  • crates/biome_cli/src/commands/rage.rs
🧬 Code graph analysis (8)
crates/biome_flags/src/lib.rs (3)
crates/biome_service/src/scanner/watcher.rs (2)
  • new (151-198)
  • fmt (68-74)
crates/biome_console/src/utils.rs (3)
  • new (42-44)
  • new (81-83)
  • new (99-101)
crates/biome_cli/src/logging.rs (2)
  • fmt (198-207)
  • fmt (271-277)
crates/biome_console/src/utils.rs (3)
crates/biome_flags/src/lib.rs (4)
  • new (33-68)
  • new (80-82)
  • value (85-87)
  • fmt (105-226)
crates/biome_cli/src/lib.rs (1)
  • new (58-65)
crates/biome_cli/src/commands/rage.rs (9)
  • fmt (78-106)
  • fmt (113-192)
  • fmt (202-369)
  • fmt (375-389)
  • fmt (395-403)
  • fmt (409-411)
  • fmt (417-437)
  • fmt (444-450)
  • fmt (457-464)
crates/biome_cli/src/commands/daemon.rs (3)
crates/biome_cli/src/service/windows.rs (2)
  • ensure_daemon (189-213)
  • open_socket (107-121)
crates/biome_cli/src/service/unix.rs (2)
  • ensure_daemon (131-189)
  • open_socket (110-125)
crates/biome_service/src/scanner/watcher.rs (1)
  • new (151-198)
crates/biome_cli/src/commands/rage.rs (1)
crates/biome_console/src/utils.rs (10)
  • new (42-44)
  • new (81-83)
  • new (99-101)
  • fmt (12-14)
  • fmt (24-33)
  • fmt (48-50)
  • fmt (59-61)
  • fmt (70-72)
  • fmt (87-92)
  • fmt (110-123)
crates/biome_cli/src/lib.rs (3)
crates/biome_cli/src/commands/rage.rs (1)
  • rage (25-73)
crates/biome_cli/src/commands/daemon.rs (3)
  • start (27-46)
  • lsp_proxy (124-132)
  • run_server (72-116)
crates/biome_cli/src/commands/mod.rs (2)
  • log_options (632-652)
  • cli_options (610-630)
crates/biome_cli/src/commands/mod.rs (2)
crates/biome_service/src/scanner/watcher.rs (1)
  • default (47-52)
crates/biome_cli/src/logging.rs (2)
  • default (74-82)
  • setup_cli_subscriber (85-155)
crates/biome_cli/src/service/windows.rs (4)
crates/biome_cli/src/commands/mod.rs (1)
  • log_options (632-652)
crates/biome_service/src/scanner/watcher.rs (2)
  • new (151-198)
  • default (47-52)
crates/biome_cli/src/service/unix.rs (1)
  • ensure_daemon (131-189)
crates/biome_cli/src/logging.rs (1)
  • default (74-82)
crates/biome_service/src/scanner/watcher.rs (3)
crates/biome_service/src/scanner/workspace_bridges.rs (2)
  • notify (85-85)
  • new (190-192)
crates/biome_flags/src/lib.rs (2)
  • new (33-68)
  • new (80-82)
crates/biome_service/src/scanner.rs (2)
  • new (122-128)
  • new (629-637)
🪛 LanguageTool
.changeset/every-beers-sleep.md

[uncategorized] ~14-~14: Loose punctuation mark.
Context: ...er for the current platform. - polling: uses the polling strategy. - none: it...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~15-~15: Loose punctuation mark.
Context: ...ng: uses the polling strategy. - none`: it doesn't enable the watcher. When the...

(UNLIKELY_OPENING_PUNCTUATION)


[locale-violation] ~15-~15: In British English, the spelling ‘anymore’ is sometimes considered incorrect. Did you mean “any more”?
Context: ...abled, changes to files aren't recorded anymore by Biome. This might have repercussio...

(ANYMORE)

⏰ 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). (17)
  • GitHub Check: Check Dependencies
  • GitHub Check: Documentation
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: Bench (biome_graphql_parser)
  • GitHub Check: Bench (biome_graphql_formatter)
  • GitHub Check: Bench (biome_css_formatter)
  • GitHub Check: Bench (biome_css_analyze)
  • GitHub Check: Bench (biome_css_parser)
  • GitHub Check: Bench (biome_module_graph)
  • GitHub Check: Bench (biome_json_analyze)
  • GitHub Check: Bench (biome_js_formatter)
  • GitHub Check: autofix
  • GitHub Check: Bench (biome_json_parser)
  • GitHub Check: Bench (biome_js_parser)
  • GitHub Check: Bench (biome_json_formatter)
  • GitHub Check: Bench (biome_configuration)
  • GitHub Check: Bench (biome_js_analyze)
🔇 Additional comments (17)
crates/biome_flags/src/lib.rs (2)

19-28: LGTM!

The new environment variable fields follow the existing naming conventions and type patterns consistently.


104-106: Nice refactoring: consistent padding applied throughout.

The introduction of a padding constant and consistent application via .with_padding(padding) improves maintainability. The increase to 35 appropriately accommodates the longer environment variable names.

Also applies to: 109-116, 121-134, 166-173, 179-186

crates/biome_configuration/src/lib.rs (1)

474-476: LGTM!

Clean migration to the new KeyValuePair::new() constructor pattern.

crates/biome_console/src/utils.rs (1)

96-107: Well-structured builder pattern.

The refactor from a tuple struct to a proper struct with dedicated constructor and builder method improves ergonomics. The default padding of 30 is sensible and matches existing usage patterns seen in the codebase.

crates/biome_service/src/scanner/watcher.rs (2)

46-53: Manual Default correctly addresses previous concern.

The explicit Default implementation ensures polling_interval defaults to 2000 ms, matching the bpaf fallback. This resolves the previous issue where the derived Default would have set it to 0.


169-185: Robust watcher initialization with proper None handling.

The match on WatcherKind correctly initialises the appropriate watcher strategy or None when disabled. The Option<Box<dyn NotifyWatcher + Send>> pattern enables clean early returns in run() and guards in watch/unwatch methods.

crates/biome_cli/src/service/windows.rs (1)

71-103: Consistent daemon spawn wiring.

The updated signatures and command-line argument construction correctly propagate WatcherOptions and LogOptions through the Windows daemon spawn path, matching the Unix implementation.

.changeset/every-beers-sleep.md (1)

1-24: Clear documentation of new watcher options.

The changelog effectively communicates the new functionality, defaults, and environment variable aliases. The explanation of each option's behaviour is concise and helpful.

crates/biome_cli/src/commands/rage.rs (1)

38-463: Comprehensive migration to new KeyValuePair API.

All instances throughout the rage command have been consistently updated to use KeyValuePair::new(). The changes maintain the existing formatting and output structure.

crates/biome_cli/src/lib.rs (1)

322-330: LogOptions cleanly threaded through command execution.

The updated run_command signature and all call sites consistently propagate log_options, centralising logging configuration across CLI commands.

crates/biome_cli/src/commands/daemon.rs (2)

77-87: Tracing initialisation order corrected.

The subscriber is now set up before creating the span, ensuring the span is properly recorded. This addresses the previous review concern where the span was created whilst NoSubscriber was still active.


72-116: Robust daemon startup with structured configuration.

The run_server function now cleanly accepts WatcherOptions and LogOptions, initialises tracing properly, creates the watcher with configuration, and orchestrates daemon lifecycle. The shutdown handling via tokio::select! remains sound.

crates/biome_cli/src/commands/mod.rs (5)

5-6: LGTM!

The new imports for centralised logging and watcher configuration are properly added.

Also applies to: 53-53


86-86: LGTM!

The log_options and watcher_options fields are threaded through command variants consistently. Daemon-related commands correctly include watcher_options as per the learning that watchers are only active in daemon mode.

Also applies to: 100-104, 162-162, 253-253, 351-351, 417-417, 459-463, 472-472, 503-503, 570-577


692-700: LGTM!

The log_level() and log_kind() methods are correctly updated to use the new log_options() accessor with appropriate defaults.


897-908: LGTM!

The CommandRunner::run signature is correctly updated to accept the consolidated LogOptions, and the subscriber setup properly uses its fields. Since this is a pub(crate) trait, the breaking change only affects internal code.


632-652: Need to verify if anything actually calls the log_options() accessor on these daemon commands:


Based on verification, the log_options() accessor correctly returns None for daemon commands. These commands—Start, LspProxy, and RunServer—don't expose their log options through the accessor because they pass log_options directly as function parameters to their respective daemon handlers (in daemon.rs). This is intentional design: daemon commands bypass the accessor and manage logging directly, whilst other commands use the centralised accessor method. No inconsistency detected.

ematipico and others added 4 commits November 11, 2025 14:36
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@ematipico ematipico added this to the Biome v2.4 milestone Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CLI Area: CLI A-LSP Area: language server protocol A-Project Area: project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants