Conversation
Comparing two commits meant preparing a worktree for each by hand before the tool could be called, which is most of the work of running it and easy to get wrong: a checkout carrying a stale Release build is reused silently, and the timestamp in the header line was the only thing that said so. --old and --new now also take anything git can resolve to a commit, checked out into a worktree under ~/.cache/decompdiff keyed by that commit. The worktrees are kept because the Release build inside one is what a rerun would otherwise repeat: a second run of the same pair drops from minutes to seconds. Paths keep priority over refs, so an existing directory never changes meaning. Assisted-by: Claude:claude-opus-5[1m]:Claude Code
Both tools need a corpus of real assemblies and neither had a way to get one: nugetfuzz-all.ps1 walks the catalog in publish order, which is fine for a crash sweep but makes a poor readability corpus, and the alternative was picking package ids by hand. The ids come from an empty search query, which orders by download count. Downloading them reuses nugetfuzz, which already resolves versions, matches target frameworks and walks the dependency closure into the same cache decompdiff reads; --download-only stops it before it decompiles, since the sweep is the expensive part and a corpus only needs the files. The result is a list of lib directories rather than a single root, because a package already restored on this machine is used from the machine-wide NuGet cache instead of being copied into ours, and a corpus that silently omitted those would misrepresent what was tested. Assisted-by: Claude:claude-opus-5[1m]:Claude Code
Handing the corpus over as `$(cat list)` is a bourne shell construct, so the one invocation the tools print and the README documents did not work on Windows. nugetfuzz already reads its package list from an @file for the same reason; decompdiff now takes its corpus entries the same way, leaving the shell out of it entirely. Assisted-by: Claude:claude-opus-5[1m]:Claude Code
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.
Problem
Two things stood between wanting a decompdiff run and having one, and both were manual work that is easy to get wrong.
Preparing the sides. Comparing two commits meant creating a worktree for each by hand first. That is most of the effort of running the tool, and a checkout carrying a stale Release build is reused silently — the dll timestamp in the header line was the only thing that said so.
Getting a corpus. Neither tool had a way to obtain one.
nugetfuzz-all.ps1walks the catalog in publish order, which suits a crash sweep but makes a poor readability corpus, so the alternative was picking package ids by hand.Solution
--old/--newalso take a commit-ish — branch, tag, sha,FETCH_HEAD— resolved against the repository the tool is run from and checked out into a worktree under~/.cache/decompdiff/<repo>/<commit>:ArgumentException; bad specs now print the message and exit 1.nuget-top.ps1downloads the most-downloaded packages with their dependency closures and writes the corpus list:The ids come from an empty search query, which orders by download count. The downloading is
nugetfuzz --download-only(new flag), so version resolution, TFM matching and the dependency walk behave exactly as in a sweep and only the decompiling is skipped.It writes a list of lib directories rather than one root on purpose: a package already restored on the machine is used from the machine-wide NuGet cache instead of being copied into ours, and a corpus pointed at a single directory would silently omit those.
Corpus entries can come from an
@file, the spellingnugetfuzzalready uses for its package list — one entry per line,#comments allowed, dlls or directories. Passing the list as$(cat ...)is a bourne shell construct that does not work on Windows, so the shell is left out of it:TestToolsis in no solution and not built by CI, so there is no test project to extend. Verified by running: sha pair, branch-name pair,FETCH_HEADagainst a PR, the worktree-reuse path, the bad-ref path, and the whole loop end to end —nuget-top.ps1 -Count 8into a decompdiff run that reported 8 assemblies with per-package changed-type counts.Written by Claude Code (
claude-opus-5) on behalf of @siegfriedpammer; runs reproduced locally.