Skip to content

chore: expose schema generation function#8093

Merged
ematipico merged 3 commits intomainfrom
chore/expose-schema-generation
Nov 13, 2025
Merged

chore: expose schema generation function#8093
ematipico merged 3 commits intomainfrom
chore/expose-schema-generation

Conversation

@ematipico
Copy link
Member

@ematipico ematipico commented Nov 13, 2025

Summary

The codegen is currently broken because we updated the schemars package.

This PR exposes a new public function, generate_schema, so we can use it on the website instead of repeating code.

Less maintenance work.

Test Plan

CI should stay green

Docs

@changeset-bot
Copy link

changeset-bot bot commented Nov 13, 2025

⚠️ No Changeset found

Latest commit: dc72f21

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added the A-Tooling Area: internal tools label Nov 13, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 13, 2025

Walkthrough

Added pub fn generate_schema_as_string() -> Result<String> to build, serialise, parse and format the JSON schema for Configuration and return it as a String. Changed generate_configuration_schema(mode: Mode) to pub fn and made it call generate_schema_as_string(); error propagation now uses ?. Exposed the module conditionally in the crate root with #[cfg(feature = "schema")]. Across xtask crates many imports and helper calls were switched from xtask to xtask_glue and Cargo metadata adjusted (xtask/glue → xtask_glue).

Possibly related PRs

Suggested reviewers

  • arendjr
  • siketyan

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 24.24% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarises the main change: exposing a new public schema generation function for external use.
Description check ✅ Passed The description explains the motivation (codegen broke after schemars update), the solution (expose generate_schema function), and the benefit (reduced maintenance). It's directly related to the changeset.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/expose-schema-generation

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 354daf2 and dc72f21.

📒 Files selected for processing (4)
  • Cargo.toml (2 hunks)
  • xtask/codegen/Cargo.toml (1 hunks)
  • xtask/coverage/Cargo.toml (1 hunks)
  • xtask/glue/Cargo.toml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • xtask/coverage/Cargo.toml
  • Cargo.toml
  • xtask/glue/Cargo.toml
🧰 Additional context used
🧠 Learnings (1)
📓 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.
⏰ 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). (25)
  • GitHub Check: End-to-end tests
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Documentation
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Check Dependencies
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Test Node.js API
  • GitHub Check: Bench (biome_js_formatter)
  • GitHub Check: Bench (biome_js_analyze)
  • GitHub Check: Bench (biome_js_parser)
  • GitHub Check: Bench (biome_css_parser)
  • GitHub Check: Bench (biome_graphql_formatter)
  • GitHub Check: Bench (biome_graphql_parser)
  • GitHub Check: Bench (biome_css_analyze)
  • GitHub Check: Bench (biome_css_formatter)
  • GitHub Check: Bench (biome_tailwind_parser)
  • GitHub Check: Bench (biome_package)
  • GitHub Check: Bench (biome_json_formatter)
  • GitHub Check: Bench (biome_json_analyze)
  • GitHub Check: Bench (biome_json_parser)
  • GitHub Check: Bench (biome_configuration)
  • GitHub Check: Parser conformance
  • GitHub Check: autofix
  • GitHub Check: Bench (biome_module_graph)
🔇 Additional comments (1)
xtask/codegen/Cargo.toml (1)

16-16: Dependency migration looks solid.

Clean swap from path-based xtask to workspace-scoped xtask_glue. Using workspace = true is the idiomatic approach here.

Assuming this is part of the broader crate reorganisation, please verify that:

  • xtask_glue is registered as a workspace member in the root Cargo.toml
  • All import statements in the codegen modules have been updated to reference xtask_glue rather than xtask (as indicated in the summary)

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

@github-actions
Copy link
Contributor

Parser conformance results on

js/262

Test result main count This PR count Difference
Total 51108 51108 0
Passed 49895 49895 0
Failed 1171 1171 0
Panics 42 42 0
Coverage 97.63% 97.63% 0.00%

jsx/babel

Test result main count This PR count Difference
Total 40 40 0
Passed 37 37 0
Failed 3 3 0
Panics 0 0 0
Coverage 92.50% 92.50% 0.00%

symbols/microsoft

Test result main count This PR count Difference
Total 6322 6322 0
Passed 2106 2106 0
Failed 4216 4216 0
Panics 0 0 0
Coverage 33.31% 33.31% 0.00%

ts/babel

Test result main count This PR count Difference
Total 835 835 0
Passed 742 742 0
Failed 93 93 0
Panics 0 0 0
Coverage 88.86% 88.86% 0.00%

ts/microsoft

Test result main count This PR count Difference
Total 18815 18815 0
Passed 14066 14066 0
Failed 4748 4748 0
Panics 1 1 0
Coverage 74.76% 74.76% 0.00%

@ematipico ematipico force-pushed the chore/expose-schema-generation branch from 7588540 to df7bf47 Compare November 13, 2025 11:13
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (1)
xtask/codegen/src/generate_schema.rs (1)

9-19: Consider adding documentation for this public API.

Since generate_schema() is being exposed for use by the website, it would benefit from a doc comment explaining its purpose, return value, and potential errors.

Example:

+/// Generates a JSON schema for Biome's configuration.
+///
+/// Returns the schema as a formatted JSON string.
+///
+/// # Errors
+///
+/// Returns an error if schema serialization or formatting fails.
 pub fn generate_schema() -> Result<String> {
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7588540 and df7bf47.

📒 Files selected for processing (2)
  • xtask/codegen/src/generate_schema.rs (1 hunks)
  • xtask/codegen/src/lib.rs (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • xtask/codegen/src/lib.rs
🧰 Additional context used
🧠 Learnings (2)
📓 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.
📚 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:

  • xtask/codegen/src/generate_schema.rs
🧬 Code graph analysis (1)
xtask/codegen/src/generate_schema.rs (3)
xtask/codegen/src/lib.rs (1)
  • update (61-81)
crates/biome_json_parser/src/lib.rs (1)
  • parse_json (26-29)
xtask/src/lib.rs (1)
  • project_root (22-30)
⏰ 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). (9)
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: End-to-end tests
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Documentation
  • GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Check Dependencies
  • GitHub Check: Parser conformance
  • GitHub Check: autofix
🔇 Additional comments (1)
xtask/codegen/src/generate_schema.rs (1)

1-1: Clean refactoring that achieves the stated objective.

The extraction of generate_schema() into a reusable function is well done. The import change is correct, and the updated generate_configuration_schema() properly delegates to the new function whilst maintaining existing behaviour.

Also applies to: 21-29

@codspeed-hq
Copy link

codspeed-hq bot commented Nov 13, 2025

CodSpeed Performance Report

Merging #8093 will not alter performance

Comparing chore/expose-schema-generation (dc72f21) with main (963dbaf)

Summary

✅ 58 untouched
⏩ 95 skipped1

Footnotes

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between df7bf47 and 354daf2.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock and included by **
📒 Files selected for processing (32)
  • Cargo.toml (1 hunks)
  • xtask/codegen/Cargo.toml (1 hunks)
  • xtask/codegen/src/ast.rs (1 hunks)
  • xtask/codegen/src/formatter.rs (4 hunks)
  • xtask/codegen/src/generate_analyzer.rs (8 hunks)
  • xtask/codegen/src/generate_analyzer_rule_options.rs (1 hunks)
  • xtask/codegen/src/generate_bindings.rs (1 hunks)
  • xtask/codegen/src/generate_configuration.rs (4 hunks)
  • xtask/codegen/src/generate_grit_mappings.rs (2 hunks)
  • xtask/codegen/src/generate_license.rs (2 hunks)
  • xtask/codegen/src/generate_macros.rs (1 hunks)
  • xtask/codegen/src/generate_migrate_eslint.rs (2 hunks)
  • xtask/codegen/src/generate_new_analyzer_rule.rs (1 hunks)
  • xtask/codegen/src/generate_node_factory.rs (2 hunks)
  • xtask/codegen/src/generate_nodes.rs (2 hunks)
  • xtask/codegen/src/generate_nodes_mut.rs (2 hunks)
  • xtask/codegen/src/generate_schema.rs (1 hunks)
  • xtask/codegen/src/generate_syntax_factory.rs (2 hunks)
  • xtask/codegen/src/generate_syntax_kinds.rs (1 hunks)
  • xtask/codegen/src/generate_target_language_constants.rs (2 hunks)
  • xtask/codegen/src/lib.rs (2 hunks)
  • xtask/codegen/src/main.rs (4 hunks)
  • xtask/codegen/src/unicode.rs (2 hunks)
  • xtask/coverage/Cargo.toml (1 hunks)
  • xtask/coverage/src/compare.rs (1 hunks)
  • xtask/coverage/src/js/test262.rs (1 hunks)
  • xtask/coverage/src/jsx/jsx_babel.rs (1 hunks)
  • xtask/coverage/src/main.rs (2 hunks)
  • xtask/coverage/src/symbols/msts.rs (1 hunks)
  • xtask/coverage/src/ts/ts_babel.rs (1 hunks)
  • xtask/coverage/src/ts/ts_microsoft.rs (1 hunks)
  • xtask/glue/Cargo.toml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • xtask/codegen/src/lib.rs
🧰 Additional context used
🧠 Learnings (2)
📓 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.
📚 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:

  • xtask/codegen/src/generate_schema.rs
🧬 Code graph analysis (26)
xtask/codegen/src/generate_macros.rs (1)
xtask/glue/src/lib.rs (1)
  • reformat (43-45)
xtask/codegen/src/ast.rs (1)
xtask/glue/src/lib.rs (1)
  • project_root (22-30)
xtask/codegen/src/generate_license.rs (1)
xtask/glue/src/lib.rs (2)
  • project_root (22-30)
  • reformat (43-45)
xtask/codegen/src/generate_syntax_kinds.rs (1)
xtask/glue/src/lib.rs (1)
  • reformat (43-45)
xtask/codegen/src/generate_configuration.rs (2)
xtask/codegen/src/lib.rs (1)
  • update (58-78)
xtask/glue/src/lib.rs (1)
  • reformat (43-45)
xtask/coverage/src/ts/ts_babel.rs (1)
xtask/glue/src/lib.rs (1)
  • project_root (22-30)
xtask/codegen/src/generate_bindings.rs (1)
xtask/glue/src/lib.rs (1)
  • project_root (22-30)
xtask/codegen/src/unicode.rs (1)
xtask/glue/src/lib.rs (2)
  • reformat (43-45)
  • project_root (22-30)
xtask/codegen/src/generate_new_analyzer_rule.rs (1)
xtask/glue/src/lib.rs (1)
  • project_root (22-30)
xtask/codegen/src/generate_syntax_factory.rs (1)
xtask/glue/src/lib.rs (1)
  • reformat (43-45)
xtask/codegen/src/generate_target_language_constants.rs (1)
xtask/glue/src/lib.rs (1)
  • reformat (43-45)
xtask/coverage/src/compare.rs (1)
xtask/glue/src/lib.rs (1)
  • project_root (22-30)
xtask/codegen/src/generate_nodes_mut.rs (1)
xtask/glue/src/lib.rs (1)
  • reformat (43-45)
xtask/codegen/src/main.rs (3)
xtask/glue/src/lib.rs (1)
  • project_root (22-30)
xtask/glue/src/glue.rs (2)
  • pushd (75-78)
  • pushd (190-194)
xtask/codegen/src/generate_schema.rs (1)
  • generate_configuration_schema (23-31)
xtask/codegen/src/generate_nodes.rs (1)
xtask/glue/src/lib.rs (1)
  • reformat (43-45)
xtask/codegen/src/formatter.rs (1)
xtask/glue/src/lib.rs (3)
  • project_root (22-30)
  • reformat_with_command (47-51)
  • reformat_without_preamble (58-67)
xtask/coverage/src/js/test262.rs (1)
xtask/glue/src/lib.rs (1)
  • project_root (22-30)
xtask/coverage/src/main.rs (2)
xtask/glue/src/lib.rs (1)
  • project_root (22-30)
xtask/glue/src/glue.rs (2)
  • pushd (75-78)
  • pushd (190-194)
xtask/codegen/src/generate_schema.rs (3)
xtask/codegen/src/lib.rs (1)
  • update (58-78)
crates/biome_json_parser/src/lib.rs (1)
  • parse_json (26-29)
xtask/glue/src/lib.rs (1)
  • project_root (22-30)
xtask/coverage/src/ts/ts_microsoft.rs (1)
xtask/glue/src/lib.rs (1)
  • project_root (22-30)
xtask/codegen/src/generate_node_factory.rs (1)
xtask/glue/src/lib.rs (1)
  • reformat (43-45)
xtask/codegen/src/generate_analyzer.rs (1)
xtask/glue/src/lib.rs (2)
  • project_root (22-30)
  • reformat (43-45)
xtask/coverage/src/symbols/msts.rs (1)
xtask/glue/src/lib.rs (1)
  • project_root (22-30)
xtask/codegen/src/generate_migrate_eslint.rs (1)
xtask/glue/src/lib.rs (1)
  • reformat (43-45)
xtask/coverage/src/jsx/jsx_babel.rs (1)
xtask/glue/src/lib.rs (1)
  • project_root (22-30)
xtask/codegen/src/generate_grit_mappings.rs (1)
xtask/glue/src/lib.rs (1)
  • reformat (43-45)
⏰ 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). (25)
  • GitHub Check: Bench (biome_tailwind_parser)
  • GitHub Check: Bench (biome_graphql_formatter)
  • GitHub Check: Bench (biome_graphql_parser)
  • GitHub Check: Bench (biome_package)
  • GitHub Check: Bench (biome_configuration)
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Documentation
  • GitHub Check: End-to-end tests
  • GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: Check Dependencies
  • GitHub Check: Test Node.js API
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: autofix
  • GitHub Check: Bench (biome_js_parser)
  • GitHub Check: Bench (biome_json_formatter)
  • GitHub Check: Bench (biome_js_formatter)
  • GitHub Check: Bench (biome_js_analyze)
  • GitHub Check: Bench (biome_json_analyze)
  • GitHub Check: Bench (biome_json_parser)
  • GitHub Check: Bench (biome_css_analyze)
  • GitHub Check: Bench (biome_module_graph)
  • GitHub Check: Bench (biome_css_formatter)
  • GitHub Check: Parser conformance
  • GitHub Check: Bench (biome_css_parser)
🔇 Additional comments (32)
xtask/codegen/src/generate_new_analyzer_rule.rs (1)

4-4: LGTM! Import path updated correctly.

The refactoring from xtask to xtask_glue is properly applied here.

xtask/codegen/src/unicode.rs (2)

60-60: LGTM! Clean refactor to xtask_glue.

The switch from xtask::reformat to xtask_glue::reformat is correct and maintains the same behaviour.


62-62: LGTM! Consistent migration to xtask_glue.

Both occurrences of project_root() have been correctly updated to use xtask_glue. The function signature matches the usage pattern.

Also applies to: 84-84

xtask/codegen/src/generate_syntax_kinds.rs (1)

308-308: LGTM—consistent with the crate rename.

The refactoring from xtask::reformat to xtask_glue::reformat is correct.

xtask/coverage/src/symbols/msts.rs (1)

15-15: LGTM—import path updated correctly.

The change from xtask::project_root to xtask_glue::project_root aligns with the crate rename.

xtask/codegen/src/generate_macros.rs (1)

67-67: LGTM—refactoring applied consistently.

xtask/glue/Cargo.toml (1)

3-3: LGTM—package renamed correctly.

This is the source of the crate rename that cascades to all import paths across the codebase.

xtask/codegen/src/generate_target_language_constants.rs (1)

6-6: LGTM—imports and usage updated consistently.

Both the Result type import and the reformat function call have been updated to use xtask_glue.

Also applies to: 57-57

xtask/coverage/src/ts/ts_babel.rs (1)

12-12: LGTM—import updated correctly.

xtask/codegen/src/generate_license.rs (1)

7-8: LGTM—all xtask references migrated correctly.

The wildcard import, specific imports, and function call have all been updated to use xtask_glue.

Also applies to: 44-44

xtask/coverage/Cargo.toml (1)

3-3: LGTM—manifest updated correctly.

The package name has been updated to xtask_coverage, and the dependency has been changed from xtask to xtask_glue, aligning with the crate rename.

Also applies to: 29-29

xtask/coverage/src/ts/ts_microsoft.rs (1)

17-17: LGTM – Import path updated correctly.

The import correctly references the renamed crate.

xtask/coverage/src/js/test262.rs (1)

13-13: LGTM – Import path updated correctly.

Consistent with the crate rename to xtask_glue.

xtask/codegen/src/generate_syntax_factory.rs (1)

7-7: LGTM – Crate paths updated correctly.

Both the Result import and reformat call now correctly reference xtask_glue.

Also applies to: 175-175

xtask/codegen/src/generate_nodes_mut.rs (1)

4-4: LGTM – Crate references updated.

The Result type and reformat function now correctly use xtask_glue.

Also applies to: 91-91

xtask/codegen/src/generate_migrate_eslint.rs (1)

10-10: LGTM – Module paths updated.

Both the wildcard import and the reformat call correctly reference xtask_glue.

Also applies to: 51-51

xtask/codegen/src/generate_analyzer.rs (1)

6-6: LGTM – Comprehensive crate migration.

All imports and function calls have been correctly updated to use xtask_glue throughout the analyzer generation code.

Also applies to: 121-121, 196-196, 223-223, 242-242, 262-262, 282-282, 301-301

xtask/codegen/src/formatter.rs (1)

14-14: LGTM – Formatter utilities migrated.

All references to project_root, reformat_with_command, and reformat_without_preamble now correctly use xtask_glue.

Also applies to: 218-218, 456-458, 551-551

xtask/codegen/src/generate_bindings.rs (1)

15-15: LGTM – Import updated correctly.

The import now correctly references xtask_glue for Mode, Result, and project_root.

xtask/coverage/src/main.rs (2)

2-2: LGTM! Import path updated consistently.

The migration to xtask_glue aligns with the broader refactoring across the codebase.


45-55: Nice documentation improvement.

The expanded help text clarifies the valid suite values and documents the default behaviour, making the tool more user-friendly.

xtask/codegen/src/generate_node_factory.rs (1)

6-6: LGTM! Consistent migration to xtask_glue.

The import and function call updates are straightforward refactoring with no functional changes.

Also applies to: 217-217

xtask/codegen/src/generate_nodes.rs (1)

7-7: LGTM! Import path updates aligned with codebase migration.

Consistent with the broader refactoring to use xtask_glue.

Also applies to: 992-992

xtask/codegen/src/generate_configuration.rs (2)

17-17: LGTM! Wildcard import simplifies usage.

The use xtask_glue::*; brings in all needed utilities consistently.


281-281: LGTM! All reformat call sites updated consistently.

Multiple invocations of xtask_glue::reformat ensure uniform formatting across the generated configuration code.

Also applies to: 833-834, 1233-1233

xtask/codegen/src/generate_grit_mappings.rs (1)

2-2: LGTM! Consistent with the migration pattern.

Import and reformat call updated to use xtask_glue.

Also applies to: 130-130

xtask/codegen/src/generate_schema.rs (2)

9-20: Well-structured API extraction!

The new generate_schema_as_string() function cleanly separates schema generation logic from file I/O, making it reusable by the website. The formatting chain (build → serialise → parse → format → code) is correct.


22-31: Good separation of concerns.

generate_configuration_schema() now delegates to generate_schema_as_string() and handles only file writing. The visibility change to pub aligns with the PR objective to expose this for external use. Error propagation using ? is clean.

xtask/codegen/src/main.rs (1)

10-10: LGTM! Consistent import updates.

Migration to xtask_glue for utilities and Mode type is consistent with the broader refactoring.

Also applies to: 29-29

xtask/codegen/Cargo.toml (3)

16-16: LGTM! Dependency updated for glue crate migration.

The switch from xtask to xtask_glue (workspace dependency) is consistent with the broader refactoring.


18-44: Dependencies added to support schema generation.

The additional biome_* crates (particularly biome_json_formatter, biome_json_parser, biome_configuration) are required for the new generate_schema_as_string() function and are properly gated by feature flags.


46-77: Feature gates properly configured.

The schema feature correctly includes all dependencies needed for schema generation (schemars, serde_json, biome_json_formatter, biome_json_parser, etc.).

@ematipico ematipico merged commit 4872ca3 into main Nov 13, 2025
29 checks passed
@ematipico ematipico deleted the chore/expose-schema-generation branch November 13, 2025 12:17
ematipico added a commit to hamirmahal/biome that referenced this pull request Nov 19, 2025
l0ngvh pushed a commit to l0ngvh/biome that referenced this pull request Dec 21, 2025
@coderabbitai coderabbitai bot mentioned this pull request Dec 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Tooling Area: internal tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant