Skip to content

Commit c6d3357

Browse files
committed
Rename the creator IL profile
1 parent 6d3b8e2 commit c6d3357

14 files changed

Lines changed: 228 additions & 63 deletions

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
1717
#### Changed
1818

1919
- **Build-variant IL values are normalized instead of discarded** — MVID, method RVA, code-size, and WinForms `AxHost.TypeLibraryTimeStampAttribute` values are replaced with rule-specific stable markers in every mode. Each matching line prefix is preserved while the build-variant portion that follows it is replaced. For ILSpy's multiline type-library timestamp form, the complete byte blob through its closing `)` is collapsed into one marker. Built-in rules cover the actual comment and custom-attribute forms emitted by both supported disassemblers, including ILSpy's custom-attribute syntax without dotnet-ildasm's `class ` token, and are applied to every IL text regardless of which disassembler produced it; the disassembler recorded in reports identifies pattern provenance only. Normalization still occurs after IL cache retrieval, with no cache format or key change, so compatible existing cache entries remain reusable.
20-
- **Creator ignore defaults preserve more meaningful differences** — Removed the built-in RVA, code-size, WinForms `AxHost.TypeLibraryTimeStampAttribute`, and `.publickeytoken = (` entries from the `buildserver-winforms` ignore profile. The first three are now handled by built-in normalization in every mode. Public key token changes are no longer suppressed, so AssemblyRef token differences remain visible in creator mode.
20+
- **Creator ignore defaults preserve more meaningful differences** — Renamed the built-in ignore profile from `buildserver-winforms` to `creator-default` and removed its RVA, code-size, WinForms `AxHost.TypeLibraryTimeStampAttribute`, and `.publickeytoken = (` entries. Its path entries now enumerate `A:\temp\develop\` through `Z:\temp\develop\` in drive-letter order; the five drive-less yen-sign, backslash, doubled-separator, and forward-slash variants were removed. The first three removed IL entries are now handled by built-in normalization in every mode. Public key token changes are no longer suppressed, so AssemblyRef token differences remain visible in creator mode.
2121
- **Normalization reporting and tool guidance are more explicit** — Markdown and HTML reports show built-in normalization rules, configured normalization substrings, and configured ignore substrings in that order. Built-in and configured-normalization tables state that their row order is the application order. The tables distinguish `Line Prefix Pattern`, `Substring to Normalize`, and `Substring to Ignore`; configured values are displayed without decorative quotes, while an enabled setting with no effective values is reported without rendering an empty table. The built-in table also shows each pattern's replacement marker and observed disassembler. Duplicate and containment-related normalization values now produce console/report warnings. Guidance clarifies sequential raw-text matching order and inserted-marker protection, why the current built-in rules are order-independent, that `nildiff` itself targets `net8.0`, and that `ilspycmd 9.1.0.7988` is pinned as the fallback baseline for inspecting assemblies targeting .NET 8/9/10. English/Japanese configuration documentation, schema, guides, and report samples are aligned with the new behavior.
2222
- **Normalization configuration and report output are bounded and unambiguous** — The configured normalization list is limited to 256 entries of at most 4096 Unicode characters each. Per line, all configured rules together are limited to 65,536 non-overlapping replacements and a normalized result of at most 4,194,304 UTF-16 code units; either excess throws `InvalidDataException` before the expanded result is allocated. Relationship diagnostics emit at most 100 details plus a suppressed-count summary and are skipped when configured normalization is disabled. Configured substring values embedded in safety warnings use a single-line visible escape form for line breaks, other whitespace, control/format characters, combining marks, lone UTF-16 surrogates, and backslashes while keeping CommonMark punctuation inert, preventing configuration text from altering console/log or report structure. Markdown report tables use reversible escaped values so backslashes, invisible characters, and CommonMark punctuation remain distinguishable without becoming inline syntax; HTML reports keep their ordinary pre-wrapped display.
2323

2424
#### Removed
2525

2626
- **`ShouldIgnoreMVID` configuration setting and API** — Removed as a breaking change; MVID values are now always normalized to `<nildiff:normalized:mvid>`. Supplying the former JSON key or `FOLDERDIFF_SHOULDIGNOREMVID` environment variable fails with an explicit migration error instead of being accepted and ignored.
27+
- **`buildserver-winforms` creator profile name** — Removed as a breaking change. Use `creator-default`; the former name follows the normal unknown-profile path and exits with invalid arguments.
2728

2829
### [1.24.0] - 2026-07-29
2930

@@ -1743,13 +1744,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
17431744
#### 変更
17441745

17451746
- **ビルド依存 IL 値を破棄せず正規化** — MVID、method RVA、code-size、WinFormsの `AxHost.TypeLibraryTimeStampAttribute` 値を、全モードで規則別の安定したマーカーへ置換するようにしました。照合した行接頭辞は保持し、それに続くビルド依存部分だけを置換します。ILSpyの複数行type-library timestamp形式では、閉じ `)` までのbyte blob全体を1個のマーカーへ縮約します。組み込み規則は、ILSpyのcustom attribute構文がdotnet-ildasmの `class ` tokenを含まない違いも含め、両対応逆アセンブラが実際に出力するコメント/custom attribute形式を網羅し、生成元の逆アセンブラに関係なくすべてのIL textへ適用します。レポート上の逆アセンブラ名はパターンの由来を示すだけです。正規化は従来どおりILキャッシュ取得後に行い、キャッシュ形式とキーは変更していないため、互換性のある既存キャッシュエントリは引き続き利用できます。
1746-
- **creator無視既定値で意味のある差分をより多く保持** — 組み込み `buildserver-winforms` 無視プロファイルから、RVA、code-size、WinForms `AxHost.TypeLibraryTimeStampAttribute`、`.publickeytoken = (` の4エントリを除去しました。最初の3つは全モードの組み込み正規化で処理します。public key token変更は抑制しなくなったため、AssemblyRefのtoken差分はcreatorモードでも残ります。
1747+
- **creator無視既定値で意味のある差分をより多く保持** — 組み込み無視プロファイルを `buildserver-winforms` から `creator-default` へ改名し、RVA、code-size、WinForms `AxHost.TypeLibraryTimeStampAttribute`、`.publickeytoken = (` の4エントリを除去しました。pathエントリは `A:\temp\develop\` から `Z:\temp\develop\` までをドライブレター順に列挙し、ドライブレターを含まない円記号、backslash、二重区切り、forward slashの旧5パターンは削除しました。削除した最初の3つのILエントリは全モードの組み込み正規化で処理します。public key token変更は抑制しなくなったため、AssemblyRefのtoken差分はcreatorモードでも残ります。
17471748
- **正規化レポートとツール案内を明確化** — Markdown/HTMLレポートには、組み込み正規化規則、設定正規化部分文字列、設定無視部分文字列の順で表示します。組み込み表と設定正規化表には、行の並びが適用順であることを明記します。表では `Line Prefix Pattern`、`Substring to Normalize`、`Substring to Ignore` を区別し、設定値へ装飾的なダブルクオートを付けません。有効だが実効値が0件の場合は空の表を出さず、設定値がないことだけを明示します。組み込み表には各パターンの置換マーカーと確認元逆アセンブラも表示します。重複または包含関係にある正規化値はコンソール/レポート警告の対象にしました。raw textへの逐次一致順と挿入済みマーカーの保護、現行の組み込み規則で順序が結果へ影響しない理由、`nildiff` 本体が `net8.0` をtargetとすること、`ilspycmd 9.1.0.7988` を.NET 8/9/10をtarget frameworkとするAssembly調査の固定fallback baselineとすることを案内に明記しました。英日両方の設定文書、schema、guide、レポートサンプルを新しい挙動へ揃えました。
17481749
- **正規化設定とレポート出力を有界かつ明確に** — 設定正規化リストを最大256件、各値を最大4096 Unicode文字に制限しました。設定した全規則を合わせて、1行の非重複置換を最大65,536件、正規化後の結果を最大4,194,304 UTF-16コード単位に制限し、いずれかを超える場合は展開後の結果を割り当てる前に `InvalidDataException` をスローします。関係診断は最大100件の詳細と超過分の抑制件数を示す要約に制限し、設定正規化が無効な場合は省略します。安全性警告へ埋め込む設定部分文字列値は、改行、その他の空白、control/format文字、combining mark、単独UTF-16 surrogate、backslashを1行の可視escapeにし、CommonMark記号を不活性化して、設定文字列がconsole/logやレポート構造を変更できないようにします。Markdownレポート表は可逆なescape表現を使い、backslash、不可視文字、CommonMark記号をinline構文にせず区別できます。HTMLレポートは通常の空白に対する既存のpre-wrap表示を維持します。
17491750

17501751
#### 削除
17511752

17521753
- **`ShouldIgnoreMVID` 設定とAPI** — 破壊的変更として削除しました。MVID値は常に `<nildiff:normalized:mvid>` へ正規化します。旧JSON keyまたは環境変数 `FOLDERDIFF_SHOULDIGNOREMVID` を指定すると、受理して無視せず明示的な移行エラーで失敗します。
1754+
- **creatorプロファイル名 `buildserver-winforms`** — 破壊的変更として削除しました。`creator-default` を使用してください。旧名は通常の未知profile経路でinvalid argumentsとして終了します。
17531755

17541756
### [1.24.0] - 2026-07-29
17551757

FolderDiffIL4DotNet.Tests/CliOptionsTests.Combined.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public void ParseCliOptions_AllFlagsCombined_ParsedCorrectly()
2020
{
2121
"/old", "/new", "lbl",
2222
"--no-pause", "--no-il-cache", "--skip-il",
23-
"--no-timestamp-warnings", "--creator", "--creator-il-ignore-profile", "buildserver-winforms", "--print-config", "--dry-run",
23+
"--no-timestamp-warnings", "--creator", "--creator-il-ignore-profile", "creator-default", "--print-config", "--dry-run",
2424
"--fail-on-diff",
2525
"--coffee", "--bell", "--wizard",
2626
"--log-format", "json",
@@ -31,7 +31,7 @@ public void ParseCliOptions_AllFlagsCombined_ParsedCorrectly()
3131
Assert.True(opts.SkipIL);
3232
Assert.True(opts.NoTimestampWarnings);
3333
Assert.True(opts.Creator);
34-
Assert.Equal("buildserver-winforms", opts.CreatorIlIgnoreProfile);
34+
Assert.Equal("creator-default", opts.CreatorIlIgnoreProfile);
3535
Assert.True(opts.PrintConfig);
3636
Assert.True(opts.DryRun);
3737
Assert.True(opts.FailOnDiff);

FolderDiffIL4DotNet.Tests/CliOptionsTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,9 +354,9 @@ public void ParseCliOptions_CreatorFlag_SetsCreator()
354354
[Fact]
355355
public void ParseCliOptions_CreatorIlIgnoreProfileWithKnownName_SetsProfile()
356356
{
357-
var opts = CliParser.Parse(new[] { "--creator-il-ignore-profile", "buildserver-winforms" });
357+
var opts = CliParser.Parse(new[] { "--creator-il-ignore-profile", "creator-default" });
358358

359-
Assert.Equal("buildserver-winforms", opts.CreatorIlIgnoreProfile);
359+
Assert.Equal("creator-default", opts.CreatorIlIgnoreProfile);
360360
Assert.Null(opts.ParseError);
361361
}
362362

@@ -375,7 +375,7 @@ public void ParseCliOptions_CreatorIlIgnoreProfileWithUnknownName_SetsParseError
375375
var opts = CliParser.Parse(new[] { "--creator-il-ignore-profile", "missing-profile" });
376376

377377
Assert.NotNull(opts.ParseError);
378-
Assert.Contains("buildserver-winforms", opts.ParseError, System.StringComparison.Ordinal);
378+
Assert.Contains("creator-default", opts.ParseError, System.StringComparison.Ordinal);
379379
}
380380

381381
// -----------------------------------------------------------------------

0 commit comments

Comments
 (0)