Fallout-build/Fallout

Optional: Roslyn codefix to auto-rename IHaz* references on CS0618

クローズ

#242 opened on 2026/05/28

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)C# (16 件のフォーク)github user discovery
good first issuetarget/2027

Repository metrics

Stars
 (125 個のスター)
PR merge metrics
 (平均マージ 2d 15h) (30d で 63 merged PRs)

説明

Why

Follow-up to #120, which ships [Obsolete] IHaz* alias interfaces in Nuke.Components. With the aliases in place, the C# compiler already emits CS0618 at every legacy reference site, with an actionable message pointing at the renamed IHas* form. Consumers can fix manually one-by-one.

A Roslyn codefix attached to CS0618 (for these specific obsolete types) would close the loop — Visual Studio / VS Code light bulb offers a one-click rename. Pure convenience; not required for the migration to function.

Action

  • Add an analyzer/codefix to Fallout.Migrate.Analyzers that:
    • Listens for CS0618 diagnostics whose target type is one of the 9 Nuke.Components.IHaz* aliases
    • Offers a codefix to rewrite the identifier to the corresponding IHas* form
  • Cover all 9 aliases (mirror the table in #120)
  • Tests using the existing analyzer-test pattern (Verify snapshots)
  • Assign the next sequential FALLOUT00x diagnostic ID after the existing family

Why this is optional

The compiler already provides the warning. The codefix is a UX nicety, not a correctness requirement. If it never lands, consumers can:

  • Use VS / Rider's built-in "Rename" refactoring after manually changing one occurrence
  • Run a regex find-and-replace
  • Run fallout-migrate (if that CLI ends up covering this rename — separate scope)

Done when

  • Analyzer + codefix shipped in Fallout.Migrate.Analyzers
  • VS / Rider light bulb appears on IHaz* references with a one-click rename
  • Snapshot tests cover all 9 aliases

コントリビューターガイド