Closed Soar360 closed 2 weeks ago
Can you provide a small source code snippet if able of a class that's producing the error?
We will use it in our unit tests.
Cheers
Try this:
https://github.com/Soar360/ReactiveUI.SourceGenerators.Fix131
CSC: warning CS8785: The generator "ReactiveGenerator" failed to generate source. It will not affect output, but it may cause compilation errors. The exception type is "ArgumentException" with the message "The hintName 'SearchTask.Properties.g.cs' of the added source file must be unique within the generator. (Parameter 'hintName')".
and
D:\src\test\ReactiveUI.SourceGenerators.Fix131\Demo\Demo>dotnet --list-sdks
6.0.100 [C:\Program Files\dotnet\sdk]
8.0.404 [C:\Program Files\dotnet\sdk]
9.0.100 [C:\Program Files\dotnet\sdk]
GitHubContribute to Soar360/ReactiveUI.SourceGenerators.Fix131 development by creating an account on GitHub.
Appreciate it. We should have a fix out for this weekend.
Describe the bug 🐞
I'm encountering an issue with the
ReactiveUI.SourceGenerators
package (version 2.0.17) in my Avalonia project. After upgrading to this version, I receive the following warning during compilation:This issue arises because I have two
SearchTask
types in my project, but they are in different namespaces. It seems that the generator is having trouble handling multiple types with the same name but different namespaces.I would like to request that this issue be addressed in the official ReactiveUI repository, as it currently prevents me from using the Source Generators effectively.
Step to reproduce
SearchTask
) in different namespaces.ReactiveUI.SourceGenerators
version 2.0.17.Reproduction repository
https://github.com/reactiveui/ReactiveUI.SourceGenerators
Expected behavior
The source generator should handle cases where multiple types share the same name but are in different namespaces without causing conflicts or errors.
Screenshots 🖼️
No response
IDE
Visual Studio 2022
Operating system
Windows
Version
2.0.17
Device
No response
ReactiveUI Version
No response
Additional information ℹ️
No response