~/talk

Let’s Build an Incremental Source Generator With Roslyn

slides:none on file

Live-coding builds an IIncrementalGenerator for Roslyn (targets .NET 6 / C# 10) that auto-generates partial IEqualityComparer implementations for specified types, emitting a marker attribute via post-initialization, using the syntax-provider predicate+semantic transform pipeline to extract type symbols. Tests run with Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing.XUnit and mutation testing via Stryker.NET. Benchmarks show the generated comparer removes reflection for structs and yields zero allocation lookups; the incremental pipeline avoids regenerating unchanged files, improving IDE responsiveness.

AI-written summary · about

  1. 0:00Introduction
  2. 2:29Roslyn and Source Generators
  3. 9:05Source Generation rules
  4. 13:00ISourceGenerator to IncrementalGenerator
  5. 13:44Equality Comparer Generator
  6. 27:56IncrementalGenerator interface
  7. 33:28Incremental Pipeline
  8. 47:09Equality Comparer Code
  9. 51:28Testing and debugging
  10. 56:10Benefits of generated comparer
  11. 1:00:09Incremental generation power
  12. 1:04:59Source Generators best practices
  13. 1:06:25Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.