Skip to content

feat: Phase 5.5 wire meta-package to ship the analyzer as a dev-only NuGet#17

Merged
vbreuss merged 1 commit into
mainfrom
feat/phase-5.5-metapackage
May 15, 2026
Merged

feat: Phase 5.5 wire meta-package to ship the analyzer as a dev-only NuGet#17
vbreuss merged 1 commit into
mainfrom
feat/phase-5.5-metapackage

Conversation

@vbreuss
Copy link
Copy Markdown
Member

@vbreuss vbreuss commented May 15, 2026

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 with ReferenceOutputAssembly="false" PrivateAssets="all" to force the analyzer projects to build first without leaking their assemblies into lib/.

Marked as a dev-only tool:

  • DevelopmentDependency=true so NuGet does not propagate the package as a transitive dependency of consumers (auto-applies PrivateAssets=all).
  • IncludeBuildOutput=false suppresses the empty placeholder lib DLL.
  • Empty _._ 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.

@vbreuss vbreuss self-assigned this May 15, 2026
Copilot AI review requested due to automatic review settings May 15, 2026 09:36
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 15, 2026

Test Results

  6 files  ±0    6 suites  ±0   1m 30s ⏱️ -11s
154 tests ±0  154 ✅ ±0  0 💤 ±0  0 ❌ ±0 
462 runs  ±0  460 ✅ ±0  2 💤 ±0  0 ❌ ±0 

Results for commit 40138e6. ± Comparison against base commit 570cabe.

♻️ This comment has been updated with latest results.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread Source/Testably.Abstractions.Migration/Testably.Abstractions.Migration.csproj Outdated
Comment thread Source/Testably.Abstractions.Migration/Testably.Abstractions.Migration.csproj Outdated
@vbreuss vbreuss force-pushed the feat/phase-5.5-metapackage branch from 6391e43 to 184f5c6 Compare May 15, 2026 09:56
Copilot AI review requested due to automatic review settings May 15, 2026 10:02
@vbreuss vbreuss force-pushed the feat/phase-5.5-metapackage branch from 184f5c6 to 27c74da Compare May 15, 2026 10:02
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

…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.
@vbreuss vbreuss force-pushed the feat/phase-5.5-metapackage branch from 27c74da to 40138e6 Compare May 15, 2026 10:23
@sonarqubecloud
Copy link
Copy Markdown

@vbreuss vbreuss merged commit 5edea25 into main May 15, 2026
9 checks passed
@vbreuss vbreuss deleted the feat/phase-5.5-metapackage branch May 15, 2026 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants