feat: Phase 5.5 wire meta-package to ship the analyzer as a dev-only NuGet#17
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Testably.Abstractions.Migration meta-package so it actually ships the analyzer + code fix assemblies as a dev-only NuGet (no placeholder lib assembly), enabling Roslyn to auto-discover the payload from analyzers/dotnet/cs/.
Changes:
- Marks the package as a development-only dependency and suppresses lib build output.
- Adds project references to ensure analyzer/codefix projects build, and packs their DLLs into
analyzers/dotnet/cs/. - Adds an empty
lib/netstandard2.0/_._marker to keep the package valid despite suppressing lib output.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| Source/Testably.Abstractions.Migration/Testably.Abstractions.Migration.csproj | Marks package as dev-only, suppresses build output, and packs analyzer/codefix DLLs + _._ marker. |
| Source/Testably.Abstractions.Migration/. | Adds empty marker file for lib/netstandard2.0/ when build output is suppressed. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
6391e43 to
184f5c6
Compare
184f5c6 to
27c74da
Compare
…NuGet
Pre-5.5 the Testably.Abstractions.Migration nupkg was a 7K placeholder DLL
with no analyzer payload — installing it did nothing.
Source/Testably.Abstractions.Migration/Testably.Abstractions.Migration.csproj
now declares the analyzer + codefix DLL paths as packed `<None>` items into
`analyzers/dotnet/cs/` so Roslyn auto-discovers them on install. Marked as a
dev-only tool via DevelopmentDependency=true so NuGet does not propagate the
package as a transitive dependency of consumers (auto-applies PrivateAssets=all
on the consumer side). The empty placeholder lib DLL is intentionally retained:
it satisfies NuGet's NU5017 ("no content") check which is elevated to an error
by TreatWarningsAsErrors=true.
Pack runs separately from build (Pipeline/Build.Pack.cs):
- The meta-package csproj sets GeneratePackageOnBuild=false. Earlier iterations
used ProjectReferences to the analyzer projects to ensure they were built
before pack; that consistently created a duplicate MSBuild graph node for
each analyzer under parallel CI builds (Linux + macOS), racing on
bin/.../*.deps.json and failing GenerateDepsFile with "file in use".
Aligning the property envelope via SetTargetFramework did not eliminate the
race in practice.
- Nuke's Pack target now invokes `dotnet pack <slnx> --no-build` after
Compile. Because Compile has already produced every analyzer DLL via the
test / playground project references, Pack only needs to bundle the
existing bin output — no additional builds are triggered, no race possible.
- Pack runs against the .slnx (not the project) so $(SolutionDir) resolves
for the README pack target; only the meta-package is IsPackable=true so it
is the only project actually packed.
The package intentionally does NOT add a PackageReference to
Testably.Abstractions.Testing. The migration package is a one-shot tool
(install → migrate → uninstall); pulling the target lib transitively
would mask the missing reference until the user removes the migration
package, at which point the migrated tests would stop compiling. Consumers
must reference Testably.Abstractions.Testing themselves.
27c74da to
40138e6
Compare
|
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.



Pre-5.5 the Testably.Abstractions.Migration nupkg was a 7K placeholder DLL with no analyzer payload — installing it did nothing.
Source/Testably.Abstractions.Migration/Testably.Abstractions.Migration.csproj now packs both analyzer DLLs into
analyzers/dotnet/cs/so Roslyn auto- discovers them on install. Wiring uses ProjectReference withReferenceOutputAssembly="false" PrivateAssets="all"to force the analyzer projects to build first without leaking their assemblies into lib/.Marked as a dev-only tool:
_._marker in lib/netstandard2.0/ keeps the package valid for that target framework after the lib output is suppressed.The package intentionally does NOT add a PackageReference to Testably.Abstractions.Testing. The migration package is a one-shot tool (install -> migrate -> uninstall); pulling the target lib transitively would mask the missing reference until the user removes the migration package, at which point the migrated tests would stop compiling. Consumers must reference Testably.Abstractions.Testing themselves.
Build still requires going through the .slnx so $(SolutionDir) resolves for the README pack target.