Repository navigation
fix: apply Dart dependency_overrides from pubspec.yaml - #680
Open
vibgrate-team wants to merge 1 commit into
Open
vibgrate-team wants to merge 1 commit into
vibgrate-team wants to merge 1 commit into
Conversation
dependency_overrides was ignored because any top-level key other than dependencies and dev_dependencies reset the parser section. Overrides now use the same entry forms, replace a declared spec while keeping its production or development flag, and add override-only packages as production rows. A present pubspec.lock still supplies the resolved version. Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: ABIZ - Agentic Business Record Standard <ops@to.co>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Applies
dependency_overridesfrompubspec.yamlwhen scanning Dart projects.What changed
parsePubspecYamlpreviously treated any top-level key other thandependencies/dev_dependenciesas the end of a section, so overrides were dropped.{ version: … }, nestedversion:,path:,git:) and are applied after both dependency sections are read.sdk:line inside a dependency section is no longer stored as the Dart SDK version.pubspec.lockparsing is unchanged: when present, its version is still the resolved version and still drives drift.Tests
test/dart-pubspec-map.test.tscovers the issue example, an overridden dev dependency, an override-only package, SDK overrides, map/path/git forms, a pubspec without overrides, and a lockfile whose resolved version stays locked.pnpm test,pnpm lintandpnpm typecheckpass.Closes #678