feat: build the analyzer against four Roslyn API versions - #30
Conversation
Splits NetEvolve.Analyzer into per-Roslyn-version build projects (4.4.0, 4.7.0, 4.14.0, 5.6.0) packed into their own analyzers/dotnet/ roslynX.Y/cs folder, so .NET SDKs 8.0.400+ load the highest version they support automatically. The main NetEvolve.Analyzer.csproj becomes a pure packing project with no source of its own. Test projects now build against multiple target frameworks (net6.0-net10.0 plus net472/net48/net481 on Windows) and reference a different Roslyn variant per framework, exercising the analyzer against several Roslyn APIs in one test run instead of just one. Mutation testing is split into per-variant stryker-config files since Stryker.NET can't target multiple source projects from one config. Also fixes classic .NET Framework compatibility for the test harness (Polyfill package reference, TUnit's own auto-injection disabled to avoid a duplicate PackageReference, a portable framework-reference resolution fallback shared via a new FrameworkReferences helper per test project) and a couple of latent CA2016/CA1307 issues the new Roslyn variants surfaced.
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #30 +/- ##
=======================================
Coverage 95.88% 95.88%
=======================================
Files 19 19
Lines 777 777
Branches 141 141
=======================================
Hits 745 745
Misses 12 12
Partials 20 20 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
NetEvolve.Analyzerinto per-Roslyn-version build projects (4.4.0, 4.7.0, 4.14.0, 5.6.0 — latest), each packed into its ownanalyzers/dotnet/roslynX.Y/csfolder so .NET SDKs 8.0.400+ automatically load the highest version they support.NetEvolve.Analyzer.csprojitself becomes a pure packing project with no source of its own.NetEvolve.Analyzer.Tests.Unit/.Integration) now build against multiple target frameworks (net6.0-net10.0, plusnet472/net48/net481on Windows) and reference a different Roslyn variant per framework, so the same test suite actually exercises several Roslyn APIs in one run instead of only one.stryker-config.roslyn*.jsonfiles, since Stryker.NET has no way to target multiple source projects from a single configuration; the mutation workflow now runs them as a matrix.Polyfillpackage reference (with TUnit's own conflicting auto-injection disabled), and a sharedFrameworkReferenceshelper per test project providing a portable fallback for resolving framework reference assemblies whenTRUSTED_PLATFORM_ASSEMBLIESisn't populated (net472/net48/net481).CA2016/CA1307issues that the new Roslyn variants and target frameworks surfaced.Test plan
dotnet build Analyzer.slnx -c Release— all 5 src projects (pack + 4 Roslyn variants) and both test projects build across all 8 target frameworks with 0 warnings/errorsdotnet test Analyzer.slnx -c Release— 1504/1504 tests pass across all target frameworkscsharpier check .— cleananalyzers/dotnet/roslyn{4.4,4.7,4.14,5.6}/cs/NetEvolve.Analyzer.dlllayout and that a consumer project on each locally installed SDK (6.0.428, 8.0.423, 9.0.316, 10.0.302) loads exactly one matching variant, no duplicates