-
-
Notifications
You must be signed in to change notification settings - Fork 760
refactor: migrate to schemars v1 #8087
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
Conversation
|
WalkthroughThis change upgrades workspace schemars usage to v1.x and updates many JsonSchema implementations to the new API: Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
xtask/codegen/src/generate_schema.rs (2)
565-574: Handle the untouched-name case hereOnce
rename_typegoes back to returning anOption, we need to unwrap with a sensible default before inspecting the identifier; otherwise the compiler will keep sulking at us.- let name = rename_type(name); - let name = name.as_str(); + let renamed = rename_type(name).unwrap_or_else(|| name.to_string()); + let name = renamed.as_str();
695-701: Apply the same rename-or-original fallbackSame story for the root reference: unwrap the optional rename so we keep the original title when no simplification applies.
- let renamed_root = rename_type(root_name); + let renamed_root = rename_type(root_name).unwrap_or_else(|| root_name.to_string());
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (4)
Cargo.lockis excluded by!**/*.lockand included by**crates/biome_analyze/src/categories.rsis excluded by!**/categories.rsand included by**packages/@biomejs/backend-jsonrpc/src/workspace.tsis excluded by!**/backend-jsonrpc/src/workspace.tsand included by**packages/@biomejs/biome/configuration_schema.jsonis excluded by!**/configuration_schema.jsonand included by**
📒 Files selected for processing (31)
Cargo.toml(1 hunks)crates/biome_configuration/src/analyzer/linter/mod.rs(1 hunks)crates/biome_configuration/src/analyzer/mod.rs(6 hunks)crates/biome_configuration/src/bool.rs(1 hunks)crates/biome_configuration/src/extends.rs(1 hunks)crates/biome_configuration/src/lib.rs(1 hunks)crates/biome_configuration/src/overrides.rs(1 hunks)crates/biome_diagnostics/src/display/backtrace.rs(1 hunks)crates/biome_diagnostics/src/serde.rs(1 hunks)crates/biome_diagnostics_categories/Cargo.toml(1 hunks)crates/biome_diagnostics_categories/build.rs(1 hunks)crates/biome_fs/src/path.rs(1 hunks)crates/biome_glob/src/editorconfig.rs(1 hunks)crates/biome_glob/src/lib.rs(1 hunks)crates/biome_grit_patterns/src/grit_target_language.rs(1 hunks)crates/biome_rule_options/Cargo.toml(1 hunks)crates/biome_rule_options/src/no_restricted_elements.rs(1 hunks)crates/biome_rule_options/src/no_undeclared_dependencies.rs(1 hunks)crates/biome_rule_options/src/organize_imports/import_groups.rs(1 hunks)crates/biome_rule_options/src/shared/restricted_regex.rs(1 hunks)crates/biome_rule_options/src/use_exhaustive_dependencies.rs(1 hunks)crates/biome_rule_options/src/use_filenaming_convention.rs(1 hunks)crates/biome_rule_options/src/use_naming_convention.rs(2 hunks)crates/biome_service/src/workspace.rs(3 hunks)crates/biome_service/src/workspace_types.rs(9 hunks)crates/biome_text_size/src/schemars_impls.rs(2 hunks)crates/biome_wasm/Cargo.toml(1 hunks)crates/biome_wasm/build.rs(2 hunks)crates/biome_wasm/src/utils.rs(1 hunks)xtask/codegen/src/generate_bindings.rs(1 hunks)xtask/codegen/src/generate_schema.rs(2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
crates/biome_service/src/workspace.rs
📄 CodeRabbit inference engine (crates/biome_service/CONTRIBUTING.md)
Implement and expose the Workspace trait in src/workspace.rs
Files:
crates/biome_service/src/workspace.rs
🧠 Learnings (36)
📚 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_wasm/src/utils.rscrates/biome_diagnostics/src/serde.rscrates/biome_configuration/src/analyzer/mod.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_wasm/src/utils.rscrates/biome_diagnostics/src/serde.rscrates/biome_diagnostics_categories/Cargo.tomlcrates/biome_diagnostics_categories/build.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_wasm/src/utils.rscrates/biome_diagnostics/src/serde.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_wasm/src/utils.rscrates/biome_diagnostics/src/serde.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: Types deriving `Diagnostic` must also implement `Debug`
Applied to files:
crates/biome_wasm/src/utils.rscrates/biome_diagnostics/src/serde.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/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_wasm/src/utils.rsxtask/codegen/src/generate_bindings.rscrates/biome_rule_options/src/no_restricted_elements.rsxtask/codegen/src/generate_schema.rscrates/biome_rule_options/src/use_exhaustive_dependencies.rscrates/biome_wasm/build.rscrates/biome_fs/src/path.rscrates/biome_text_size/src/schemars_impls.rscrates/biome_rule_options/src/use_naming_convention.rscrates/biome_rule_options/src/organize_imports/import_groups.rscrates/biome_rule_options/src/no_undeclared_dependencies.rscrates/biome_diagnostics_categories/Cargo.tomlcrates/biome_service/src/workspace_types.rscrates/biome_configuration/src/analyzer/mod.rscrates/biome_diagnostics/src/display/backtrace.rscrates/biome_configuration/src/extends.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/comments.rs : Expose a public HtmlComments type alias: `pub type HtmlComments = Comments<HtmlLanguage>;`
Applied to files:
crates/biome_wasm/src/utils.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 : Import and use the `FormatNode` trait for AST nodes
Applied to files:
xtask/codegen/src/generate_bindings.rsxtask/codegen/src/generate_schema.rscrates/biome_wasm/build.rscrates/biome_text_size/src/schemars_impls.rscrates/biome_rule_options/src/use_naming_convention.rscrates/biome_service/src/workspace_types.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:
xtask/codegen/src/generate_bindings.rscrates/biome_wasm/build.rscrates/biome_text_size/src/schemars_impls.rscrates/biome_service/src/workspace.rscrates/biome_rule_options/Cargo.tomlcrates/biome_wasm/Cargo.tomlcrates/biome_service/src/workspace_types.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:
xtask/codegen/src/generate_bindings.rsxtask/codegen/src/generate_schema.rscrates/biome_wasm/build.rscrates/biome_fs/src/path.rscrates/biome_grit_patterns/src/grit_target_language.rscrates/biome_text_size/src/schemars_impls.rscrates/biome_rule_options/src/use_naming_convention.rscrates/biome_rule_options/src/organize_imports/import_groups.rscrates/biome_configuration/src/overrides.rscrates/biome_wasm/Cargo.tomlcrates/biome_diagnostics_categories/Cargo.tomlcrates/biome_configuration/src/analyzer/mod.rscrates/biome_configuration/src/extends.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:
xtask/codegen/src/generate_bindings.rscrates/biome_wasm/build.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/js_module_info/scoped_resolver.rs : Full inference must resolve TypeReference::Import across modules to TypeReference::Resolved when the target is available in the module graph.
Applied to files:
xtask/codegen/src/generate_bindings.rscrates/biome_service/src/workspace_types.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:
xtask/codegen/src/generate_bindings.rscrates/biome_wasm/build.rscrates/biome_wasm/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: Parser type must implement the biome_parser::Parser trait and hold context, token source, and optional options
Applied to files:
xtask/codegen/src/generate_schema.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:
xtask/codegen/src/generate_schema.rscrates/biome_wasm/build.rscrates/biome_service/src/workspace_types.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: Lexer must implement the biome_parser::Lexer trait
Applied to files:
xtask/codegen/src/generate_schema.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:
xtask/codegen/src/generate_schema.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/context.rs : Create HtmlFormatContext in context.rs with comments and source_map fields and implement FormatContext and CstFormatContext
Applied to files:
xtask/codegen/src/generate_schema.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:
xtask/codegen/src/generate_schema.rscrates/biome_wasm/build.rscrates/biome_fs/src/path.rscrates/biome_rule_options/Cargo.tomlcrates/biome_wasm/Cargo.tomlcrates/biome_diagnostics_categories/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 : Implement the `Format` trait for your node type and use `JsFormatter` with `write!`/`format_args!` to define formatting
Applied to files:
xtask/codegen/src/generate_schema.rscrates/biome_rule_options/src/use_naming_convention.rscrates/biome_service/src/workspace_types.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_wasm/build.rscrates/biome_rule_options/Cargo.tomlcrates/biome_wasm/Cargo.tomlcrates/biome_diagnostics_categories/Cargo.toml
📚 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_wasm/build.rscrates/biome_rule_options/Cargo.tomlcrates/biome_wasm/Cargo.tomlcrates/biome_diagnostics_categories/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/../biome_lsp/src/server.tests.rs : Keep end-to-end LSP tests in ../biome_lsp/src/server.tests.rs
Applied to files:
crates/biome_wasm/build.rscrates/biome_wasm/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/biome_*_{syntax,factory}/src/generated/** : Each new biome_<lang>_{syntax,factory} crate must have a src/generated/ directory for codegen output
Applied to files:
crates/biome_wasm/build.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_wasm/build.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_wasm/build.rs
📚 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_fs/src/path.rscrates/biome_configuration/src/lib.rscrates/biome_configuration/src/overrides.rscrates/biome_rule_options/Cargo.tomlcrates/biome_wasm/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.rs : Add new TypeScript type support by extending the TypeData enum rather than introducing parallel structures.
Applied to files:
crates/biome_text_size/src/schemars_impls.rscrates/biome_rule_options/Cargo.tomlcrates/biome_diagnostics_categories/Cargo.tomlcrates/biome_service/src/workspace_types.rscrates/biome_configuration/src/extends.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_text_size/src/schemars_impls.rscrates/biome_service/src/workspace.rscrates/biome_wasm/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_text_size/src/schemars_impls.rscrates/biome_service/src/workspace.rscrates/biome_wasm/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/**/Cargo.toml : Add the specified dev-dependencies under [dev-dependencies] for the test infrastructure
Applied to files:
crates/biome_rule_options/Cargo.tomlcrates/biome_wasm/Cargo.tomlcrates/biome_diagnostics_categories/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_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_wasm/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 : Use `dbg_write!` to debug and inspect the emitted IR during formatting
Applied to files:
crates/biome_wasm/Cargo.toml
📚 Learning: 2025-08-20T16:24:59.781Z
Learnt from: arendjr
Repo: biomejs/biome PR: 7266
File: crates/biome_js_type_info/src/type.rs:94-102
Timestamp: 2025-08-20T16:24:59.781Z
Learning: In crates/biome_js_type_info/src/type.rs, the flattened_union_variants() method returns TypeReference instances that already have the correct module IDs applied to them. These references should be used directly with resolver.resolve_reference() without applying additional module ID transformations, as variant references may originate from nested unions in different modules.
Applied to files:
crates/biome_service/src/workspace_types.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 : For non-mandatory tokens, use the provided helper constructors (e.g., `token`, `space_token`, `dynamic_token`)
Applied to files:
crates/biome_service/src/workspace_types.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/js_module_info/collector.rs : Thin (module-level) inference should resolve local and global bindings to TypeReference::Resolved, mark imported bindings as TypeReference::Import, and fall back to TypeReference::Unknown if unresolved.
Applied to files:
crates/biome_service/src/workspace_types.rs
🧬 Code graph analysis (26)
xtask/codegen/src/generate_bindings.rs (2)
crates/biome_service/src/workspace_types.rs (2)
SchemaGenerator(722-722)SchemaGenerator(723-723)crates/biome_wasm/build.rs (1)
SchemaGenerator(25-26)
crates/biome_diagnostics/src/serde.rs (3)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
schema_name(67-69)json_schema(71-81)crates/biome_configuration/src/bool.rs (2)
schema_name(105-107)json_schema(109-111)crates/biome_diagnostics/src/display/backtrace.rs (2)
schema_name(96-98)json_schema(100-102)
crates/biome_rule_options/src/no_restricted_elements.rs (1)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
schema_name(67-69)json_schema(71-81)
crates/biome_glob/src/lib.rs (4)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
schema_name(67-69)json_schema(71-81)crates/biome_configuration/src/lib.rs (2)
schema_name(430-432)json_schema(434-436)crates/biome_configuration/src/overrides.rs (2)
schema_name(104-106)json_schema(107-109)crates/biome_glob/src/editorconfig.rs (2)
schema_name(157-159)json_schema(161-163)
crates/biome_glob/src/editorconfig.rs (5)
crates/biome_configuration/src/analyzer/mod.rs (21)
schema_name(106-108)schema_name(212-214)schema_name(446-448)schema_name(496-498)schema_name(606-608)schema_name(814-816)json_schema(110-122)json_schema(216-228)json_schema(450-465)json_schema(500-517)json_schema(609-611)json_schema(817-819)generator(112-112)generator(113-113)generator(218-218)generator(219-219)generator(452-452)generator(453-453)generator(502-502)generator(503-503)generator(504-504)crates/biome_configuration/src/bool.rs (2)
schema_name(105-107)json_schema(109-111)crates/biome_configuration/src/lib.rs (2)
schema_name(430-432)json_schema(434-436)crates/biome_configuration/src/overrides.rs (2)
schema_name(104-106)json_schema(107-109)crates/biome_glob/src/lib.rs (2)
schema_name(382-384)json_schema(386-388)
xtask/codegen/src/generate_schema.rs (1)
crates/biome_service/src/workspace_types.rs (1)
rename_type(47-65)
crates/biome_configuration/src/analyzer/linter/mod.rs (3)
crates/biome_configuration/src/analyzer/mod.rs (12)
schema_name(106-108)schema_name(212-214)schema_name(446-448)schema_name(496-498)schema_name(606-608)schema_name(814-816)json_schema(110-122)json_schema(216-228)json_schema(450-465)json_schema(500-517)json_schema(609-611)json_schema(817-819)crates/biome_configuration/src/bool.rs (2)
schema_name(105-107)json_schema(109-111)crates/biome_rule_options/src/no_restricted_elements.rs (2)
schema_name(46-48)json_schema(50-55)
crates/biome_rule_options/src/use_exhaustive_dependencies.rs (1)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
schema_name(67-69)json_schema(71-81)
crates/biome_wasm/build.rs (2)
crates/biome_service/src/workspace_types.rs (2)
SchemaGenerator(722-722)SchemaGenerator(723-723)xtask/codegen/src/generate_bindings.rs (3)
SchemaGenerator(158-159)SchemaGenerator(161-162)SchemaGenerator(164-165)
crates/biome_rule_options/src/use_filenaming_convention.rs (3)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
schema_name(67-69)json_schema(71-81)crates/biome_configuration/src/analyzer/mod.rs (21)
schema_name(106-108)schema_name(212-214)schema_name(446-448)schema_name(496-498)schema_name(606-608)schema_name(814-816)json_schema(110-122)json_schema(216-228)json_schema(450-465)json_schema(500-517)json_schema(609-611)json_schema(817-819)generator(112-112)generator(113-113)generator(218-218)generator(219-219)generator(452-452)generator(453-453)generator(502-502)generator(503-503)generator(504-504)crates/biome_configuration/src/bool.rs (2)
schema_name(105-107)json_schema(109-111)
crates/biome_fs/src/path.rs (4)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
schema_name(67-69)json_schema(71-81)crates/biome_configuration/src/bool.rs (2)
schema_name(105-107)json_schema(109-111)crates/biome_configuration/src/lib.rs (2)
schema_name(430-432)json_schema(434-436)crates/biome_service/src/workspace.rs (6)
schema_name(426-428)schema_name(673-675)json_schema(430-444)json_schema(677-679)generator(432-432)generator(433-433)
crates/biome_configuration/src/lib.rs (7)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
schema_name(67-69)json_schema(71-81)crates/biome_configuration/src/analyzer/mod.rs (21)
schema_name(106-108)schema_name(212-214)schema_name(446-448)schema_name(496-498)schema_name(606-608)schema_name(814-816)json_schema(110-122)json_schema(216-228)json_schema(450-465)json_schema(500-517)json_schema(609-611)json_schema(817-819)generator(112-112)generator(113-113)generator(218-218)generator(219-219)generator(452-452)generator(453-453)generator(502-502)generator(503-503)generator(504-504)crates/biome_configuration/src/bool.rs (2)
schema_name(105-107)json_schema(109-111)crates/biome_configuration/src/overrides.rs (2)
schema_name(104-106)json_schema(107-109)crates/biome_fs/src/path.rs (2)
schema_name(246-248)json_schema(250-252)crates/biome_glob/src/lib.rs (2)
schema_name(382-384)json_schema(386-388)xtask/codegen/src/generate_bindings.rs (3)
SchemaGenerator(158-159)SchemaGenerator(161-162)SchemaGenerator(164-165)
crates/biome_grit_patterns/src/grit_target_language.rs (3)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
schema_name(67-69)json_schema(71-81)crates/biome_configuration/src/bool.rs (2)
schema_name(105-107)json_schema(109-111)crates/biome_configuration/src/extends.rs (2)
schema_name(65-67)json_schema(69-78)
crates/biome_text_size/src/schemars_impls.rs (3)
crates/biome_configuration/src/analyzer/mod.rs (6)
schema_name(106-108)schema_name(212-214)schema_name(446-448)schema_name(496-498)schema_name(606-608)schema_name(814-816)crates/biome_configuration/src/bool.rs (1)
schema_name(105-107)crates/biome_configuration/src/lib.rs (1)
schema_name(430-432)
crates/biome_rule_options/src/use_naming_convention.rs (2)
crates/biome_configuration/src/analyzer/mod.rs (21)
schema_name(106-108)schema_name(212-214)schema_name(446-448)schema_name(496-498)schema_name(606-608)schema_name(814-816)json_schema(110-122)json_schema(216-228)json_schema(450-465)json_schema(500-517)json_schema(609-611)json_schema(817-819)generator(112-112)generator(113-113)generator(218-218)generator(219-219)generator(452-452)generator(453-453)generator(502-502)generator(503-503)generator(504-504)crates/biome_configuration/src/bool.rs (2)
schema_name(105-107)json_schema(109-111)
crates/biome_rule_options/src/organize_imports/import_groups.rs (2)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
schema_name(67-69)json_schema(71-81)crates/biome_configuration/src/analyzer/mod.rs (21)
schema_name(106-108)schema_name(212-214)schema_name(446-448)schema_name(496-498)schema_name(606-608)schema_name(814-816)json_schema(110-122)json_schema(216-228)json_schema(450-465)json_schema(500-517)json_schema(609-611)json_schema(817-819)generator(112-112)generator(113-113)generator(218-218)generator(219-219)generator(452-452)generator(453-453)generator(502-502)generator(503-503)generator(504-504)
crates/biome_service/src/workspace.rs (2)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
schema_name(67-69)json_schema(71-81)crates/biome_configuration/src/extends.rs (2)
schema_name(65-67)json_schema(69-78)
crates/biome_configuration/src/overrides.rs (4)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
schema_name(67-69)json_schema(71-81)crates/biome_configuration/src/analyzer/mod.rs (21)
schema_name(106-108)schema_name(212-214)schema_name(446-448)schema_name(496-498)schema_name(606-608)schema_name(814-816)json_schema(110-122)json_schema(216-228)json_schema(450-465)json_schema(500-517)json_schema(609-611)json_schema(817-819)generator(112-112)generator(113-113)generator(218-218)generator(219-219)generator(452-452)generator(453-453)generator(502-502)generator(503-503)generator(504-504)crates/biome_configuration/src/bool.rs (2)
schema_name(105-107)json_schema(109-111)crates/biome_glob/src/lib.rs (2)
schema_name(382-384)json_schema(386-388)
crates/biome_rule_options/src/no_undeclared_dependencies.rs (2)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
schema_name(67-69)json_schema(71-81)crates/biome_configuration/src/bool.rs (2)
schema_name(105-107)json_schema(109-111)
crates/biome_rule_options/src/shared/restricted_regex.rs (2)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
schema_name(67-69)json_schema(71-81)crates/biome_configuration/src/bool.rs (2)
schema_name(105-107)json_schema(109-111)
crates/biome_service/src/workspace_types.rs (3)
crates/biome_wasm/build.rs (1)
SchemaGenerator(25-26)xtask/codegen/src/generate_bindings.rs (3)
SchemaGenerator(158-159)SchemaGenerator(161-162)SchemaGenerator(164-165)xtask/codegen/src/generate_schema.rs (1)
rename_type(30-45)
crates/biome_diagnostics_categories/build.rs (3)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
schema_name(67-69)json_schema(71-81)crates/biome_configuration/src/analyzer/mod.rs (12)
schema_name(106-108)schema_name(212-214)schema_name(446-448)schema_name(496-498)schema_name(606-608)schema_name(814-816)json_schema(110-122)json_schema(216-228)json_schema(450-465)json_schema(500-517)json_schema(609-611)json_schema(817-819)crates/biome_configuration/src/bool.rs (2)
schema_name(105-107)json_schema(109-111)
crates/biome_configuration/src/analyzer/mod.rs (6)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
schema_name(67-69)json_schema(71-81)crates/biome_configuration/src/bool.rs (2)
schema_name(105-107)json_schema(109-111)crates/biome_configuration/src/extends.rs (2)
schema_name(65-67)json_schema(69-78)crates/biome_configuration/src/lib.rs (2)
schema_name(430-432)json_schema(434-436)crates/biome_configuration/src/overrides.rs (2)
schema_name(104-106)json_schema(107-109)crates/biome_service/src/workspace.rs (6)
schema_name(426-428)schema_name(673-675)json_schema(430-444)json_schema(677-679)generator(432-432)generator(433-433)
crates/biome_configuration/src/bool.rs (13)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
schema_name(67-69)json_schema(71-81)crates/biome_configuration/src/analyzer/mod.rs (21)
schema_name(106-108)schema_name(212-214)schema_name(446-448)schema_name(496-498)schema_name(606-608)schema_name(814-816)json_schema(110-122)json_schema(216-228)json_schema(450-465)json_schema(500-517)json_schema(609-611)json_schema(817-819)generator(112-112)generator(113-113)generator(218-218)generator(219-219)generator(452-452)generator(453-453)generator(502-502)generator(503-503)generator(504-504)crates/biome_configuration/src/extends.rs (2)
schema_name(65-67)json_schema(69-78)crates/biome_configuration/src/lib.rs (2)
schema_name(430-432)json_schema(434-436)crates/biome_configuration/src/overrides.rs (2)
schema_name(104-106)json_schema(107-109)crates/biome_diagnostics/src/display/backtrace.rs (2)
schema_name(96-98)json_schema(100-102)crates/biome_diagnostics/src/serde.rs (2)
schema_name(364-366)json_schema(368-370)crates/biome_fs/src/path.rs (2)
schema_name(246-248)json_schema(250-252)crates/biome_glob/src/editorconfig.rs (2)
schema_name(157-159)json_schema(161-163)crates/biome_glob/src/lib.rs (2)
schema_name(382-384)json_schema(386-388)crates/biome_rule_options/src/no_restricted_elements.rs (2)
schema_name(46-48)json_schema(50-55)crates/biome_service/src/workspace_types.rs (2)
SchemaGenerator(722-722)SchemaGenerator(723-723)xtask/codegen/src/generate_bindings.rs (3)
SchemaGenerator(158-159)SchemaGenerator(161-162)SchemaGenerator(164-165)
crates/biome_diagnostics/src/display/backtrace.rs (4)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
schema_name(67-69)json_schema(71-81)crates/biome_configuration/src/analyzer/mod.rs (21)
schema_name(106-108)schema_name(212-214)schema_name(446-448)schema_name(496-498)schema_name(606-608)schema_name(814-816)json_schema(110-122)json_schema(216-228)json_schema(450-465)json_schema(500-517)json_schema(609-611)json_schema(817-819)generator(112-112)generator(113-113)generator(218-218)generator(219-219)generator(452-452)generator(453-453)generator(502-502)generator(503-503)generator(504-504)crates/biome_configuration/src/bool.rs (2)
schema_name(105-107)json_schema(109-111)crates/biome_diagnostics/src/serde.rs (2)
schema_name(364-366)json_schema(368-370)
crates/biome_configuration/src/extends.rs (4)
crates/biome_configuration/src/analyzer/linter/mod.rs (2)
schema_name(67-69)json_schema(71-81)crates/biome_configuration/src/bool.rs (2)
schema_name(105-107)json_schema(109-111)crates/biome_configuration/src/lib.rs (2)
schema_name(430-432)json_schema(434-436)crates/biome_configuration/src/overrides.rs (2)
schema_name(104-106)json_schema(107-109)
🔇 Additional comments (30)
crates/biome_wasm/src/utils.rs (1)
11-12: Good – clarifying comment for generated type.Adding this comment makes it clear to future maintainers that
IDiagnosticis auto-generated and not to be hand-edited. Well done.crates/biome_wasm/build.rs (2)
10-10: Import path correctly updated for schemars v1.The migration from
schemars::r#gentoschemars::generatealigns with the v1 API.
27-27: Formatting improvement.Minor readability enhancement.
crates/biome_rule_options/src/use_naming_convention.rs (2)
499-508: LGTM! Correct schemars v1 migration.The JsonSchema implementation correctly adopts the new API:
schema_name()returnsCow::Borrowed, andjson_schema()uses the simplified type paths. The delegation toHashSetpreserves the existing schema generation behaviour.
649-657: LGTM! Correct schemars v1 migration.The JsonSchema implementation correctly adopts the new API, mirroring the changes in
RestrictedModifiers. The delegation toHashSet<Format>maintains the existing behaviour.crates/biome_diagnostics_categories/Cargo.toml (1)
15-17: LGTM! Schema feature correctly extended for schemars v1.The addition of
serde_jsonas an optional dependency and its inclusion in the schema feature aligns with the schemars v1 migration requirements.Also applies to: 23-23
crates/biome_rule_options/Cargo.toml (1)
30-30: LGTM! Consistent schema feature extension.The changes mirror the pattern across the codebase and properly support the schemars v1 API.
Also applies to: 38-38
crates/biome_text_size/src/schemars_impls.rs (1)
9-33: LGTM! Clean migration to schemars v1 API.The updated signatures follow the new API conventions, and using
Cow::Borrowedis more efficient than allocatingStringinstances. The implementation logic remains unchanged.crates/biome_configuration/src/extends.rs (1)
64-79: LGTM! JsonSchema implementation properly updated.The migration follows the established pattern:
schema_name()returnsCow::Borrowedandjson_schema()uses the updated generator type.crates/biome_glob/src/lib.rs (1)
380-389: LGTM! Glob schema implementation aligned with v1 API.The implementation correctly delegates to
String::json_schema()with the updated generator type.crates/biome_glob/src/editorconfig.rs (1)
155-164: LGTM! EditorconfigGlob schema correctly implemented.The schema delegation to
String::json_schema()is appropriate sinceEditorconfigGlobserialises as a string.crates/biome_grit_patterns/src/grit_target_language.rs (1)
77-90: LGTM! Enum schema correctly constructed for v1 API.The implementation builds the enum schema using
serde_json::Map, which is appropriate for representing the language variants in JSON Schema format.crates/biome_diagnostics/src/serde.rs (1)
362-371: LGTM! DiagnosticTags schema properly delegated.The delegation to
Vec<DiagnosticTag>::json_schema()correctly represents the bitflags as a list in the schema.crates/biome_rule_options/src/shared/restricted_regex.rs (1)
109-115: LGTM! Clean migration to schemars v1 API.The JsonSchema implementation correctly adopts the new API:
schema_name()returnsCow::Borrowed, andjson_schema()uses the updated signature.crates/biome_rule_options/src/organize_imports/import_groups.rs (1)
318-339: LGTM! Schema manipulation correctly adapted.The migration properly updates the API signatures and preserves the logic that adds negated variants to the enum schema.
crates/biome_rule_options/src/use_filenaming_convention.rs (1)
100-105: LGTM! Straightforward API migration.Correctly updated to the new schemars v1 signatures with delegation to
HashSet<FilenameCase>.crates/biome_diagnostics/src/display/backtrace.rs (1)
96-102: LGTM! Clean delegation pattern.The JsonSchema implementation is correctly updated to schemars v1 with proper delegation.
crates/biome_rule_options/src/no_undeclared_dependencies.rs (1)
63-84: LGTM! Excellent use of the json_schema! macro.The migration properly leverages the new macro-based approach for inline schema generation whilst preserving the oneOf semantics.
crates/biome_rule_options/src/use_exhaustive_dependencies.rs (1)
158-190: LGTM! Complex schema well-migrated.The oneOf schema with multiple type variants (boolean, integer array, string array) is correctly expressed using the json_schema! macro.
crates/biome_diagnostics_categories/build.rs (1)
69-78: LGTM! Build-time schema generation adapted correctly.The manual serde_json::Map construction for the enum schema is appropriate for this code-generation context.
crates/biome_rule_options/src/no_restricted_elements.rs (1)
46-55: LGTM! Schema reference with constraints preserved.The migration correctly uses the json_schema! macro to maintain the $ref with minProperties constraint.
Cargo.toml (1)
233-233: LGTM! Schemars v1 migration looks correct.The version bump and feature flag update (
smallvec→smallvec1) align with schemars 1.0.4 requirements.xtask/codegen/src/generate_bindings.rs (1)
13-13: LGTM! Import paths updated correctly.The migration from
schemars::r#gen::toschemars::andschemars::generate::is proper for schemars v1.crates/biome_wasm/Cargo.toml (1)
25-31: LGTM! Schema dependencies properly added.The additions of
schemarsandserde_jsonas workspace dependencies, along with enabling the "schema" feature onbiome_service, correctly support the schemars v1 migration.crates/biome_configuration/src/overrides.rs (1)
104-109: LGTM! JsonSchema implementation updated correctly.The migration to
Cow<'static, str>forschema_name()and the updatedjson_schema()signature align with schemars v1 requirements.crates/biome_configuration/src/lib.rs (1)
430-436: LGTM! Schema type migration looks good.The
Schematype's JsonSchema implementation correctly adopts the new schemars v1 API.crates/biome_service/src/workspace.rs (2)
673-679: LGTM! FeatureName schema implementation is clean.Delegating to
Vec<FeatureKind>::json_schema(generator)is appropriate here.
426-444: Inconsistent schema reference formats confirmed—other files need fixing.The analysis confirms the inconsistency:
workspace.rscorrectly uses"#/components/schemas/"(OpenAPI 3.0 format) to matchSchemaSettings::openapi3()used throughout codegen. However,crates/biome_configuration/src/analyzer/linter/mod.rsandcrates/biome_rule_options/src/no_restricted_elements.rsincorrectly use"#/definitions/"(JSON Schema Draft format).Since codegen explicitly generates these types with
openapi3(), the mismatched reference formats in those files will break schema validation when the schemas are combined. Update those two files to use"#/components/schemas/"instead.⛔ Skipped due to 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.rsLearnt 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.rsLearnt 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 modeLearnt 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.rsLearnt 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_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.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.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}/src/generated/** : Each new biome_<lang>_{syntax,factory} crate must have a src/generated/ directory for codegen outputLearnt 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 utilitiesLearnt 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 WorkspaceServercrates/biome_configuration/src/analyzer/linter/mod.rs (1)
67-81: LGTM! RuleDomains schema migration complete.The implementation correctly uses the
json_schema!macro and the new schemars v1 API. (Note: Schema reference format verified separately.)crates/biome_fs/src/path.rs (1)
246-252: LGTM! BiomePath schema migration complete.The JsonSchema implementation follows the same pattern as other wrapper types, correctly delegating to the underlying
Stringschema.
0a4a2bf to
02fef8a
Compare
02fef8a to
f48bf60
Compare
CodSpeed Performance ReportMerging #8087 will not alter performanceComparing Summary
Footnotes
|
Parser conformance results onjs/262
jsx/babel
symbols/microsoft
ts/babel
ts/microsoft
|
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: 5
🧹 Nitpick comments (1)
crates/biome_service/src/workspace_types.rs (1)
44-74: Consider deduplicating therename_typefunction.This function appears identical to the one in
xtask/codegen/src/generate_schema.rs(lines 29-56). Consider extracting it to a shared module to avoid maintenance burden.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (4)
Cargo.lockis excluded by!**/*.lockand included by**crates/biome_analyze/src/categories.rsis excluded by!**/categories.rsand included by**packages/@biomejs/backend-jsonrpc/src/workspace.tsis excluded by!**/backend-jsonrpc/src/workspace.tsand included by**packages/@biomejs/biome/configuration_schema.jsonis excluded by!**/configuration_schema.jsonand included by**
📒 Files selected for processing (35)
Cargo.toml(1 hunks)crates/biome_configuration/src/analyzer/linter/mod.rs(1 hunks)crates/biome_configuration/src/analyzer/mod.rs(9 hunks)crates/biome_configuration/src/bool.rs(1 hunks)crates/biome_configuration/src/extends.rs(1 hunks)crates/biome_configuration/src/lib.rs(1 hunks)crates/biome_configuration/src/overrides.rs(1 hunks)crates/biome_diagnostics/src/display/backtrace.rs(1 hunks)crates/biome_diagnostics/src/serde.rs(1 hunks)crates/biome_diagnostics_categories/Cargo.toml(1 hunks)crates/biome_diagnostics_categories/build.rs(1 hunks)crates/biome_fs/src/path.rs(1 hunks)crates/biome_glob/src/editorconfig.rs(1 hunks)crates/biome_glob/src/lib.rs(1 hunks)crates/biome_grit_patterns/src/grit_target_language.rs(1 hunks)crates/biome_js_formatter/src/context/trailing_commas.rs(1 hunks)crates/biome_json_formatter/src/context.rs(1 hunks)crates/biome_rule_options/Cargo.toml(1 hunks)crates/biome_rule_options/src/no_restricted_elements.rs(1 hunks)crates/biome_rule_options/src/no_undeclared_dependencies.rs(1 hunks)crates/biome_rule_options/src/organize_imports/import_groups.rs(1 hunks)crates/biome_rule_options/src/shared/restricted_regex.rs(1 hunks)crates/biome_rule_options/src/use_consistent_graphql_descriptions.rs(1 hunks)crates/biome_rule_options/src/use_exhaustive_dependencies.rs(1 hunks)crates/biome_rule_options/src/use_filenaming_convention.rs(1 hunks)crates/biome_rule_options/src/use_import_type.rs(1 hunks)crates/biome_rule_options/src/use_naming_convention.rs(2 hunks)crates/biome_service/src/workspace.rs(3 hunks)crates/biome_service/src/workspace_types.rs(9 hunks)crates/biome_text_size/src/schemars_impls.rs(2 hunks)crates/biome_wasm/Cargo.toml(1 hunks)crates/biome_wasm/build.rs(2 hunks)crates/biome_wasm/src/utils.rs(1 hunks)xtask/codegen/src/generate_bindings.rs(1 hunks)xtask/codegen/src/generate_schema.rs(2 hunks)
✅ Files skipped from review due to trivial changes (1)
- crates/biome_wasm/src/utils.rs
🚧 Files skipped from review as they are similar to previous changes (9)
- Cargo.toml
- crates/biome_diagnostics/src/serde.rs
- crates/biome_configuration/src/analyzer/linter/mod.rs
- crates/biome_glob/src/lib.rs
- crates/biome_fs/src/path.rs
- crates/biome_text_size/src/schemars_impls.rs
- crates/biome_grit_patterns/src/grit_target_language.rs
- crates/biome_rule_options/src/use_filenaming_convention.rs
- crates/biome_diagnostics_categories/Cargo.toml
🧰 Additional context used
📓 Path-based instructions (2)
crates/biome_js_formatter/**/*.rs
📄 CodeRabbit inference engine (crates/biome_js_formatter/CONTRIBUTING.md)
crates/biome_js_formatter/**/*.rs: Implement theFormattrait for your node type and useJsFormatterwithwrite!/format_args!to define formatting
Import and use theFormatNodetrait for AST nodes
When a token is mandatory and present in the AST, use the AST-provided token (e.g.,node.l_paren_token().format()) instead of emitting a static token
For non-mandatory tokens, use the provided helper constructors (e.g.,token,space_token,dynamic_token)
Do not attempt to fix code; if a mandatory token/node is missing, returnNoneinstead
Usedbg_write!to debug and inspect the emitted IR during formatting
Files:
crates/biome_js_formatter/src/context/trailing_commas.rs
crates/biome_service/src/workspace.rs
📄 CodeRabbit inference engine (crates/biome_service/CONTRIBUTING.md)
Implement and expose the Workspace trait in src/workspace.rs
Files:
crates/biome_service/src/workspace.rs
🧠 Learnings (34)
📓 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-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_glob/src/editorconfig.rscrates/biome_wasm/build.rscrates/biome_configuration/src/analyzer/mod.rscrates/biome_rule_options/src/use_naming_convention.rsxtask/codegen/src/generate_schema.rscrates/biome_js_formatter/src/context/trailing_commas.rscrates/biome_service/src/workspace.rsxtask/codegen/src/generate_bindings.rscrates/biome_rule_options/src/use_consistent_graphql_descriptions.rscrates/biome_wasm/Cargo.tomlcrates/biome_rule_options/src/organize_imports/import_groups.rscrates/biome_configuration/src/overrides.rscrates/biome_rule_options/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/biome_*_{syntax,factory}/** : Create per-language crates biome_<lang>_syntax and biome_<lang>_factory under crates/
Applied to files:
crates/biome_wasm/build.rscrates/biome_service/src/workspace.rscrates/biome_wasm/Cargo.tomlcrates/biome_rule_options/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_wasm/build.rscrates/biome_configuration/src/analyzer/mod.rscrates/biome_rule_options/src/use_exhaustive_dependencies.rscrates/biome_rule_options/src/no_restricted_elements.rscrates/biome_rule_options/src/use_naming_convention.rsxtask/codegen/src/generate_schema.rscrates/biome_rule_options/src/no_undeclared_dependencies.rscrates/biome_service/src/workspace.rsxtask/codegen/src/generate_bindings.rscrates/biome_rule_options/src/use_consistent_graphql_descriptions.rscrates/biome_rule_options/src/use_import_type.rscrates/biome_rule_options/src/organize_imports/import_groups.rscrates/biome_configuration/src/extends.rscrates/biome_service/src/workspace_types.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}/src/generated/** : Each new biome_<lang>_{syntax,factory} crate must have a src/generated/ directory for codegen output
Applied to files:
crates/biome_wasm/build.rscrates/biome_wasm/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_wasm/build.rsxtask/codegen/src/generate_schema.rscrates/biome_js_formatter/src/context/trailing_commas.rscrates/biome_service/src/workspace_types.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_wasm/build.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 : Import and use the `FormatNode` trait for AST nodes
Applied to files:
crates/biome_wasm/build.rscrates/biome_rule_options/src/use_naming_convention.rsxtask/codegen/src/generate_schema.rsxtask/codegen/src/generate_bindings.rscrates/biome_rule_options/src/use_consistent_graphql_descriptions.rscrates/biome_rule_options/src/use_import_type.rscrates/biome_service/src/workspace_types.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_wasm/build.rscrates/biome_service/src/workspace.rscrates/biome_wasm/Cargo.toml
📚 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_wasm/build.rscrates/biome_wasm/Cargo.tomlcrates/biome_rule_options/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/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_wasm/build.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_wasm/build.rscrates/biome_service/src/workspace.rsxtask/codegen/src/generate_bindings.rscrates/biome_wasm/Cargo.tomlcrates/biome_service/src/workspace_types.rscrates/biome_rule_options/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/watcher.tests.rs : Place watcher tests related to workspace methods in src/workspace/watcher.tests.rs
Applied to files:
crates/biome_wasm/build.rscrates/biome_service/src/workspace.rsxtask/codegen/src/generate_bindings.rscrates/biome_wasm/Cargo.tomlcrates/biome_rule_options/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.rs : Add new TypeScript type support by extending the TypeData enum rather than introducing parallel structures.
Applied to files:
crates/biome_configuration/src/analyzer/mod.rscrates/biome_rule_options/src/use_exhaustive_dependencies.rscrates/biome_js_formatter/src/context/trailing_commas.rscrates/biome_rule_options/src/use_consistent_graphql_descriptions.rscrates/biome_rule_options/src/use_import_type.rscrates/biome_configuration/src/extends.rscrates/biome_service/src/workspace_types.rscrates/biome_rule_options/Cargo.toml
📚 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_configuration/src/analyzer/mod.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_rule_options/src/use_naming_convention.rsxtask/codegen/src/generate_schema.rscrates/biome_service/src/workspace_types.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: Parser type must implement the biome_parser::Parser trait and hold context, token source, and optional options
Applied to files:
xtask/codegen/src/generate_schema.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: Lexer must implement the biome_parser::Lexer trait
Applied to files:
xtask/codegen/src/generate_schema.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:
xtask/codegen/src/generate_schema.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/context.rs : Create HtmlFormatContext in context.rs with comments and source_map fields and implement FormatContext and CstFormatContext
Applied to files:
xtask/codegen/src/generate_schema.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:
xtask/codegen/src/generate_schema.rscrates/biome_wasm/Cargo.tomlcrates/biome_rule_options/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_configuration/src/lib.rscrates/biome_service/src/workspace.rscrates/biome_configuration/src/extends.rscrates/biome_configuration/src/overrides.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/workspace.rscrates/biome_wasm/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_service/src/workspace.rscrates/biome_wasm/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/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:
xtask/codegen/src/generate_bindings.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/js_module_info/scoped_resolver.rs : Full inference must resolve TypeReference::Import across modules to TypeReference::Resolved when the target is available in the module graph.
Applied to files:
xtask/codegen/src/generate_bindings.rscrates/biome_service/src/workspace_types.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_diagnostics_categories/build.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/comments.rs : Define HtmlCommentStyle implementing CommentStyle in comments.rs
Applied to files:
crates/biome_rule_options/src/use_consistent_graphql_descriptions.rscrates/biome_rule_options/src/use_import_type.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_wasm/Cargo.tomlcrates/biome_rule_options/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_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_wasm/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 : Use `dbg_write!` to debug and inspect the emitted IR during formatting
Applied to files:
crates/biome_wasm/Cargo.toml
📚 Learning: 2025-08-20T16:24:59.781Z
Learnt from: arendjr
Repo: biomejs/biome PR: 7266
File: crates/biome_js_type_info/src/type.rs:94-102
Timestamp: 2025-08-20T16:24:59.781Z
Learning: In crates/biome_js_type_info/src/type.rs, the flattened_union_variants() method returns TypeReference instances that already have the correct module IDs applied to them. These references should be used directly with resolver.resolve_reference() without applying additional module ID transformations, as variant references may originate from nested unions in different modules.
Applied to files:
crates/biome_service/src/workspace_types.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 : For non-mandatory tokens, use the provided helper constructors (e.g., `token`, `space_token`, `dynamic_token`)
Applied to files:
crates/biome_service/src/workspace_types.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/js_module_info/collector.rs : Thin (module-level) inference should resolve local and global bindings to TypeReference::Resolved, mark imported bindings as TypeReference::Import, and fall back to TypeReference::Unknown if unresolved.
Applied to files:
crates/biome_service/src/workspace_types.rs
🧬 Code graph analysis (23)
crates/biome_glob/src/editorconfig.rs (4)
crates/biome_configuration/src/analyzer/mod.rs (33)
schema_name(106-108)schema_name(212-214)schema_name(373-375)schema_name(448-450)schema_name(491-493)schema_name(541-543)schema_name(651-653)schema_name(859-861)schema_name(979-981)json_schema(110-122)json_schema(216-228)json_schema(377-387)json_schema(452-464)json_schema(495-510)json_schema(545-562)json_schema(654-656)json_schema(862-864)json_schema(983-995)generator(112-112)generator(113-113)generator(218-218)generator(219-219)generator(378-378)generator(379-379)generator(453-453)generator(454-454)generator(497-497)generator(498-498)generator(547-547)generator(548-548)generator(549-549)generator(985-985)generator(986-986)crates/biome_configuration/src/bool.rs (2)
schema_name(105-107)json_schema(109-111)crates/biome_configuration/src/lib.rs (2)
schema_name(430-432)json_schema(434-436)crates/biome_configuration/src/overrides.rs (2)
schema_name(104-106)json_schema(107-109)
crates/biome_wasm/build.rs (2)
crates/biome_service/src/workspace_types.rs (2)
SchemaGenerator(731-731)SchemaGenerator(732-732)xtask/codegen/src/generate_bindings.rs (3)
SchemaGenerator(158-159)SchemaGenerator(161-162)SchemaGenerator(164-165)
crates/biome_configuration/src/analyzer/mod.rs (5)
crates/biome_js_formatter/src/context/trailing_commas.rs (2)
schema_name(108-110)json_schema(112-118)crates/biome_configuration/src/analyzer/linter/mod.rs (2)
schema_name(67-69)json_schema(71-81)crates/biome_configuration/src/lib.rs (2)
schema_name(430-432)json_schema(434-436)crates/biome_service/src/workspace.rs (6)
schema_name(426-428)schema_name(673-675)json_schema(430-444)json_schema(677-679)generator(432-432)generator(433-433)xtask/codegen/src/generate_bindings.rs (3)
SchemaGenerator(158-159)SchemaGenerator(161-162)SchemaGenerator(164-165)
crates/biome_rule_options/src/use_exhaustive_dependencies.rs (1)
crates/biome_configuration/src/analyzer/mod.rs (18)
schema_name(106-108)schema_name(212-214)schema_name(373-375)schema_name(448-450)schema_name(491-493)schema_name(541-543)schema_name(651-653)schema_name(859-861)schema_name(979-981)json_schema(110-122)json_schema(216-228)json_schema(377-387)json_schema(452-464)json_schema(495-510)json_schema(545-562)json_schema(654-656)json_schema(862-864)json_schema(983-995)
crates/biome_rule_options/src/no_restricted_elements.rs (2)
crates/biome_configuration/src/analyzer/mod.rs (18)
schema_name(106-108)schema_name(212-214)schema_name(373-375)schema_name(448-450)schema_name(491-493)schema_name(541-543)schema_name(651-653)schema_name(859-861)schema_name(979-981)json_schema(110-122)json_schema(216-228)json_schema(377-387)json_schema(452-464)json_schema(495-510)json_schema(545-562)json_schema(654-656)json_schema(862-864)json_schema(983-995)crates/biome_configuration/src/analyzer/linter/mod.rs (2)
schema_name(67-69)json_schema(71-81)
crates/biome_rule_options/src/use_naming_convention.rs (5)
crates/biome_configuration/src/analyzer/mod.rs (33)
schema_name(106-108)schema_name(212-214)schema_name(373-375)schema_name(448-450)schema_name(491-493)schema_name(541-543)schema_name(651-653)schema_name(859-861)schema_name(979-981)json_schema(110-122)json_schema(216-228)json_schema(377-387)json_schema(452-464)json_schema(495-510)json_schema(545-562)json_schema(654-656)json_schema(862-864)json_schema(983-995)generator(112-112)generator(113-113)generator(218-218)generator(219-219)generator(378-378)generator(379-379)generator(453-453)generator(454-454)generator(497-497)generator(498-498)generator(547-547)generator(548-548)generator(549-549)generator(985-985)generator(986-986)crates/biome_configuration/src/bool.rs (2)
schema_name(105-107)json_schema(109-111)crates/biome_configuration/src/extends.rs (2)
schema_name(65-67)json_schema(69-78)crates/biome_configuration/src/lib.rs (2)
schema_name(430-432)json_schema(434-436)crates/biome_configuration/src/overrides.rs (2)
schema_name(104-106)json_schema(107-109)
xtask/codegen/src/generate_schema.rs (1)
crates/biome_service/src/workspace_types.rs (1)
rename_type(47-74)
crates/biome_diagnostics/src/display/backtrace.rs (3)
crates/biome_configuration/src/analyzer/mod.rs (33)
schema_name(106-108)schema_name(212-214)schema_name(373-375)schema_name(448-450)schema_name(491-493)schema_name(541-543)schema_name(651-653)schema_name(859-861)schema_name(979-981)json_schema(110-122)json_schema(216-228)json_schema(377-387)json_schema(452-464)json_schema(495-510)json_schema(545-562)json_schema(654-656)json_schema(862-864)json_schema(983-995)generator(112-112)generator(113-113)generator(218-218)generator(219-219)generator(378-378)generator(379-379)generator(453-453)generator(454-454)generator(497-497)generator(498-498)generator(547-547)generator(548-548)generator(549-549)generator(985-985)generator(986-986)crates/biome_configuration/src/bool.rs (2)
schema_name(105-107)json_schema(109-111)crates/biome_diagnostics/src/serde.rs (2)
schema_name(364-366)json_schema(368-370)
crates/biome_js_formatter/src/context/trailing_commas.rs (1)
crates/biome_json_formatter/src/context.rs (2)
schema_name(112-114)json_schema(116-122)
crates/biome_rule_options/src/no_undeclared_dependencies.rs (3)
crates/biome_configuration/src/analyzer/mod.rs (18)
schema_name(106-108)schema_name(212-214)schema_name(373-375)schema_name(448-450)schema_name(491-493)schema_name(541-543)schema_name(651-653)schema_name(859-861)schema_name(979-981)json_schema(110-122)json_schema(216-228)json_schema(377-387)json_schema(452-464)json_schema(495-510)json_schema(545-562)json_schema(654-656)json_schema(862-864)json_schema(983-995)crates/biome_configuration/src/analyzer/linter/mod.rs (2)
schema_name(67-69)json_schema(71-81)crates/biome_configuration/src/extends.rs (2)
schema_name(65-67)json_schema(69-78)
crates/biome_configuration/src/lib.rs (5)
crates/biome_configuration/src/analyzer/mod.rs (33)
schema_name(106-108)schema_name(212-214)schema_name(373-375)schema_name(448-450)schema_name(491-493)schema_name(541-543)schema_name(651-653)schema_name(859-861)schema_name(979-981)json_schema(110-122)json_schema(216-228)json_schema(377-387)json_schema(452-464)json_schema(495-510)json_schema(545-562)json_schema(654-656)json_schema(862-864)json_schema(983-995)generator(112-112)generator(113-113)generator(218-218)generator(219-219)generator(378-378)generator(379-379)generator(453-453)generator(454-454)generator(497-497)generator(498-498)generator(547-547)generator(548-548)generator(549-549)generator(985-985)generator(986-986)crates/biome_configuration/src/analyzer/linter/mod.rs (2)
schema_name(67-69)json_schema(71-81)crates/biome_configuration/src/bool.rs (2)
schema_name(105-107)json_schema(109-111)crates/biome_configuration/src/overrides.rs (2)
schema_name(104-106)json_schema(107-109)crates/biome_glob/src/lib.rs (2)
schema_name(382-384)json_schema(386-388)
crates/biome_service/src/workspace.rs (1)
crates/biome_configuration/src/analyzer/mod.rs (33)
schema_name(106-108)schema_name(212-214)schema_name(373-375)schema_name(448-450)schema_name(491-493)schema_name(541-543)schema_name(651-653)schema_name(859-861)schema_name(979-981)json_schema(110-122)json_schema(216-228)json_schema(377-387)json_schema(452-464)json_schema(495-510)json_schema(545-562)json_schema(654-656)json_schema(862-864)json_schema(983-995)generator(112-112)generator(113-113)generator(218-218)generator(219-219)generator(378-378)generator(379-379)generator(453-453)generator(454-454)generator(497-497)generator(498-498)generator(547-547)generator(548-548)generator(549-549)generator(985-985)generator(986-986)
crates/biome_rule_options/src/shared/restricted_regex.rs (3)
crates/biome_configuration/src/analyzer/mod.rs (33)
schema_name(106-108)schema_name(212-214)schema_name(373-375)schema_name(448-450)schema_name(491-493)schema_name(541-543)schema_name(651-653)schema_name(859-861)schema_name(979-981)json_schema(110-122)json_schema(216-228)json_schema(377-387)json_schema(452-464)json_schema(495-510)json_schema(545-562)json_schema(654-656)json_schema(862-864)json_schema(983-995)generator(112-112)generator(113-113)generator(218-218)generator(219-219)generator(378-378)generator(379-379)generator(453-453)generator(454-454)generator(497-497)generator(498-498)generator(547-547)generator(548-548)generator(549-549)generator(985-985)generator(986-986)crates/biome_configuration/src/bool.rs (2)
schema_name(105-107)json_schema(109-111)crates/biome_configuration/src/lib.rs (2)
schema_name(430-432)json_schema(434-436)
xtask/codegen/src/generate_bindings.rs (2)
crates/biome_service/src/workspace_types.rs (2)
SchemaGenerator(731-731)SchemaGenerator(732-732)crates/biome_wasm/build.rs (1)
SchemaGenerator(25-26)
crates/biome_diagnostics_categories/build.rs (3)
crates/biome_configuration/src/analyzer/mod.rs (18)
schema_name(106-108)schema_name(212-214)schema_name(373-375)schema_name(448-450)schema_name(491-493)schema_name(541-543)schema_name(651-653)schema_name(859-861)schema_name(979-981)json_schema(110-122)json_schema(216-228)json_schema(377-387)json_schema(452-464)json_schema(495-510)json_schema(545-562)json_schema(654-656)json_schema(862-864)json_schema(983-995)crates/biome_configuration/src/bool.rs (2)
schema_name(105-107)json_schema(109-111)crates/biome_configuration/src/lib.rs (2)
schema_name(430-432)json_schema(434-436)
crates/biome_rule_options/src/use_consistent_graphql_descriptions.rs (3)
crates/biome_js_formatter/src/context/trailing_commas.rs (2)
schema_name(108-110)json_schema(112-118)crates/biome_json_formatter/src/context.rs (2)
schema_name(112-114)json_schema(116-122)crates/biome_rule_options/src/use_import_type.rs (2)
schema_name(38-40)json_schema(42-48)
crates/biome_rule_options/src/use_import_type.rs (2)
crates/biome_js_formatter/src/context/trailing_commas.rs (2)
schema_name(108-110)json_schema(112-118)crates/biome_rule_options/src/use_consistent_graphql_descriptions.rs (2)
schema_name(28-30)json_schema(32-38)
crates/biome_rule_options/src/organize_imports/import_groups.rs (2)
crates/biome_configuration/src/analyzer/mod.rs (33)
schema_name(106-108)schema_name(212-214)schema_name(373-375)schema_name(448-450)schema_name(491-493)schema_name(541-543)schema_name(651-653)schema_name(859-861)schema_name(979-981)json_schema(110-122)json_schema(216-228)json_schema(377-387)json_schema(452-464)json_schema(495-510)json_schema(545-562)json_schema(654-656)json_schema(862-864)json_schema(983-995)generator(112-112)generator(113-113)generator(218-218)generator(219-219)generator(378-378)generator(379-379)generator(453-453)generator(454-454)generator(497-497)generator(498-498)generator(547-547)generator(548-548)generator(549-549)generator(985-985)generator(986-986)crates/biome_configuration/src/extends.rs (2)
schema_name(65-67)json_schema(69-78)
crates/biome_json_formatter/src/context.rs (3)
crates/biome_js_formatter/src/context/trailing_commas.rs (2)
schema_name(108-110)json_schema(112-118)crates/biome_rule_options/src/use_consistent_graphql_descriptions.rs (2)
schema_name(28-30)json_schema(32-38)crates/biome_rule_options/src/use_import_type.rs (2)
schema_name(38-40)json_schema(42-48)
crates/biome_configuration/src/bool.rs (4)
crates/biome_configuration/src/analyzer/mod.rs (33)
schema_name(106-108)schema_name(212-214)schema_name(373-375)schema_name(448-450)schema_name(491-493)schema_name(541-543)schema_name(651-653)schema_name(859-861)schema_name(979-981)json_schema(110-122)json_schema(216-228)json_schema(377-387)json_schema(452-464)json_schema(495-510)json_schema(545-562)json_schema(654-656)json_schema(862-864)json_schema(983-995)generator(112-112)generator(113-113)generator(218-218)generator(219-219)generator(378-378)generator(379-379)generator(453-453)generator(454-454)generator(497-497)generator(498-498)generator(547-547)generator(548-548)generator(549-549)generator(985-985)generator(986-986)crates/biome_configuration/src/analyzer/linter/mod.rs (2)
schema_name(67-69)json_schema(71-81)crates/biome_configuration/src/extends.rs (2)
schema_name(65-67)json_schema(69-78)crates/biome_configuration/src/lib.rs (2)
schema_name(430-432)json_schema(434-436)
crates/biome_configuration/src/extends.rs (4)
crates/biome_configuration/src/analyzer/mod.rs (33)
schema_name(106-108)schema_name(212-214)schema_name(373-375)schema_name(448-450)schema_name(491-493)schema_name(541-543)schema_name(651-653)schema_name(859-861)schema_name(979-981)json_schema(110-122)json_schema(216-228)json_schema(377-387)json_schema(452-464)json_schema(495-510)json_schema(545-562)json_schema(654-656)json_schema(862-864)json_schema(983-995)generator(112-112)generator(113-113)generator(218-218)generator(219-219)generator(378-378)generator(379-379)generator(453-453)generator(454-454)generator(497-497)generator(498-498)generator(547-547)generator(548-548)generator(549-549)generator(985-985)generator(986-986)crates/biome_configuration/src/bool.rs (2)
schema_name(105-107)json_schema(109-111)crates/biome_configuration/src/lib.rs (2)
schema_name(430-432)json_schema(434-436)crates/biome_configuration/src/overrides.rs (2)
schema_name(104-106)json_schema(107-109)
crates/biome_service/src/workspace_types.rs (3)
crates/biome_wasm/build.rs (1)
SchemaGenerator(25-26)xtask/codegen/src/generate_bindings.rs (3)
SchemaGenerator(158-159)SchemaGenerator(161-162)SchemaGenerator(164-165)xtask/codegen/src/generate_schema.rs (1)
rename_type(30-57)
crates/biome_configuration/src/overrides.rs (4)
crates/biome_configuration/src/analyzer/mod.rs (33)
schema_name(106-108)schema_name(212-214)schema_name(373-375)schema_name(448-450)schema_name(491-493)schema_name(541-543)schema_name(651-653)schema_name(859-861)schema_name(979-981)json_schema(110-122)json_schema(216-228)json_schema(377-387)json_schema(452-464)json_schema(495-510)json_schema(545-562)json_schema(654-656)json_schema(862-864)json_schema(983-995)generator(112-112)generator(113-113)generator(218-218)generator(219-219)generator(378-378)generator(379-379)generator(453-453)generator(454-454)generator(497-497)generator(498-498)generator(547-547)generator(548-548)generator(549-549)generator(985-985)generator(986-986)crates/biome_configuration/src/bool.rs (2)
schema_name(105-107)json_schema(109-111)crates/biome_configuration/src/extends.rs (2)
schema_name(65-67)json_schema(69-78)crates/biome_configuration/src/lib.rs (2)
schema_name(430-432)json_schema(434-436)
⏰ 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). (24)
- GitHub Check: Test Node.js API
- GitHub Check: Bench (biome_graphql_parser)
- GitHub Check: Bench (biome_graphql_formatter)
- GitHub Check: End-to-end tests
- GitHub Check: Test (depot-ubuntu-24.04-arm-16)
- GitHub Check: Test (depot-windows-2022-16)
- GitHub Check: Documentation
- GitHub Check: Check Dependencies
- GitHub Check: Check JS Files
- GitHub Check: Bench (biome_package)
- GitHub Check: Bench (biome_configuration)
- GitHub Check: Bench (biome_tailwind_parser)
- GitHub Check: autofix
- GitHub Check: Bench (biome_css_parser)
- GitHub Check: Bench (biome_js_formatter)
- GitHub Check: Bench (biome_css_analyze)
- GitHub Check: Bench (biome_js_parser)
- GitHub Check: Bench (biome_css_formatter)
- GitHub Check: Bench (biome_js_analyze)
- GitHub Check: Bench (biome_module_graph)
- GitHub Check: Bench (biome_json_formatter)
- GitHub Check: Bench (biome_json_parser)
- GitHub Check: Bench (biome_json_analyze)
- GitHub Check: Parser conformance
🔇 Additional comments (18)
xtask/codegen/src/generate_bindings.rs (1)
13-13: LGTM! Import path correctly updated for schemars v1.The import path adjustment from
r#gentogeneratealigns with the schemars v1 API, and the usage pattern remains consistent throughout the file.crates/biome_rule_options/src/shared/restricted_regex.rs (1)
107-116: LGTM! Clean schemars v1 migration.The changes correctly adopt the new API:
Cow<'static, str>for schema names and updated type paths forSchemaGeneratorandSchema. The implementation properly delegates toString::json_schema(generator), which is appropriate since restricted regexes are serialised as strings.crates/biome_rule_options/src/use_import_type.rs (1)
36-49: LGTM! Clean migration to schemars v1.The manual
JsonSchemaimplementation correctly replaces the derive macro and follows the established pattern from other enums in the codebase. The enum values properly match the serde camelCase serialisation.crates/biome_js_formatter/src/context/trailing_commas.rs (1)
106-119: LGTM! Clean schemars v1 migration.The explicit
JsonSchemaimplementation correctly follows the new API pattern:schema_name()returnsCow::Borrowed, enum values match the variants in declaration order, and the description appropriately specifies JavaScript/TypeScript files.crates/biome_json_formatter/src/context.rs (1)
110-123: LGTM! Consistent with the JS formatter migration.The implementation correctly adapts to schemars v1 with the appropriate schema name and enum values for JSON files. The two-value enum (excluding "es5") is correct for JSON context.
crates/biome_wasm/Cargo.toml (2)
25-25: Feature enabling looks sound.The
features = ["schema"]onbiome_servicein both[dependencies]and[build-dependencies]aligns with enabling schema functionality for the wasm layer and build codegen. This is consistent with the broader schemars v1 migration.Also applies to: 45-45
31-31:serde_jsonruntime dependency makes sense.Adding
serde_jsonto[dependencies]aligns with the PR summary that schemas are now JSON objects queried viaserde_json::Value. This is a necessary runtime dependency for wasm bindings.crates/biome_rule_options/src/no_restricted_elements.rs (1)
46-48: LGTM: Schema name correctly migrated to schemars v1.The return type and value match the schemars v1 pattern.
crates/biome_rule_options/src/use_exhaustive_dependencies.rs (1)
158-159: LGTM!Correct migration to schemars v1—
Cow<'static, str>return type and implementation match the updated API patterns.crates/biome_configuration/src/bool.rs (1)
104-112: LGTM!The JsonSchema implementation correctly adopts the schemars v1 API:
Cow<'static, str>for the schema name and the updatedSchemaGeneratorpath. Delegating tobool::json_schema(generator)is the right approach.crates/biome_configuration/src/lib.rs (1)
429-437: LGTM!The JsonSchema implementation for
Schemafollows the same pattern as other updated implementations across the crate, correctly usingCow::Borrowedand delegating toString::json_schema(generator).crates/biome_service/src/workspace.rs (2)
425-445: LGTM with observation.The
FeaturesSupportedJsonSchema implementation correctly uses the new schemars v1 API with macro-based schema construction. The references to#/components/schemas/follow the OpenAPI 3.0 convention, which appears intentional for this migration.
672-680: LGTM!The
FeatureNameimplementation properly delegates toVec<FeatureKind>::json_schema(generator), which is the correct approach for this wrapper type.crates/biome_configuration/src/analyzer/mod.rs (4)
101-123: LGTM!The feature-gated
JsonSchemaimplementation forRuleConfiguration<T>correctly uses the new schemars v1 API. The dynamic schema naming andoneOfconstruction usingsubschema_foris appropriate for this generic type.
207-229: LGTM!The
RuleFixConfiguration<T>implementation follows the same correct pattern asRuleConfiguration<T>, with proper handling of the generic type parameter in the schema name and structure.
486-511: LGTM!The
RuleWithOptions<T>implementation correctly specifies"level"as required and setsadditionalProperties: false, which ensures proper validation of the configuration object.
974-996: LGTM!The
SeverityOrGroup<G>implementation correctly usesanyOfto combine the plain and group schemas, which is appropriate for this untagged enum.crates/biome_service/src/workspace_types.rs (1)
7-42: Migration fromSchemaObjecttoValueis correct.The code properly handles the type transition.
Schema::as_value()returns a reference to the underlyingserde_json::Value, making line 572 (root_schema.as_value()) the correct conversion for passing to the queue. Line 560's.get("title")pattern is also valid—Schemawraps the JSON value and exposes compatible accessor methods. All schema access patterns throughout the file use the properValueAPI.
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
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
crates/biome_service/src/workspace_types.rs (2)
319-336: Handle the unwrap on line 328.
value.as_f64().unwrap()will panic if the number can't be converted to f64. Though JSON numbers typically convert cleanly, this should handle the error case gracefully.Apply this diff:
Value::Number(value) => AnyTsType::from( - make::ts_number_literal_type(make::js_number_literal(value.as_f64().unwrap())).build(), + make::ts_number_literal_type(make::js_number_literal(value.as_f64().unwrap_or(0.0))).build(), ),
338-357: Handle the unwrap on line 346.
item.unwrap()will panic if the iterator yields anErr. Consider handling this more gracefully.
🧹 Nitpick comments (3)
crates/biome_service/src/workspace_types.rs (3)
44-73: Extract duplicate rename_type to a shared module.This function duplicates logic from
xtask/codegen/src/generate_schema.rs:29-55. Consider moving it to a shared utility module (e.g.,biome_codegen_utils) to avoid maintaining identical implementations in two places.
86-149: Extract duplicate property handling logic.The code for building required_properties (lines 87-94) and property signatures (lines 104-149) is duplicated in the
generate_typefunction (lines 613-621, 626-666). Extract this into a helper function to reduce maintenance burden.Consider a helper like:
fn build_property_signature( property: &str, prop_schema: &Value, required_properties: &std::collections::HashSet<&str>, queue: &mut ModuleQueue, root_schema: &Schema, ) -> AnyTsTypeMember { // Common logic here }
613-666: Duplicate property handling logic (again).This section duplicates the required_properties building (lines 613-621) and property signature generation (lines 626-666) from the
instance_typefunction (lines 87-94, 104-149). Same suggestion: extract to a shared helper.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
packages/@biomejs/biome/configuration_schema.jsonis excluded by!**/configuration_schema.jsonand included by**
📒 Files selected for processing (2)
crates/biome_service/src/workspace_types.rs(9 hunks)xtask/codegen/src/generate_schema.rs(2 hunks)
🧰 Additional context used
🧠 Learnings (17)
📓 Common learnings
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.
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-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:
xtask/codegen/src/generate_schema.rscrates/biome_service/src/workspace_types.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 : Import and use the `FormatNode` trait for AST nodes
Applied to files:
xtask/codegen/src/generate_schema.rscrates/biome_service/src/workspace_types.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: Parser type must implement the biome_parser::Parser trait and hold context, token source, and optional options
Applied to files:
xtask/codegen/src/generate_schema.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:
xtask/codegen/src/generate_schema.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:
xtask/codegen/src/generate_schema.rscrates/biome_service/src/workspace_types.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: Lexer must implement the biome_parser::Lexer trait
Applied to files:
xtask/codegen/src/generate_schema.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:
xtask/codegen/src/generate_schema.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/context.rs : Create HtmlFormatContext in context.rs with comments and source_map fields and implement FormatContext and CstFormatContext
Applied to files:
xtask/codegen/src/generate_schema.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:
xtask/codegen/src/generate_schema.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:
xtask/codegen/src/generate_schema.rscrates/biome_service/src/workspace_types.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/src/type_info.rs : Add new TypeScript type support by extending the TypeData enum rather than introducing parallel structures.
Applied to files:
crates/biome_service/src/workspace_types.rs
📚 Learning: 2025-08-20T16:24:59.781Z
Learnt from: arendjr
Repo: biomejs/biome PR: 7266
File: crates/biome_js_type_info/src/type.rs:94-102
Timestamp: 2025-08-20T16:24:59.781Z
Learning: In crates/biome_js_type_info/src/type.rs, the flattened_union_variants() method returns TypeReference instances that already have the correct module IDs applied to them. These references should be used directly with resolver.resolve_reference() without applying additional module ID transformations, as variant references may originate from nested unions in different modules.
Applied to files:
crates/biome_service/src/workspace_types.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 : For non-mandatory tokens, use the provided helper constructors (e.g., `token`, `space_token`, `dynamic_token`)
Applied to files:
crates/biome_service/src/workspace_types.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/js_module_info/scoped_resolver.rs : Full inference must resolve TypeReference::Import across modules to TypeReference::Resolved when the target is available in the module graph.
Applied to files:
crates/biome_service/src/workspace_types.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/workspace_types.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/js_module_info/collector.rs : Thin (module-level) inference should resolve local and global bindings to TypeReference::Resolved, mark imported bindings as TypeReference::Import, and fall back to TypeReference::Unknown if unresolved.
Applied to files:
crates/biome_service/src/workspace_types.rs
🧬 Code graph analysis (2)
xtask/codegen/src/generate_schema.rs (1)
crates/biome_service/src/workspace_types.rs (1)
rename_type(47-73)
crates/biome_service/src/workspace_types.rs (3)
crates/biome_wasm/build.rs (1)
SchemaGenerator(25-26)xtask/codegen/src/generate_bindings.rs (3)
SchemaGenerator(158-159)SchemaGenerator(161-162)SchemaGenerator(164-165)xtask/codegen/src/generate_schema.rs (1)
rename_type(30-56)
⏰ 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). (26)
- GitHub Check: Bench (biome_css_analyze)
- GitHub Check: Bench (biome_css_formatter)
- GitHub Check: Bench (biome_css_parser)
- GitHub Check: Test Node.js API
- GitHub Check: Test (depot-ubuntu-24.04-arm-16)
- GitHub Check: Check Dependencies
- GitHub Check: End-to-end tests
- GitHub Check: Test (depot-windows-2022-16)
- GitHub Check: Lint project (depot-windows-2022)
- GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
- GitHub Check: Documentation
- GitHub Check: Parser conformance
- GitHub Check: Bench (biome_json_formatter)
- GitHub Check: Bench (biome_json_parser)
- GitHub Check: Bench (biome_package)
- GitHub Check: Bench (biome_json_analyze)
- GitHub Check: Bench (biome_module_graph)
- GitHub Check: autofix
- GitHub Check: Check JS Files
- GitHub Check: Bench (biome_graphql_parser)
- GitHub Check: Bench (biome_tailwind_parser)
- GitHub Check: Bench (biome_graphql_formatter)
- GitHub Check: Bench (biome_configuration)
- GitHub Check: Bench (biome_js_formatter)
- GitHub Check: Bench (biome_js_parser)
- GitHub Check: Bench (biome_js_analyze)
🔇 Additional comments (15)
xtask/codegen/src/generate_schema.rs (4)
4-5: LGTM—clean migration to schemars v1 types.The import changes correctly reflect the schemars v1 API shift from
RootSchema/SchemaObjecttoSchema, withserde_json::ValueandMapfor schema manipulation.
35-36: Excellent—consistent with workspace_types.rs.The new rename patterns for
RuleAssist*,RuleFixConfiguration, andSeverityOrGroupmatch the implementation incrates/biome_service/src/workspace_types.rs(lines 46-72), maintaining naming consistency across the codebase.Also applies to: 42-51, 53-54
61-100: LGTM—well-structured migration with backwards compatibility.The refactored logic correctly:
- Operates on
Schemausingserde_json::Valuemethods- Handles both
$defs(JSON Schema 2019-09+) anddefinitions(earlier drafts) with intentional preference for the former- Delegates recursive traversal to the new helper function
103-158: LGTM—thorough recursive traversal.The implementation comprehensively handles:
- Reference renaming for both
#/definitions/and#/$defs/formats- Properties, items (single object and tuple array forms)
- Composition keywords (
allOf,anyOf,oneOf)- Conditional keywords (
if,then,else,not)This ensures all nested schema references are correctly updated during migration.
crates/biome_service/src/workspace_types.rs (11)
7-42: LGTM! Clean migration to schemars v1 API.The ModuleQueue refactoring to use
&'a Valueinstead ofSchemaObjectis consistent throughout.
237-257: Nice fix for empty object handling!Properly generating
{}for empty objects withadditionalProperties: falseaddresses an edge case that was likely broken before.
260-307: Solid prefixItems support, but mind the assertions.The prefixItems handling for tuples is spot on. However, the assertions at lines 284 and 297 will panic if optional nested types appear. If this constraint is guaranteed by schema generation, consider documenting it; otherwise, replace with proper error handling.
359-384: Excellent addition for TypeScript semantics.Stripping null from optional union types is exactly right—
field?: Talready implies undefined, soT | nullbecomes justT. Clean implementation.
424-459: Robust $ref resolution with proper renaming.Handling multiple $ref formats (
#/$defs/,#/definitions/,#/components/schemas/) is thorough. Applyingrename_typeto references (line 452) ensures consistency with root type naming.
461-492: Mind the assertions in subschema handling.The allOf/anyOf/oneOf logic is sound, but assertions at lines 467 and 484 will panic on optional nested types. The pretty-printed error message (lines 485-489) is helpful for debugging. If this constraint is by design, document it clearly.
502-516: Smart handling of null-only enums.Excluding null-only types (
enum: [null]) from being marked optional (lines 502-505) is correct—these represent actual null values in unions, not optionality.
522-550: Proper boolean schema support.Mapping boolean schemas to
any(always valid) andnever(never valid) aligns with JSON Schema semantics. Tidy addition for v1.
578-585: Good catch on primitive type names.Skipping reserved primitive names prevents generating invalid TypeScript like
export type string = string. Sensible guard.
684-700: Watch the assertion at line 688.Same pattern as elsewhere: the assertion will panic if optional nested types appear. Verify this constraint is guaranteed upstream.
713-750: Clean WorkspaceMethod migration.Changing
RootSchematoSchemais the expected v1 API change. The rest is straightforward.
Summary
This PR moves to
schemarsv1, which is a breaking change.Important
This PR has been entirely created using Claude Code. I feed it with the migration guide, the PR from #6894
I made sure there were no regressions inside
workspace.ts. The only regressions you'll are around comments, but the rest of the types are the same.I also took the opportunity to fix the annoying problem we had with the Rule options. Now we generate nice numbers and types, automatically! Probably thanks to the new
schemarsAPIs.The bulk of changes are inside
workspace_types.ts, because now the schema is just a JSON object that you query usingserde_json::Value. I'm pretty confident that the code is decent enough because we don't have regressions inworkspace.tsTest Plan
CI should stay gree
Docs