Repository navigation
Stop dropping transitive packages behind a deep first visit - #115
Merged
Merged
Conversation
The dependency walk was depth-first with a first-visit-wins set and a depth limit of six. When a package was first met at the end of a long chain, it was marked visited there, so a later, shorter path to it returned early, and its own dependencies were cut off by the limit even when they sat two levels from the root. The parent was staged and the child silently was not, which surfaced later as CS0234 and a FileNotFoundException at runtime. Both the C# resolver and the F# fallback now walk the graph one level at a time with each id resolved once, so every package is first met along its shortest path and the version declared nearest the root is kept. The visited set already bounds the walk, so the depth limit is removed. A regression test builds a local feed whose graph reaches a package through a six-hop chain before its direct edge and asserts its dependency is resolved; it fails on the old walk. Fixes #112. Signed-off-by: Torrey Betts <[email protected]>
Closed
2 tasks done
SummarySummary
CoverageVerso - 82.1%
Verso.Abstractions - 84.2%
Verso.Ado - 81.4%
Verso.Blazor - 27.6%
Verso.Blazor.Shared - 61.9%
Verso.Cli - 41.4%
Verso.DataFrame - 82.3%
Verso.FSharp - 81.8%
Verso.Host - 56.2%
Verso.Http - 74.7%
Verso.JavaScript - 52.7%
Verso.PowerShell - 64.7%
Verso.Python - 78.1%
Verso.Sample.Diagram - 80.1%
Verso.Sample.Dice - 82.2%
Verso.Sample.Slides - 58.8%
Verso.Sample.Sparkline - 67.3%
Verso.Testing - 79.7%
|
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.
The dependency walk was depth-first with a first-visit-wins set and a depth limit of six. When a package was first met at the end of a long chain, it was marked visited there, so a later, shorter path to it returned early, and its own dependencies were cut off by the limit even when they sat two levels from the root. The parent was staged and the child silently was not, which surfaced later as CS0234 and a FileNotFoundException at runtime.
Both the C# resolver and the F# fallback now walk the graph one level at a time with each id resolved once, so every package is first met along its shortest path and the version declared nearest the root is kept. The visited set already bounds the walk, so the depth limit is removed.
A regression test builds a local feed whose graph reaches a package through a six-hop chain before its direct edge and asserts its dependency is resolved. It fails on the old walk and passes now; the full Verso.Tests and Verso.FSharp.Tests suites are green.
Fixes #112.