Skip to content

Unpack each NuGet provider's packages into a folder of its own - #71

Merged
Mpdreamz merged 1 commit into
mainfrom
temp-folders
Nov 14, 2026
Merged

Mpdreamz merged 1 commit into
mainfrom
temp-folders

Conversation

@Mpdreamz

Copy link
Copy Markdown
Contributor

previous-nuget and nuget for the same version now unpack into separate folders, cleared before each run, so their diff shows the real difference.

Prompt summary: The tool is being dusted off. Diffing the last release against the current version, the way CI does, has to give a correct answer on the first run and on every later one.

Why

Both providers unpacked into differ/nuget/<id>/<version>. previous-nuget|Proc|0.14.0 puts 0.13.0 there, and nuget|Proc|0.14.0 puts 0.14.0 next to it. Each provider treats the other folders as dependencies and copies their assemblies over its own, so the diff compared one build with itself and said "No diff". The folder stayed that way for every later run (#57).

What

A folder per provider

Packages unpack into differ/<provider>/<id>/<version>, so previous-nuget and nuget never share one. The folder is deleted before a run unpacks into it, because copying dependencies changes it. Downloads still come from the NuGet global packages folder, so a second run does not download again.

The github provider on Linux and macOS

github|... took its working folder from the TEMP environment variable, which only Windows sets, so it failed everywhere else. It now uses Path.GetTempPath().

Verify

mise run test
# Previous_nuget_and_nuget_for_one_version_unpack_apart runs the diff twice against nuget.org
dotnet run -c Release -f net11.0 --project src/assembly-differ -- diff 'previous-nuget|Proc|0.14.0|netstandard2.0' 'nuget|Proc|0.14.0|netstandard2.0' -t proc

The new test fails on main.

🤖 Generated with Claude Code

previous-nuget and nuget for the same version unpacked into one folder,
and each copied the other's assemblies over its own as if they were
dependencies, so the diff said there was no difference; the folder then
stayed polluted for later runs. Each provider now has its own folder,
cleared before it unpacks. The github provider took its folder from TEMP,
which only Windows sets.

Fixes #57.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Mpdreamz Mpdreamz added the bug A defect fixed (patch) label Nov 14, 2026
@Mpdreamz
Mpdreamz merged commit 850d3af into main Nov 14, 2026
6 of 7 checks passed
@Mpdreamz
Mpdreamz deleted the temp-folders branch November 14, 2026 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug A defect fixed (patch)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant