feat(biome_service): include file path in NotFound diagnostic#9364
feat(biome_service): include file path in NotFound diagnostic#9364ematipico merged 5 commits intobiomejs:mainfrom
Conversation
🦋 Changeset detectedLatest commit: 99f1027 The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
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 |
ematipico
left a comment
There was a problem hiding this comment.
Looks good, three things need addressing:
- a comment of mine
- missing changeset
- AI disclosure (it's clearly AI stuff) by following our guidelines
- restore our PR template
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughThe NotFound diagnostic was changed from a unit variant to a struct containing Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.changeset/include-file-path-not-found.md (1)
5-5: Consider starting with issue link format.As per coding guidelines, bug fix changesets should start with
Fixed [#9357](https://github.com/biomejs/biome/issues/9357): ...format to link the resolved issue.Suggested format
-Include the file path in the `NotFound` diagnostic message so users can identify which file is missing from the workspace. +Fixed [`#9357`](https://github.com/biomejs/biome/issues/9357): Include the file path in the `NotFound` diagnostic message so users can identify which file is missing from the workspace.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.changeset/include-file-path-not-found.md at line 5, Update the changeset header to follow the bug-fix format "Fixed [`#9357`](https://github.com/biomejs/biome/issues/9357): ..." and modify the NotFound diagnostic message to include the missing file path so users know which file is absent; locate the diagnostic creation/use site (the code that constructs the NotFound diagnostic object or calls a function named NotFound/diagnostic/emitNotFound) and interpolate the file path variable into the message (e.g., "File not found: <path>") before emitting or returning the diagnostic.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.changeset/include-file-path-not-found.md:
- Line 5: Update the changeset header to follow the bug-fix format "Fixed
[`#9357`](https://github.com/biomejs/biome/issues/9357): ..." and modify the
NotFound diagnostic message to include the missing file path so users know which
file is absent; locate the diagnostic creation/use site (the code that
constructs the NotFound diagnostic object or calls a function named
NotFound/diagnostic/emitNotFound) and interpolate the file path variable into
the message (e.g., "File not found: <path>") before emitting or returning the
diagnostic.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: b2c16a23-79a0-449f-950e-5dcb1de99419
⛔ Files ignored due to path filters (1)
crates/biome_service/src/snapshots/not_found.snapis excluded by!**/*.snapand included by**
📒 Files selected for processing (3)
.changeset/include-file-path-not-found.mdcrates/biome_service/src/diagnostics.rscrates/biome_service/src/workspace/server.rs
The #[location(resource)] attribute on the path field already sets the file path in the diagnostic, making with_file_path unnecessary.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.changeset/include-file-path-not-found.md:
- Line 5: Remove the trailing space at the end of the sentence "Fixed
[`#9357`](https://github.com/biomejs/biome/issues/9357). Improved the information
emitted by some diagnostics." so the line ends immediately after the final
period; simply delete the extra whitespace character causing the pipeline
failure.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 45f4b569-2326-406c-8f93-6a78b24bc974
📒 Files selected for processing (1)
.changeset/include-file-path-not-found.md
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.changeset/include-file-path-not-found.md (1)
5-5: Consider a more specific description.Whilst "some diagnostics" is technically accurate, the description could be more specific to help users understand the impact. Something like "File not found errors now include the missing file path to aid debugging" would immediately convey what changed and why it matters.
As per coding guidelines: Changeset descriptions should explain the impact and what changed for end users in 1-3 sentences.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.changeset/include-file-path-not-found.md at line 5, Update the changeset summary in .changeset/include-file-path-not-found.md to be specific and 1–3 sentences long: replace the vague "Improved the information emitted by some diagnostics" with a concise description of the user-visible change (e.g., "File not found errors now include the missing file path to aid debugging") and ensure the entry references the issue number (Fixed `#9357`) and clearly states the impact for end users.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.changeset/include-file-path-not-found.md:
- Line 5: Update the changeset summary in
.changeset/include-file-path-not-found.md to be specific and 1–3 sentences long:
replace the vague "Improved the information emitted by some diagnostics" with a
concise description of the user-visible change (e.g., "File not found errors now
include the missing file path to aid debugging") and ensure the entry references
the issue number (Fixed `#9357`) and clearly states the impact for end users.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 04f6a152-9046-4c6f-8e94-907aea885e38
📒 Files selected for processing (1)
.changeset/include-file-path-not-found.md
Summary
Closes #9357
The
NotFounddiagnostic previously showed a generic message:without indicating which file was missing, making it impossible to debug in large projects.
This PR adds the file path to the diagnostic message:
AI Assistance Notice
This PR was written primarily with AI assistance (Claude). The implementation, tests, and changeset were all generated with AI help.
Changes
NotFoundfrom a unit struct to a struct with apath: Stringfield annotated with#[location(resource)]WorkspaceError::not_found()to accept a path parameterworkspace/server.rsto pass the file pathTest Plan
Docs
No documentation changes needed — this is an internal diagnostic improvement.