Skip to content

fix(install): warn on deprecated override refs#859

Merged
jdx merged 1 commit into
mainfrom
codex/dollar-override-warning
Jun 11, 2026
Merged

fix(install): warn on deprecated override refs#859
jdx merged 1 commit into
mainfrom
codex/dollar-override-warning

Conversation

@jdx

@jdx jdx commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • warn when merged overrides use pnpm's deprecated `` reference syntax
  • keep existing resolution/drop behavior unchanged
  • add the new warning code to generated error-code docs data

Tests

  • cargo run -p aube-codes --bin generate-error-codes-docs
  • cargo test -p aube-codes
  • cargo test -p aube deprecated_dollar_override_refs_reports_only_ref_values
  • cargo clippy -p aube-codes -p aube -- -D warnings

Note

Low Risk
Advisory-only tracing during install settings validation; override merge and drop behavior are unchanged.

Overview
Install now surfaces pnpm’s deprecated $ override syntax as an advisory warning while leaving resolution unchanged.

After merged overrides are built in configure_resolver, a new deprecated_dollar_override_refs helper flags values that start with $ (excluding bare $) and logs WARN_AUBE_OVERRIDE_DOLLAR_REF_DEPRECATED, pointing users toward catalog entries. The existing WARN_AUBE_OVERRIDE_MISSING_DEP path for unresolved $ refs still runs afterward.

The warning is registered in aube-codes and docs/error-codes.data.json, with a unit test on the detector.

Reviewed by Cursor Bugbot for commit 3363c30. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • New Features

    • Added detection and warnings for deprecated $ version reference syntax in package overrides, helping identify and migrate outdated override configurations.
  • Documentation

    • Updated error codes documentation to include the new override deprecation warning.

@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds detection for deprecated pnpm dollar-reference syntax in package overrides. A new warning code is defined with metadata, detection logic extracts deprecated $ references during resolver configuration and emits warnings, and the warning is documented in the error codes registry.

Changes

Deprecated Dollar Override Warning

Layer / File(s) Summary
Warning code definition
crates/aube-codes/src/warnings.rs
Public constant WARN_AUBE_OVERRIDE_DOLLAR_REF_DEPRECATED is added with metadata entry in the warning registry categorized as SETTINGS_CONFIG.
Detection and warning emission
crates/aube/src/commands/install/settings.rs
Helper function deprecated_dollar_override_refs filters overrides for $-prefixed values, strips the prefix, excludes empty $, and returns (key, referenced_dep) pairs. In configure_resolver, the helper is called to emit a warning for each deprecated reference. Unit tests verify the helper correctly identifies only non-empty $ references.
Warning documentation
docs/error-codes.data.json
New warning entry documents WARN_AUBE_OVERRIDE_DOLLAR_REF_DEPRECATED with category and description of the deprecated override reference syntax.

🎯 2 (Simple) | ⏱️ ~10 minutes

🐰 A dollar sign, oh deprecated friend,

In pnpm overrides, your reign shall end!

Warnings now leap, from resolver's keen eye,

Pointing the way to the modern sky! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: adding a warning for deprecated pnpm override reference syntax ($), which aligns with all three modified files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

@greptile-apps

greptile-apps Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds an advisory warning (WARN_AUBE_OVERRIDE_DOLLAR_REF_DEPRECATED) for pnpm's deprecated $-prefixed version reference syntax in overrides entries, without changing any resolution or drop behavior. The warning fires after overrides are merged but before resolve_override_refs, so the existing WARN_AUBE_OVERRIDE_MISSING_DEP path continues to run unaffected.

  • New deprecated_dollar_override_refs helper filters merged overrides for $-prefixed values (excluding bare $), returning (key, dep) pairs used to emit the structured warning via tracing::warn!.
  • The code constant is registered in aube-codes following the project convention, and docs/error-codes.data.json is regenerated so the VitePress docs page picks it up automatically.
  • A unit test covers the positive case, the non-$ case, and the bare-$ exclusion.

Confidence Score: 5/5

Safe to merge; the change is purely advisory and touches no resolution or mutation logic.

The warning is emitted on a read-only pass over the already-merged overrides map and does not alter any data structure, drop behavior, or resolver inputs. The helper function is small and covered by a unit test that exercises the three important cases. All project conventions (error-code registration, tracing emit pattern, docs regeneration) are followed correctly.

No files require special attention.

Important Files Changed

Filename Overview
crates/aube-codes/src/warnings.rs Adds WARN_AUBE_OVERRIDE_DOLLAR_REF_DEPRECATED constant and its corresponding ALL entry; follows the established pattern exactly.
crates/aube/src/commands/install/settings.rs Adds deprecated_dollar_override_refs helper, emits warning after override merge but before resolve_override_refs, and adds a unit test covering positive, negative, and bare-$ cases.
docs/error-codes.data.json Regenerated JSON with the new warning entry; the VitePress data loader reads this file directly, so docs/error-codes.md is automatically updated at build time.

Reviews (1): Last reviewed commit: "fix(install): warn on deprecated overrid..." | Re-trigger Greptile

@jdx jdx merged commit ef906c4 into main Jun 11, 2026
18 checks passed
@jdx jdx deleted the codex/dollar-override-warning branch June 11, 2026 19:14
@cursor cursor Bot mentioned this pull request Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant