[repo-assist] Treat missing dependencies as no dependencies (with test) - #4373
Merged
dsyme merged 2 commits intoAug 27, 2026
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
🤖 This is an automated response from Repo Assist.
This PR replicates the changes from #4321 (which is from a fork and couldn't be updated directly) and adds the requested test, per
@dsyme's request: "Please make a new PR with the same contents as this PR but adding a test."Root cause
Some OData feeds (e.g. JFrog Artifactory) omit the
<d:Dependencies>node entirely for packages that have no dependencies, instead of including it with empty content.NuGetV2.fspreviously treated a missing node as an error (failwithf "unable to find dependencies for package..."), causing package resolution to fail against such feeds.Fix
Cherry-picked from the original PR (commit
d98e779ea): when theDependenciesnode is absent, treat it as an empty dependency list ("") instead of throwing.Test added
can parse package without Dependencies node as no dependenciesintests/Paket.Tests/NuGetOData/ODataSpecs.fs, using a new fixtureNuGetOData/NoDependenciesNode.xml(an OData entry without the<d:Dependencies>element, modeled on the Artifactory response shape). It asserts the parsed entry has an emptySerializedDependencieslist instead of throwing.Test Status
Ran
dotnet test tests/Paket.Tests/Paket.Tests.fsproj --filter "FullyQualifiedName~ODataSpecs"— all 13 tests pass on net9. The net461 target could not execute in this sandbox (Could not find 'mono' host), which is an environment limitation unrelated to this change.Add this agentic workflow to your repo
To install this agentic workflow, run