Skip to content

Take the cloning layer from Zomp.MethodCloning - #171

Merged
virzak merged 4 commits into
masterfrom
feature/use-method-cloning
Sep 13, 2026
Merged

virzak merged 4 commits into
masterfrom
feature/use-method-cloning

Conversation

@virzak

@virzak virzak commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

The cloning layer, the half of the generator which copies a method into a file of its own, now comes from the Zomp.MethodCloning source package, maintained in zompinc/method-cloning.

  • The only snapshot change is a global-namespace method's file name: .Class.ReturnTrueAsync.g.cs becomes Class.ReturnTrueAsync.g.cs.
  • 22 tests which exercised nothing but cloning are removed; method-cloning tests the same cases. Tests where this generator does more than rename the method stay.

🤖 Generated with Claude Code

The Cloning folder, EquatableArray and ReportedDiagnostic move to the
Zomp.MethodCloning source package, maintained in its own repository.
They come back as internal types compiled into the generator, with
this repository's ROSLYN_* constants, so every Roslyn variant still
gets its own build of them. Generated output is unchanged.

nuget.config maps the package to a local folder feed until it is
published, so this branch cannot pass CI yet.

Generated with Claude Code
The package is published, so the local feed it came from is gone from nuget.config. The version brings the core's fixes; the one snapshot they change is a method in the global namespace, whose file is now named Class.ReturnTrueAsync.g.cs rather than .Class.ReturnTrueAsync.g.cs.

Generated with Claude Code
The cloning layer lives in Zomp.MethodCloning, which tests it with an identity clone. These 22 tests only exercised that layer: their output here differs from the identity clone by nothing but the method's name and Task becoming void. File naming, containing types, name qualification and namespaces are tested there instead.

Tests where this generator's output does more than rename the method stay, such as Task.Delay becoming Thread.Sleep, a Func returning Task becoming an Action, and the attribute on a type.

Generated with Claude Code
The package comes from nuget.org now, so the note about the local feed is gone. Cloning bugs are tested and fixed in method-cloning, and so is an identity clone which fails; EquatableArray comes from the package too.

Generated with Claude Code
@codecov

codecov Bot commented Sep 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.67%. Comparing base (159d40d) to head (154c742).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #171      +/-   ##
==========================================
- Coverage   92.27%   91.67%   -0.60%     
==========================================
  Files          15        6       -9     
  Lines        1708     1273     -435     
  Branches      391      306      -85     
==========================================
- Hits         1576     1167     -409     
+ Misses         46       38       -8     
+ Partials       86       68      -18     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@virzak
virzak merged commit cc32e37 into master Sep 13, 2026
10 checks passed
@virzak
virzak deleted the feature/use-method-cloning branch September 13, 2026 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant