Skip to content

Conversation

@JacquesLeupin
Copy link
Contributor

Summary

Fixes #8488.

In monorepos where nested configurations use extends: "//", relative plugin paths declared in the root configuration could be resolved relative to the child configuration directory, causing plugin loading to fail with "Cannot read file." This is related to the extends: "//" behavior discussed in #8360.

This PR normalizes plugin paths relative to the directory of the configuration file that declares them so that merged configurations keep consistent plugin path semantics.

AI disclosure: I used AI assistance (Cursor / GPT) to explore the codebase and draft the fix and tests.

Test Plan

  • Added unit tests for plugin path normalization.
  • Added a regression test covering a monorepo where root config plugins are inherited by a child config using extends: "//".

Commands run:

  • cargo test -p biome_plugin_loader
  • cargo test -p biome_cli --test main -- cases::monorepo
  • cargo test -p biome_service
  • cargo fmt --check
  • cargo clippy -p biome_service -p biome_cli -p biome_plugin_loader -- -D warnings

Docs

No documentation changes are needed (bugfix only).

@changeset-bot
Copy link

changeset-bot bot commented Dec 20, 2025

🦋 Changeset detected

Latest commit: 7d98151

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 labels Dec 20, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 20, 2025

Walkthrough

Normalises plugin paths after configuration extends are applied so relative plugin paths are resolved against the configuration file directory (or the external resolution base if missing). The change adds Plugins::normalize_relative_paths(&mut self, base_dir: &Utf8Path) and invokes it after extends/migration for the main configuration and each override pattern, mutating plugin path entries in-place. Adds unit tests for path normalisation and an integration test verifying plugins from a root config apply when a child config extends it.

Possibly related PRs

Suggested reviewers

  • dyc3

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title directly describes the main change: normalizing relative plugin paths during configuration loading, which is the core fix for issue #8488.
Description check ✅ Passed The description clearly relates to the changeset by explaining the bug fix, the issue it addresses, test coverage, and verification steps performed.
✨ Finishing touches
  • 📝 Generate docstrings

📜 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 e127306 and 7d98151.

⛔ Files ignored due to path filters (1)
  • crates/biome_cli/tests/snapshots/main_cases_monorepo/plugins_from_root_config_work_in_child_config_extends_root.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (2)
  • .changeset/cruel-clouds-crash.md
  • crates/biome_cli/tests/cases/monorepo.rs
🚧 Files skipped from review as they are similar to previous changes (2)
  • crates/biome_cli/tests/cases/monorepo.rs
  • .changeset/cruel-clouds-crash.md
⏰ 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). (8)
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Check Dependencies
  • GitHub Check: Documentation
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: autofix
  • GitHub Check: Test Node.js API

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@JacquesLeupin JacquesLeupin force-pushed the fix/plugin-relative-paths-config-merge branch from e4d063a to e127306 Compare December 20, 2025 21:00
@deww400

This comment has been minimized.

@deww400
Copy link

deww400 commented Dec 28, 2025

@dyc3 are you able to review this PR?

@JacquesLeupin JacquesLeupin force-pushed the fix/plugin-relative-paths-config-merge branch from e127306 to 7d98151 Compare December 29, 2025 23:02
Copy link
Contributor

@arendjr arendjr left a comment

Choose a reason for hiding this comment

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

I didn’t look into the code too deeply, but if tests are green and you can confirm the fix works, @deww400 , I think it may be good to go.

Copy link
Contributor

@dyc3 dyc3 left a comment

Choose a reason for hiding this comment

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

LGTM

@dyc3 dyc3 merged commit 17a6156 into biomejs:main Dec 30, 2025
13 checks passed
@github-actions github-actions bot mentioned this pull request Dec 30, 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-Project Area: project

4 participants