From 310e4cf2f848f71616fa22051372e5b35120e1c8 Mon Sep 17 00:00:00 2001 From: Kieron Lanning Date: Mon, 28 Sep 2026 21:05:00 +0100 Subject: [PATCH 1/2] refactor: source gen update --- Directory.Packages.props | 2 +- src/src/SourceGenerator/Records/GenericRecords.cs | 7 ++++++- src/src/SourceGenerator/Records/TelemetryCapabilities.cs | 7 ++++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 8d71bbaa..3ae076f0 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -3,7 +3,7 @@ true 5.9.0 1.67.0 - 1.0.0-prerelease.53 + 1.0.0-prerelease.54 10.0.12 10.10.0 1.18.0 diff --git a/src/src/SourceGenerator/Records/GenericRecords.cs b/src/src/SourceGenerator/Records/GenericRecords.cs index 3435f82b..9b8c9ca2 100644 --- a/src/src/SourceGenerator/Records/GenericRecords.cs +++ b/src/src/SourceGenerator/Records/GenericRecords.cs @@ -45,7 +45,12 @@ public readonly void Validate() throw new Exception("Destructure and Stringify cannot both be true."); } - public static EquatableArray FromMatches(MatchCollection matches) + /// + /// Projects the regex matches into the hole records. Internal because the returned + /// EquatableArray is a framework type the merge internalizes in the shipped analyzer (seen by + /// PSGFR41); the BuildSdk grants the test assemblies access to internals. + /// + internal static EquatableArray FromMatches(MatchCollection matches) { List? holes = null; if (matches != null) diff --git a/src/src/SourceGenerator/Records/TelemetryCapabilities.cs b/src/src/SourceGenerator/Records/TelemetryCapabilities.cs index 6f0300c7..3b537260 100644 --- a/src/src/SourceGenerator/Records/TelemetryCapabilities.cs +++ b/src/src/SourceGenerator/Records/TelemetryCapabilities.cs @@ -3,7 +3,12 @@ namespace Purview.Telemetry.SourceGenerator.Records; /// /// Capabilities detected for the current compilation. /// -public sealed record TelemetryCapabilities( +/// +/// Internal because it implements a Purview.SourceGeneratorFramework interface, which the merge +/// internalizes in the shipped analyzer (seen by PSGFR41); the BuildSdk grants the test +/// assemblies access to internals. +/// +sealed record TelemetryCapabilities( //bool SupportsNullableAnnotations, bool SupportsIMeterFactory ) : IGenerationCapabilities; From cd36c26b6ce75abaa9d470d0e54dbee8aa8aee4a Mon Sep 17 00:00:00 2001 From: Kieron Lanning Date: Mon, 28 Sep 2026 21:11:04 +0100 Subject: [PATCH 2/2] chore: bumped version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index abc5ad6f..ca24d47d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "purview-telemetry-sourcegenerator", - "version": "5.0.0-prerelease.18", + "version": "5.0.0-prerelease.19", "description": "Generates [`ActivitySource`](https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.activitysource), [`ILogger`](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.logging.ilogger), and [`Metrics`](https://learn.microsoft.com/en-us/dotnet/api/system.diagnostics.metrics) based on interface methods.", "license": "MIT", "readme": "README.md",