You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 832f0ce
Browse filesBrowse the repository at this point in the historyBrowse files
Fix empty IL from ilspycmd -o fallback, surface disassembler failures, and drop the redundant retry (#332)
* Fix ilspycmd -o fallback to read IL from its output directory
ilspycmd treats -o as an output directory and writes <input file name
without extension>.il inside it, leaving stdout empty. nildiff passed a
file path, so after a successful exit File.Exists(tempOut) was false,
the empty stdout was used, and the fallback always produced empty IL
while leaking ilspy_out_* directories.
Pass a fresh temporary directory, read the input-named IL file from it,
and remove the directory recursively after every attempt, including
failures and timeouts. FakeDisassembler now emulates the real ilspycmd
-o semantics.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0169z7S1N3Vmq8rHkry7EDVa
* Treat disassembler runs that exit 0 without IL as failures
A run that exited 0 but produced no IL was accepted as successful empty
IL. That skipped the remaining argument sets and disassemblers, so the
IL comparison retried the same deterministic empty result until its
retry limit and failed, with nothing explaining why.
Now such a run counts toward the failure blacklist, logs a console
warning with the command, file, ilspycmd output directory (noting
"(no IL file found)" when ilspycmd wrote no IL file), and stderr, and
falls through to the next argument set or disassembler. An IL cache hit
that holds only disassembler notices is removed via the new
ILCache.RemoveIL and regenerated instead of becoming empty IL.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0169z7S1N3Vmq8rHkry7EDVa
* Log each failed disassembly attempt and show timeouts on the console
A timed-out attempt was silent unless every disassembler failed, so the
DisassemblerTimeoutSeconds guidance in the TimeoutException never
reached users whose run fell back to another argument set or tool.
Log every failed attempt with the file, command, and working directory.
Timeouts are environment-dependent and actionable, so they are console
warnings that keep the DisassemblerTimeoutSeconds guidance. Start
failures and non-zero exits are routine fallback steps (e.g. a
candidate tool that is not installed) and go to the log file only to
avoid flooding the console; the final error still reports the root
cause when every attempt fails.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0169z7S1N3Vmq8rHkry7EDVa
* Remove the raw-disassembly retry from IL comparison
ILOutputService re-disassembled the same old/new pair up to 5 times
when a raw side was empty. The disassembler service now treats a run
that exits 0 without IL as a failed attempt and falls back across
argument sets and disassemblers itself, and an empty result is
deterministic for a given tool and assembly, so the retry only repeated
the same outcome.
Disassemble each pair once. An empty raw side, possible only from a
non-conforming IDotNetDisassembleService implementation, fails
immediately with an error diagnostic; diagnostics no longer carry
Attempt= / WillRetry=. Filtered-empty sides are still logged as
warnings.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0169z7S1N3Vmq8rHkry7EDVa
---------
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,8 +9,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
9
9
10
10
### [Unreleased]
11
11
12
+
#### Removed
13
+
14
+
- **IL comparison no longer re-disassembles a pair when either side's raw IL is empty** — `ILOutputService` used to retry the same old/new pair up to 5 attempts when the raw IL of either side (old or new) was empty. The disassembler service now treats a run that exits 0 without IL as a failed attempt and falls back across argument sets and disassemblers itself, and an empty result is deterministic for a given tool and assembly, so the retry only repeated the same outcome. Each pair is disassembled once; empty raw IL on either side (possible only from a non-conforming `IDotNetDisassembleService` implementation) fails immediately with an error diagnostic, and diagnostics no longer include `Attempt=` / `WillRetry=`. Filtered-empty sides are still logged as warnings. Affected: `Services/ILOutputService.cs`, `USER_GUIDE.md`. Tests: `DiffDotNetAssembliesAsync_WhenRawIlSideIsEmpty_ThrowsWithoutRetrying`, `DiffDotNetAssembliesAsync_WhenFilteredIlSideIsEmpty_LogsWarningAndCompares`.
15
+
12
16
#### Fixed
13
17
18
+
- **ilspycmd `-o` fallback reads the IL it actually writes** — `ilspycmd -o` takes an output directory and writes `<input name>.il` inside it, but nildiff passed a file path, so the fallback always returned empty IL after a successful exit and left `ilspy_out_*` directories in the temp folder. nildiff now passes a fresh temporary directory, reads the generated `<input name>.il` file, and deletes the directory recursively after every attempt, including failures and timeouts. Affected: `Services/DotNetDisassembleService.cs`, `Services/DotNetDisassembleService.Streaming.cs`, `Services/DotNetDisassembleService.VersionLabel.cs`, `FolderDiffIL4DotNet.Tests/Helpers/FakeDisassemblerProgram.cs`. Tests: `DisassembleAsync_WhenIlspyStdoutModeFails_ReadsIlFromOutputDirectoryAndRemovesIt`, `DisassemblePairAsLinesWithSameDisassemblerAsync_WhenIlspyStdoutModeFails_ReadsIlFromOutputDirectoryAndRemovesIt`, `ResolveIlspyOutputFile_ReturnsInputNamedIlFileOnly`, `BuildArgSets_IlspyCommand_PassesTemporaryOutputDirectoryToOutputFlag`, `CleanupTemporaryPathBestEffort_WhenPathIsDirectory_DeletesItRecursivelyWithoutWarning`.
19
+
- **Disassembler runs that exit 0 without IL are failures** — Such runs were accepted as successful empty IL, which skipped the remaining argument sets and disassemblers and made IL comparison fail after its raw-disassembly retries. They now count toward the disassembler failure blacklist, log a console warning with the command, file, ilspycmd output directory (marked `(no IL file found)` when ilspycmd wrote no IL file), and stderr, and continue with the next argument set or disassembler. IL cache hits that contain only disassembler notices are removed and regenerated instead of becoming empty IL. Added `ILCache.RemoveIL`. Affected: `Services/DotNetDisassembleService.cs`, `Services/DotNetDisassembleService.Streaming.cs`, `Services/DotNetDisassembleService.OutputSanitizer.cs`, `Services/Caching/ILCache.cs`, `doc/TROUBLESHOOTING.md`. Tests: `DisassembleAsync_WhenPrimaryToolExitsZeroWithoutIl_LogsStderrAndFallsBackToNextTool`, `DisassemblePairAsLinesWithSameDisassemblerAsync_WhenPrimaryToolExitsZeroWithoutIl_LogsStderrAndFallsBackToNextTool`, `DisassemblePairAsLinesWithSameDisassemblerAsync_WhenEveryToolExitsZeroWithoutIl_ThrowsInsteadOfReturningEmptyIl`, `DisassembleAsync_WhenCachedIlContainsOnlyToolNotices_RemovesEntryAndRegeneratesIl`, `ILCacheRemoveIL_RemovesMemoryAndDiskEntries`, `ContainsIlContent_DetectsAnyLineThatIsNeitherBlankNorToolNotice`.
20
+
- **Disassembler timeouts are reported when a fallback succeeds** — A timed-out attempt was silent unless every disassembler failed, so its `DisassemblerTimeoutSeconds` guidance never reached users whose run fell back to another argument set or tool. Each failed attempt is now logged with the file, command, and working directory: timeouts as console warnings that keep the `DisassemblerTimeoutSeconds` guidance, and start failures and non-zero exits in the log file only, because they are routine fallback steps (for example, a candidate tool that is not installed) and the final error already reports the root cause when every attempt fails. Affected: `Services/DotNetDisassembleService.cs`, `Services/DotNetDisassembleService.Streaming.cs`, `USER_GUIDE.md`, `doc/TROUBLESHOOTING.md`. Tests: `DisassemblePairAsLinesWithSameDisassemblerAsync_WhenAttemptTimesOut_LogsTimeoutGuidanceToConsoleAndFallsBack`, `DisassembleAsync_WhenAttemptExitsNonZero_LogsFailureToFileOnlyAndFallsBack`.
14
21
- **npm audit CI uses patched brace-expansion** — Updated the 2.x override and lockfile from `2.1.4` to `2.1.7`, resolving the reported denial-of-service vulnerabilities and the transitive `minimatch` finding without adding audit exceptions.
15
22
- **npm audit CI uses patched js-yaml** — Updated the 3.x override and lockfile to `3.15.2`, resolving `GHSA-2883-xcg3-v3hh` without adding an audit exception.
16
23
- **Benchmark regression CI compares matching execution environments** — Preserved BenchmarkDotNet host metadata and partitioned trusted history by CPU, core topology, OS, architecture, runtime/SDK, build configuration, and BenchmarkDotNet version. Mixed-host legacy history starts a visible five-sample warmup per environment; warning/failure thresholds, ancestry checks, and trusted publication restrictions remain unchanged. Added regression coverage for environment isolation, invalid host metadata, report combination, and real slowdowns within one environment.
@@ -1770,8 +1777,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
1770
1777
1771
1778
### [Unreleased]
1772
1779
1780
+
#### 削除
1781
+
1782
+
- **IL 比較で old/new のいずれか片側でも raw IL が空のとき、ペアを再逆アセンブルしないように変更** — `ILOutputService` は old/new のいずれか片側でも raw IL が空の場合、同じ old/new ペアを最大 5 回まで再試行していました。逆アセンブルサービスが、終了コード 0 で IL を出さない実行を失敗した試行として扱い、引数セットと逆アセンブラのフォールバックを自ら行うようになったこと、また空の結果は同じツールとアセンブリの組み合わせでは毎回同じになることから、この再試行は同じ結果を繰り返すだけでした。各ペアの逆アセンブルは 1 回にし、いずれか片側でも raw IL が空の場合(規約に従わない `IDotNetDisassembleService` 実装でのみ起こり得る)はエラー診断を出して即座に失敗させます。診断から `Attempt=` / `WillRetry=` を除きました。フィルタ後に空になった側は引き続き警告としてログ出力します。対象: `Services/ILOutputService.cs`, `USER_GUIDE.md`。テスト: `DiffDotNetAssembliesAsync_WhenRawIlSideIsEmpty_ThrowsWithoutRetrying`, `DiffDotNetAssembliesAsync_WhenFilteredIlSideIsEmpty_LogsWarningAndCompares`。
0 commit comments