Skip to content

Point at SharpCompress as a worked example - #156

Merged
virzak merged 2 commits into
masterfrom
docs/adopters
Jul 28, 2026
Merged

Point at SharpCompress as a worked example#156
virzak merged 2 commits into
masterfrom
docs/adopters

Conversation

@virzak

@virzak virzak commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

SharpCompress generates its synchronous methods with this generator as of #1381 and #1383.

Worth linking for the migration notes written while converting it, which answer the questions someone adopting this in a codebase that already has both halves written by hand actually has, and which this repository's own documentation does not:

  • how to prove a generated method is the one it replaced - build with EmitCompilerGeneratedFiles, diff each generated body against the one deleted from a baseline commit, expect an empty diff
  • when attributing a method adds a member rather than removing a duplicate. A generated Read(Span<byte>) displaces the shim Stream provides, which is a change in behaviour rather than a deduplication
  • that only the active syntax for the current compilation is seen, so a codebase with #if around framework differences has to be checked in both worlds

🤖 Generated with Claude Code

SharpCompress generates its synchronous methods this way, and the migration
notes written while converting it answer the questions someone adopting this
in an established codebase actually has: how to prove a generated method is
the one it replaced, and when attributing a method would add a member rather
than remove a duplicate.

Generated with Claude Code
@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.90%. Comparing base (6a13efd) to head (daaa881).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #156   +/-   ##
=======================================
  Coverage   93.90%   93.90%           
=======================================
  Files           9        9           
  Lines        1576     1576           
  Branches      363      363           
=======================================
  Hits         1480     1480           
  Misses         25       25           
  Partials       71       71           

☔ 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.

Both generate their synchronous methods this way already - FluentValidation
since 1.3.8-beta, MiniExcel on 2.0.16.

Generated with Claude Code
@virzak virzak added the documentation Improvements or additions to documentation label Jul 28, 2026
@virzak
virzak merged commit 1b1ef3d into master Jul 28, 2026
10 checks passed
@virzak
virzak deleted the docs/adopters branch July 28, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant