Conversation
|
Merging this PR will not alter performance
Comparing Footnotes
|
WalkthroughThe PR makes CLI parsing optional in the biome_configuration crate by adding a new Suggested reviewers
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
crates/biome_configuration/src/lib.rs (1)
26-85: Please add or point to aclifeature smoke test.This introduces a new supported compile surface, but I can’t see matching coverage in the reviewed changes. A quick
cargo checkforbiome_configurationwith and withoutcliwould catch straybpafimports and attrs before they sneak back in. Happy to help wire that up if useful.As per coding guidelines
**/*.{rs,ts,tsx,js}: All code changes MUST include appropriate tests.Also applies to: 123-215, 438-439, 576-603
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@crates/biome_configuration/src/lib.rs` around lines 26 - 85, Add a smoke test that compiles the biome_configuration crate both with and without the "cli" feature to catch stray bpaf imports and misplaced cfg attributes: create a new integration test (e.g. tests/cli_feature_smoke.rs) that runs cargo check (or uses Command to invoke cargo) twice — once with --no-default-features and once with --features cli — and assert both succeed; ensure this test is part of the crate's tests so CI runs it, and verify the code paths that reference bpaf, bpaf::Bpaf, and any cfg(feature = "cli")-guarded items (e.g., the bpaf import lines and pub use xyz under cfg(feature = "cli")) are correctly gated so the no-feature build passes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@crates/biome_configuration/src/lib.rs`:
- Around line 26-85: Add a smoke test that compiles the biome_configuration
crate both with and without the "cli" feature to catch stray bpaf imports and
misplaced cfg attributes: create a new integration test (e.g.
tests/cli_feature_smoke.rs) that runs cargo check (or uses Command to invoke
cargo) twice — once with --no-default-features and once with --features cli —
and assert both succeed; ensure this test is part of the crate's tests so CI
runs it, and verify the code paths that reference bpaf, bpaf::Bpaf, and any
cfg(feature = "cli")-guarded items (e.g., the bpaf import lines and pub use xyz
under cfg(feature = "cli")) are correctly gated so the no-feature build passes.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: c33ef8f2-c290-4016-9f18-f599cc2e29aa
📒 Files selected for processing (17)
crates/biome_cli/Cargo.tomlcrates/biome_configuration/Cargo.tomlcrates/biome_configuration/src/analyzer/assist/mod.rscrates/biome_configuration/src/analyzer/linter/mod.rscrates/biome_configuration/src/css.rscrates/biome_configuration/src/formatter.rscrates/biome_configuration/src/graphql.rscrates/biome_configuration/src/grit.rscrates/biome_configuration/src/html.rscrates/biome_configuration/src/javascript/formatter.rscrates/biome_configuration/src/javascript/mod.rscrates/biome_configuration/src/json.rscrates/biome_configuration/src/lib.rscrates/biome_configuration/src/markdown.rscrates/biome_configuration/src/organize_imports.rscrates/biome_configuration/src/overrides.rscrates/biome_configuration/src/vcs.rs
There was a problem hiding this comment.
🧹 Nitpick comments (1)
crates/biome_configuration/src/lib.rs (1)
122-223: Consider adding explicit feature-matrix coverage documentation forbiome_configuration.The crate already gets tested without the
clifeature (implicitly, viadefault = []in Cargo.toml), so the non-CLI build path is covered by existing tests intests/spec_tests.rs. However, there's no explicit, documented test target that validates this. Consider adding to justfile or CI:cargo test -p biome_configuration --no-default-featuresThis makes it clear for future maintainers that the crate is tested in both configurations.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@crates/biome_configuration/src/lib.rs` around lines 122 - 223, Tests currently don't explicitly assert the non-CLI build of biome_configuration; add a CI/justfile job that runs the crate's test suite with no default features to ensure coverage. Update the project automation (e.g., justfile and CI workflow) to include a command that runs "cargo test -p biome_configuration --no-default-features" (or equivalent) and ensure it runs the tests in tests/spec_tests.rs for the crate; name the job/target clearly (e.g., "test:biome_configuration:no-default-features") so maintainers can see the feature-matrix coverage.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@crates/biome_configuration/src/lib.rs`:
- Around line 122-223: Tests currently don't explicitly assert the non-CLI build
of biome_configuration; add a CI/justfile job that runs the crate's test suite
with no default features to ensure coverage. Update the project automation
(e.g., justfile and CI workflow) to include a command that runs "cargo test -p
biome_configuration --no-default-features" (or equivalent) and ensure it runs
the tests in tests/spec_tests.rs for the crate; name the job/target clearly
(e.g., "test:biome_configuration:no-default-features") so maintainers can see
the feature-matrix coverage.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: e4c54f37-a15f-4c8a-bda7-7385e433fc04
📒 Files selected for processing (15)
crates/biome_configuration/Cargo.tomlcrates/biome_configuration/src/analyzer/assist/mod.rscrates/biome_configuration/src/analyzer/linter/mod.rscrates/biome_configuration/src/css.rscrates/biome_configuration/src/formatter.rscrates/biome_configuration/src/graphql.rscrates/biome_configuration/src/grit.rscrates/biome_configuration/src/html.rscrates/biome_configuration/src/javascript/formatter.rscrates/biome_configuration/src/javascript/mod.rscrates/biome_configuration/src/json.rscrates/biome_configuration/src/lib.rscrates/biome_configuration/src/markdown.rscrates/biome_configuration/src/overrides.rscrates/biome_configuration/src/vcs.rs
🚧 Files skipped from review as they are similar to previous changes (10)
- crates/biome_configuration/Cargo.toml
- crates/biome_configuration/src/formatter.rs
- crates/biome_configuration/src/analyzer/assist/mod.rs
- crates/biome_configuration/src/grit.rs
- crates/biome_configuration/src/graphql.rs
- crates/biome_configuration/src/analyzer/linter/mod.rs
- crates/biome_configuration/src/markdown.rs
- crates/biome_configuration/src/javascript/mod.rs
- crates/biome_configuration/src/html.rs
- crates/biome_configuration/src/css.rs
dyc3
left a comment
There was a problem hiding this comment.
Looks fine, but what's the goal?
Avoiding pulling crates that aren't needed, so less things to compile e.g. benchmarks |
Summary
This PR makes bpaf a feature of biome_configuration
Written with Ai
Test Plan
Green ci
Docs