From fbc2d6de43f8f88d506503cd8627887855a8c112 Mon Sep 17 00:00:00 2001 From: Whit Waldo Date: Mon, 15 Jun 2026 02:35:58 -0500 Subject: [PATCH 1/4] Reverting package upgrade for analyzers from 5.3.0 to 5.0.0 because of Roslyn incompatibilities Signed-off-by: Whit Waldo --- Directory.Packages.props | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 313d87fe2..b871c410f 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -25,15 +25,15 @@ - - - + Reverting pac + + - - + + From e6b95b698cc07a39e1d7d1ed7702e74d94de0f0f Mon Sep 17 00:00:00 2001 From: Whit Waldo Date: Mon, 15 Jun 2026 02:37:13 -0500 Subject: [PATCH 2/4] Removed extraneous text from file Signed-off-by: Whit Waldo --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index b871c410f..38a207f4b 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -25,7 +25,7 @@ - Reverting pac + From e84e6b936305959ba582ed269567ee375c79afd0 Mon Sep 17 00:00:00 2001 From: Whit Waldo Date: Mon, 15 Jun 2026 02:41:27 -0500 Subject: [PATCH 3/4] Reverting analyzer packages to 1.17 release versions Signed-off-by: Whit Waldo --- Directory.Packages.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index 38a207f4b..090295d8d 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -25,7 +25,7 @@ - + From becc6f353af8e70a4a20163418fa727311272984 Mon Sep 17 00:00:00 2001 From: Whit Waldo Date: Mon, 15 Jun 2026 02:49:35 -0500 Subject: [PATCH 4/4] Reverting to use SHA256 (for 5.0.0) instead of SHA1 (which was used in 5.3.0) Signed-off-by: Whit Waldo --- .../ActorClientGenerator.cs | 28 +++++++++++-------- src/Dapr.Actors.Generators/Templates.cs | 8 ++++-- .../ActorClientGeneratorTests.cs | 4 +-- 3 files changed, 23 insertions(+), 17 deletions(-) diff --git a/src/Dapr.Actors.Generators/ActorClientGenerator.cs b/src/Dapr.Actors.Generators/ActorClientGenerator.cs index 0f064e801..bcc51ef03 100644 --- a/src/Dapr.Actors.Generators/ActorClientGenerator.cs +++ b/src/Dapr.Actors.Generators/ActorClientGenerator.cs @@ -11,14 +11,16 @@ // limitations under the License. // ------------------------------------------------------------------------ -using System.Collections.Immutable; -using Dapr.Actors.Generators.Diagnostics; -using Dapr.Actors.Generators.Extensions; -using Dapr.Actors.Generators.Helpers; -using Dapr.Actors.Generators.Models; -using Microsoft.CodeAnalysis; -using Microsoft.CodeAnalysis.CSharp; -using Microsoft.CodeAnalysis.CSharp.Syntax; +using System.Collections.Immutable; +using System.Text; +using Dapr.Actors.Generators.Diagnostics; +using Dapr.Actors.Generators.Extensions; +using Dapr.Actors.Generators.Helpers; +using Dapr.Actors.Generators.Models; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.CodeAnalysis.Text; namespace Dapr.Actors.Generators; @@ -191,10 +193,12 @@ private static void GenerateActorClientCode(SourceProductionContext context, Act .NormalizeWhitespace() .ToFullString(); - context.AddSource($"{descriptor.FullyQualifiedTypeName}.g.cs", compilationOutput); - } - catch (DiagnosticsException e) - { + context.AddSource( + $"{descriptor.FullyQualifiedTypeName}.g.cs", + SourceText.From(compilationOutput, Encoding.UTF8, SourceHashAlgorithm.Sha256)); + } + catch (DiagnosticsException e) + { foreach (var diagnostic in e.Diagnostics) { context.ReportDiagnostic(diagnostic); diff --git a/src/Dapr.Actors.Generators/Templates.cs b/src/Dapr.Actors.Generators/Templates.cs index a9dd68364..31776fb47 100644 --- a/src/Dapr.Actors.Generators/Templates.cs +++ b/src/Dapr.Actors.Generators/Templates.cs @@ -43,7 +43,8 @@ internal sealed class {Constants.ActorMethodAttributeTypeName} : Attribute SyntaxFactory.ParseCompilationUnit(source) .NormalizeWhitespace() .ToFullString(), - Encoding.UTF8); + Encoding.UTF8, + SourceHashAlgorithm.Sha256); } /// @@ -81,6 +82,7 @@ internal sealed class {Constants.GenerateActorClientAttributeTypeName} : Attribu SyntaxFactory.ParseCompilationUnit(source) .NormalizeWhitespace() .ToFullString(), - Encoding.UTF8); + Encoding.UTF8, + SourceHashAlgorithm.Sha256); } -} \ No newline at end of file +} diff --git a/test/Dapr.Actors.Generators.Test/ActorClientGeneratorTests.cs b/test/Dapr.Actors.Generators.Test/ActorClientGeneratorTests.cs index 6ebdcdb24..844704e58 100644 --- a/test/Dapr.Actors.Generators.Test/ActorClientGeneratorTests.cs +++ b/test/Dapr.Actors.Generators.Test/ActorClientGeneratorTests.cs @@ -36,7 +36,7 @@ internal sealed class ActorMethodAttribute : Attribute private static readonly (string, SourceText) ActorMethodAttributeSource = ( Path.Combine("Dapr.Actors.Generators", "Dapr.Actors.Generators.ActorClientGenerator", "Dapr.Actors.Generators.ActorMethodAttribute.g.cs"), - SourceText.From(ActorMethodAttributeText, Encoding.UTF8)); + CreateGeneratedSourceText(ActorMethodAttributeText)); private const string GenerateActorClientAttributeText = $@"// #nullable enable @@ -54,7 +54,7 @@ internal sealed class GenerateActorClientAttribute : Attribute private static readonly (string, SourceText) GenerateActorClientAttributeSource = ( Path.Combine("Dapr.Actors.Generators", "Dapr.Actors.Generators.ActorClientGenerator", "Dapr.Actors.Generators.GenerateActorClientAttribute.g.cs"), - SourceText.From(GenerateActorClientAttributeText, Encoding.UTF8)); + CreateGeneratedSourceText(GenerateActorClientAttributeText)); private static SourceText CreateGeneratedSourceText(string text) => SourceText.From(text, Encoding.UTF8, SourceHashAlgorithm.Sha256);