Skip to content

fix(core): ignore nested configs#6662

Merged
arendjr merged 5 commits intobiomejs:mainfrom
arendjr:ignore-nested-configs
Jul 3, 2025
Merged

fix(core): ignore nested configs#6662
arendjr merged 5 commits intobiomejs:mainfrom
arendjr:ignore-nested-configs

Conversation

@arendjr
Copy link
Copy Markdown
Contributor

@arendjr arendjr commented Jul 2, 2025

Summary

Fixes #6509.

If a nested configuration file is ignored by the root configuration, it will now actually be ignored.

Biome has an exception in place for configuration files so they cannot be ignored, because the configuration files are vital to Biome itself. But this exception was incorrectly applied to nested configurations as well. Now only the root configuration is exempt from being ignored.

Additionally, I ran into quite a bit of a refactoring. I moved most of the implementation of WorkspaceServer::file_features() into projects.rs, so that we can again save ourselves some cloning and unnecessary Papaya lookups. But it turned out WorkspaceSettingsHandle was getting in the way of me doing that, so I had a hard look at WorkspaceSettingsHandle itself. Turned out that WorkspaceSettingsHandle was entirely unnecessary, and the fact it wrapped settings in an Option was unnecessary too. So I removed WorkspaceSettingsHandle and a lot of places that used to pass Option<&Settings> now pass a plain &Settings.

Test Plan

Test added and snapshots updated.

You may notice that for some snapshots, the amount of files checked has decreased by one. These are nested configuration files that were checked before, where this behaviour is unexpected with the new logic.

@arendjr arendjr requested review from a team July 2, 2025 07:05
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jul 2, 2025

🦋 Changeset detected

Latest commit: 2c8d765

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

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

Not sure what this means? Click here to learn what changesets are.

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

@github-actions github-actions Bot added A-CLI Area: CLI A-Project Area: project A-Formatter Area: formatter A-Tooling Area: internal tools L-JavaScript Language: JavaScript and super languages L-CSS Language: CSS and super languages L-JSON Language: JSON and super languages L-HTML Language: HTML and super languages L-Grit Language: GritQL labels Jul 2, 2025
Copy link
Copy Markdown
Member

@ematipico ematipico left a comment

Choose a reason for hiding this comment

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

Thank you for looking into this! We should update our docs and provide an example for this use case, and while doing so, we should highlight the fact that this "feature" works only when the nested configurations are specified in files.includes. Meaning that VCS ignore files aren't taken into consideration

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Jul 2, 2025

CodSpeed Performance Report

Merging #6662 will not alter performance

Comparing arendjr:ignore-nested-configs (2c8d765) with main (cd4a9bb)

Summary

✅ 114 untouched benchmarks

@arendjr arendjr force-pushed the ignore-nested-configs branch from b903dc0 to 1876202 Compare July 2, 2025 07:30
@arendjr
Copy link
Copy Markdown
Contributor Author

arendjr commented Jul 2, 2025

I've pushed a docs update to biomejs/website#2604

@github-actions github-actions Bot added the A-Core Area: core label Jul 3, 2025
@arendjr arendjr merged commit 3afc804 into biomejs:main Jul 3, 2025
29 checks passed
@github-actions github-actions Bot mentioned this pull request Jul 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CLI Area: CLI A-Core Area: core A-Formatter Area: formatter A-Project Area: project A-Tooling Area: internal tools L-CSS Language: CSS and super languages L-Grit Language: GritQL L-HTML Language: HTML and super languages L-JavaScript Language: JavaScript and super languages L-JSON Language: JSON and super languages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🐛 Can't ignore nested biome.json configuration

2 participants