Browse Source

Stop pointing the ILAst docs at a language that is not there

The ilspycmd dump and the contributor notes described themselves by reference to
the UI's ILAst language; the pane is what walks that pipeline now.

Assisted-by: Claude:claude-opus-5[1m]:Claude Code
pull/4029/head
Siegfried Pammer 3 weeks ago
parent
commit
3a8340ef60
  1. 2
      CLAUDE.md
  2. 4
      ICSharpCode.ILSpyCmd/ILAstDumper.cs
  3. 2
      ICSharpCode.ILSpyCmd/IlspyCmdProgram.cs

2
CLAUDE.md

@ -101,7 +101,7 @@ Never put more than one C# language feature on one branch. @@ -101,7 +101,7 @@ Never put more than one C# language feature on one branch.
- Always run the test suite with `--report-trx` so failures survive: `dotnet test --solution ILSpy.sln --report-trx` (the repo pins Microsoft.Testing.Platform in `global.json`; the bare `dotnet test <sln>` form is the old VSTest syntax). Don't dismiss failures as flaky without first reproducing in isolation, then running repeatedly.
- The decompiler test suite (test kinds, fixture structure, how to write tests, the compiler-matrix model) is documented in [ICSharpCode.Decompiler.Tests/CLAUDE.md](ICSharpCode.Decompiler.Tests/CLAUDE.md).
- After matcher / rewriter edits, **run the relevant tests, not just the build.** `dotnet build` green ≠ behaviour correct.
- **To see what a transform did, dump the ILAst:** `ilspycmd <assembly> -m <doc-id> --ilast` prints the IL transform pipeline's result, and `--after-transform <name-or-index>` stops the pipeline early so two stages can be diffed. Debug builds only (like the UI's ILAst language), so run it from a local build, not the installed tool.
- **To see what a transform did, dump the ILAst:** `ilspycmd <assembly> -m <doc-id> --ilast` prints the IL transform pipeline's result, and `--after-transform <name-or-index>` stops the pipeline early so two stages can be diffed. Debug builds only (like the UI's Debug Steps pane), so run it from a local build, not the installed tool.
## Investigating dependencies

4
ICSharpCode.ILSpyCmd/ILAstDumper.cs

@ -37,14 +37,14 @@ namespace ICSharpCode.ILSpyCmd @@ -37,14 +37,14 @@ namespace ICSharpCode.ILSpyCmd
/// <summary>
/// Writes the decompiler's intermediate representation (ILAst) of a method body, optionally
/// stopping the IL transform pipeline after a chosen transform. This is the command-line
/// counterpart of the UI's "ILAst" language, and makes transform output diffable.
/// counterpart of the UI's Debug Steps pane, and makes transform output diffable.
/// </summary>
class ILAstDumper
{
static readonly IReadOnlyList<IILTransform> transforms = CSharpDecompiler.GetILTransforms();
readonly ILAstWritingOptions writingOptions = new ILAstWritingOptions {
// same sugar as the UI's ILAst pane, so its output and this one are diffable
// same sugar as the Debug Steps pane's ILAst dump, so its output and this one are diffable
UseFieldSugar = true,
UseLogicOperationSugar = true,
};

2
ICSharpCode.ILSpyCmd/IlspyCmdProgram.cs

@ -119,7 +119,7 @@ Examples: @@ -119,7 +119,7 @@ Examples:
#if DEBUG
// ILAst is the decompiler's own working representation: it exists to debug transforms
// while developing ILSpy, so - like the UI's ILAst language - it ships in debug builds
// while developing ILSpy, so - like the UI's Debug Steps pane - it ships in debug builds
// only and is absent from the released tool.
[Option("--ilast", "Show the decompiler's intermediate representation (ILAst) of method bodies, after the full IL transform pipeline. Select what to dump with --type or --member; without either, every method of the assembly is dumped.", CommandOptionType.NoValue)]
public bool ShowILAstFlag { get; }

Loading…
Cancel
Save