Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Put types into a namespace instead of module #33

Open
xperiandri opened this issue Apr 5, 2021 · 7 comments
Open

Put types into a namespace instead of module #33

xperiandri opened this issue Apr 5, 2021 · 7 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@xperiandri
Copy link
Contributor

Putting types into a module is not a good idea. As it causes some issues with their consumption from WPF/UWP/Uno

@Zaid-Ajaj
Copy link
Owner

Zaid-Ajaj commented Apr 5, 2021

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?

@xperiandri
Copy link
Contributor Author

You cannot instantiate nested types in XAML. For example to use as sample data to display on designer

@Zaid-Ajaj
Copy link
Owner

Zaid-Ajaj commented Apr 5, 2021

I see, that makes sense. Let me try to see what I can do. Unless you want to give it a try yourself 😉 PRs are always welcome

@Zaid-Ajaj Zaid-Ajaj added enhancement New feature or request good first issue Good for newcomers labels Apr 5, 2021
@xperiandri
Copy link
Contributor Author

Is it fixed?

@Zaid-Ajaj
Copy link
Owner

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

@xperiandri
Copy link
Contributor Author

Could you point to the line where it happens?

@Zaid-Ajaj
Copy link
Owner

It happens here in the function CodeGen.generateQualifiedModule:
https://github.com/Zaid-Ajaj/Snowflaqe/blob/master/src/Program.fs#L421

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants