Skip to content

feat(nuget): transitive dependency resolution + editor-only assemblies - #9

Merged
klumhru merged 1 commit into
mainfrom
feat/nuget-dependency-resolution
Jun 22, 2026
Merged

feat(nuget): transitive dependency resolution + editor-only assemblies#9
klumhru merged 1 commit into
mainfrom
feat/nuget-dependency-resolution

Conversation

@klumhru

@klumhru klumhru commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Summary

Adds two opt-in capabilities to the nuget package type:

  • nugetResolveDependencies — walks the package's .nuspec dependency graph, downloads each transitive dependency, and extracts its DLLs into the same folder. Framework matching prefers an exact target, falling back to the nearest-compatible lower netstandard version; versions resolve to the range lower bound; package ids dedupe across diamond graphs.
  • editorOnly — routes extracted assemblies (and resolved deps) into an Editor/ special folder instead of Plugins/, for editor-only libs like Roslyn.

Framework/runtime meta-packages and Unity-provided System.* facades (System.Memory, System.Buffers, System.Runtime.CompilerServices.Unsafe, System.Numerics.Vectors, System.Threading.Tasks.Extensions, System.ValueTuple) are skipped to avoid duplicate-assembly conflicts. Meta-packages with no lib/ assemblies are tolerated — their own dependencies are still resolved.

Changes

  • internal/packager/nuspec.go (new) — .nuspec parsing, framework normalization, version-range parsing, dependency-group selection, skip list.
  • internal/packager/nuget.go — recursive resolveNuGetDeps, best-framework lib/ selection, Editor/ vs Plugins/ routing.
  • internal/config/config.gonugetResolveDependencies + editorOnly fields.
  • Docs: README.md, CLAUDE.md.

Testing

  • Unit tests: framework normalization, version-range resolution, skip list, dependency-group selection, nuspec parsing, best-framework selection.
  • Integration tests: TestIntegration_NuGet_ResolveDependencies (Grpc.Core, asserts facades skipped), TestIntegration_NuGet_EditorOnly (Newtonsoft.Json → Editor/).
  • Manually verified against Microsoft.CodeAnalysis.CSharp 4.8.0: full Roslyn tree resolved, facades dropped, assemblies placed under Editor/.

🤖 Generated with Claude Code

Add opt-in NuGet transitive dependency resolution and editor-only
placement for the nuget package type.

- nugetResolveDependencies: walk the .nuspec dependency graph, download
  each transitive dep, and extract its DLLs into the same folder.
  Framework matching prefers an exact target, falling back to the
  nearest-compatible lower netstandard version; versions resolve to the
  range lower bound; package ids dedupe across diamond graphs.
- Skip framework/runtime meta-packages and Unity-provided System.*
  facades (Memory, Buffers, Runtime.CompilerServices.Unsafe,
  Numerics.Vectors, Threading.Tasks.Extensions, ValueTuple) to avoid
  duplicate-assembly conflicts. Meta-packages with no lib assemblies are
  tolerated; their dependencies are still resolved.
- editorOnly: route extracted assemblies to an Editor/ special folder
  instead of Plugins/, for editor-only libs like Roslyn.

New internal/packager/nuspec.go handles .nuspec parsing, framework
normalization, version-range and skip-list logic. Adds unit tests plus
EditorOnly and ResolveDependencies integration tests. Docs updated in
README.md and CLAUDE.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 22, 2026 17:00
@klumhru
klumhru merged commit 579e8d5 into main Jun 22, 2026
1 of 2 checks passed
@klumhru
klumhru deleted the feat/nuget-dependency-resolution branch June 22, 2026 17:14
Copilot stopped reviewing on behalf of klumhru due to an error June 22, 2026 17:20
@klumhru
klumhru removed the request for review from Copilot June 22, 2026 17:23
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