Win
Win
CC#
Created by Win on 6/27/2024 in #help
Source generator WithAttributeMetadataName transform function not get invoke
👋 I try it but I get stuck with version conflict error in test code
Dagger.SDK.Mod.SourceGenerator.Tests -> Dagger.SDK.Mod.SourceGenerator -> Microsoft.CodeAnalysis.CSharp 4.10.0 -> Microsoft.CodeAnalysis.Common (= 4.10.0)
Dagger.SDK.Mod.SourceGenerator.Tests -> Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing 1.1.2 -> Microsoft.CodeAnalysis.CSharp.Workspaces 3.8.0 -> Microsoft.CodeAnalysis.Common (= 3.8.0).
Dagger.SDK.Mod.SourceGenerator.Tests -> Dagger.SDK.Mod.SourceGenerator -> Microsoft.CodeAnalysis.CSharp 4.10.0 -> Microsoft.CodeAnalysis.Common (= 4.10.0)
Dagger.SDK.Mod.SourceGenerator.Tests -> Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing 1.1.2 -> Microsoft.CodeAnalysis.CSharp.Workspaces 3.8.0 -> Microsoft.CodeAnalysis.Common (= 3.8.0).
The sourcegenerators testing library is currently rely on code analysis common version 3.8 while my real code Dagger.SDK.Mod.SourceGenerator are using csharp code analysis which's rely on cod analysis common 4.10. It seems those libraries version are not align. How do I fix it?
22 replies
CC#
Created by Win on 6/27/2024 in #help
Source generator WithAttributeMetadataName transform function not get invoke
Thanks. I will take a look at it. 🙏
22 replies
CC#
Created by Win on 6/27/2024 in #help
Source generator WithAttributeMetadataName transform function not get invoke
This is really another example of where I don't like the Verify framework: nothing is verifying that your code has no other errors in it
What is the preferred way to test this? I just don't want to fight with indentation in string. So I think of the snapshot testing at first.
22 replies
CC#
Created by Win on 6/27/2024 in #help
Source generator WithAttributeMetadataName transform function not get invoke
So I do need to find the way to reference Dagger.SDK.Mod to the refences to make c# compilation understand it right?
22 replies
CC#
Created by Win on 6/27/2024 in #help
Source generator WithAttributeMetadataName transform function not get invoke
Ahh, after put ReferenceAssemblies.Netstandard20 the diagnostics get reduced. 👍
22 replies
CC#
Created by Win on 6/27/2024 in #help
Source generator WithAttributeMetadataName transform function not get invoke
Oh, let me try.
22 replies
CC#
Created by Win on 6/27/2024 in #help
Source generator WithAttributeMetadataName transform function not get invoke
Sorry, I didn't follow you. Where should I put the GetDiagnostics to?
22 replies
CC#
Created by Win on 6/27/2024 in #help
Source generator WithAttributeMetadataName transform function not get invoke
22 replies
CC#
Created by Win on 6/27/2024 in #help
Source generator WithAttributeMetadataName transform function not get invoke
22 replies