Closed ethpch closed 2 weeks ago
The old functionality is correct so this is a legitimate bug. Thanks for bringing it to our attention.
We should probably add some unit tests around this scenario to fix I guess @ChrisPulman
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Describe the bug 🐞
I have tried the latest version 2.0.9, and find some unexpected error.
As the title says, all generators cannot generate code for generic types like
Foo<T>
. Error messages are生成器[GeneratorName]未能生成源。它不会影响输出,因此可能会造成编译错误。异常的类型为“ArgumentException”,显示消息“hintName“TestClass2<T>.IViewFor.g.cs”在位置 10 处包含无效字符“<”。
All generators behave like this,[Reactive]
,[ObservableAsProperty]
,[ReactiveCommand]
,[IViewFor]
,[RoutedControlHost]
,ViewModelControlHost
. Finally no code is generated.Minimal reproduction repository is below.
Non-generic class and version 1.1.31 work well.
Step to reproduce
Reproduction repository
https://github.com/ethpch/ReactiveUI.SourceGenerators.GenericClassBug
Expected behavior
Code is generated as expected
Screenshots 🖼️
IDE
No response
Operating system
No response
Version
No response
Device
No response
ReactiveUI Version
No response
Additional information ℹ️
I find some of your documentation is wrong, like
[IViewFor(...)]
. #61 says nowIViewFor
uses generic type, and do not accept string as parameter anymore. Can you correct the documentation? Maybe next time, but finally a correct documentation is better.