Add Cratis.CodeAnalysis umbrella analyzer package#2313
Merged
Conversation
Bundle the full set of Cratis Arc lint analyzers (ARC*, ARCCHR*) into a single package so a consumer can opt into all of them with one reference instead of adding each analyzer package by hand. The individual Cratis.Arc.Core.CodeAnalysis and Cratis.Arc.Chronicle.CodeAnalysis packages stay available for a-la-carte use. Only lint analyzers are bundled here. Functional source generators (e.g. the query-metadata generator) keep shipping with the package they serve and never appear here, so the umbrella can never collide with a functional package's generator. The package itself carries no dependencies (analyzer-only). Verified end to end: a consumer referencing only Cratis.CodeAnalysis has both analyzer assemblies handed to csc via /analyzer. A pack-inspect spec guards that the package keeps bundling both lint analyzers. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The query-metadata source generator already ships inside Cratis.Arc.Core, where it emits AOT query metadata into the consuming assembly. Publishing it as a standalone package too was redundant, and referencing both at once loaded the same generator from two paths and failed the build with CS0101. Mark the project non-packable; the in-repo build and Cratis.Arc.Core's own bundling are unaffected. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
NuGet packages for this PR, e.g. Cratis.Arc: |
| public void should_bundle_the_arc_and_chronicle_lint_analyzers() | ||
| { | ||
| var repositoryRoot = GetRepositoryRoot(); | ||
| var workingDirectory = Path.Combine(Path.GetTempPath(), "Cratis.CodeAnalysis.Package.Integration", Guid.NewGuid().ToString("N")); |
| { | ||
| var repositoryRoot = GetRepositoryRoot(); | ||
| var workingDirectory = Path.Combine(Path.GetTempPath(), "Cratis.CodeAnalysis.Package.Integration", Guid.NewGuid().ToString("N")); | ||
| var packageDirectory = Path.Combine(workingDirectory, "packages"); |
| Directory.CreateDirectory(packageDirectory); | ||
| RunDotNet( | ||
| repositoryRoot, | ||
| $"pack \"{Path.Combine(repositoryRoot, "Source", "DotNET", "Cratis.CodeAnalysis", "Cratis.CodeAnalysis.csproj")}\" -c Release --output \"{packageDirectory}\" -p:IncludeSymbols=false -p:IncludeSource=false"); |
|
|
||
| while (current is not null) | ||
| { | ||
| if (File.Exists(Path.Combine(current.FullName, "Arc.slnx"))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a single opt-in package for the Cratis Arc Roslyn analyzers. Following the move to keep analyzers out of the meta package, this gives consumers one place to turn on the full analyzer set — reference
Cratis.CodeAnalysisand get all the ARC*/ARCCHR* diagnostics, without having to add each analyzer package by hand.Added
Cratis.CodeAnalysispackage that bundles the full set of Cratis Arc lint analyzers (ARC* and ARCCHR*). A singleCratis.CodeAnalysisreference enables them all; the individualCratis.Arc.Core.CodeAnalysisandCratis.Arc.Chronicle.CodeAnalysispackages remain available for à-la-carte use. The lint analyzers are still not bundled into the functional packages, so referencingCratis.Arc.Core(or theCratismeta package) does not force them on you.Removed
Cratis.Arc.Core.Generatorspackage is no longer published. That source generator ships insideCratis.Arc.Core(it emits AOT query metadata into the consuming assembly), so a standalone copy was redundant and referencing both at once failed the build withCS0101.