fix(dart): mark "direct overridden" pub dependencies as direct - #11070
Open
sueun-dev wants to merge 1 commit into
Open
fix(dart): mark "direct overridden" pub dependencies as direct#11070sueun-dev wants to merge 1 commit into
sueun-dev wants to merge 1 commit into
Conversation
pubspec.lock records four dependency kinds, but relationship() only handled three. Pub writes "direct overridden" for packages pinned via dependency_overrides, which fell through to RelationshipUnknown instead of RelationshipDirect. Add it to the direct case and a regression test.
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.
Description
pubspec.lockrecords four dependency kinds, but the parser only handled three. Pub writesdependency: "direct overridden"for any package pinned throughdependency_overrides, andrelationship()had no case for it, so those packages were reported asRelationshipUnknowninstead ofRelationshipDirect.The kinds come from pub's lockfile writer (
lib/src/lock_file.dartin dart-lang/pub):direct main,direct devanddirect overriddenare all direct dependencies; onlytransitiveis indirect.This adds
direct overriddento the direct case and a regression test (testdata/overridden.lock) with a package pinned viadependency_overrides, which was reported as Unknown before and is Direct after. The stale comment that said there are three kinds is corrected.Related issues
None; found while reading the pub lockfile format.
Checklist