Open xperiandri opened 3 years ago
Hi @xperiandri, can you tell me more about this issue? The global types are included as part of a namespace and the query-specific types are in a module inside that same namespace. What exactly needs to change / how does the expected output looks like?
You cannot instantiate nested types in XAML. For example to use as sample data to display on designer
I see, that makes sense. Let me try to see what I can do. Unless you want to give it a try yourself :wink: PRs are always welcome
Is it fixed?
Nope, didn't have time for it. Feel free to submit a PR for it 😄 it should be another boolean option. Maybe "nestedModuleTypes"? 🤔 where true is default, false -> generates namespaces instead
Could you point to the line where it happens?
It happens here in the function CodeGen.generateQualifiedModule
:
https://github.com/Zaid-Ajaj/Snowflaqe/blob/master/src/Program.fs#L421
Putting types into a module is not a good idea. As it causes some issues with their consumption from WPF/UWP/Uno