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

Using source generators #902

Closed
ebfortin opened this issue Feb 17, 2021 · 6 comments
Closed

Using source generators #902

ebfortin opened this issue Feb 17, 2021 · 6 comments
Labels

Comments

@ebfortin
Copy link
Contributor

Anyone thought about using source generators, a new feature from the latest C# release. Didn't look into it in depth but could potentially, I think, simplify adding new units to UnitNet.

@angularsen
Copy link
Owner

I haven't yet, but yes source generators are super interesting. I do plan to check them out more at some point.

Open to suggestions if someone can point out concrete advantages for UnitsNet, such as making the codegen simpler or faster.

@angularsen
Copy link
Owner

angularsen commented May 6, 2021

Well written article related to source generators, with the perspective of replacing reflection.
https://blog.marcgravell.com/2021/05/is-era-of-reflection-heavy-c-libraries.html?m=1

Also from that article:
https://github.com/dotnet/roslyn/blob/main/docs/features/source-generators.cookbook.md

@stale
Copy link

stale bot commented Jul 8, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jul 8, 2021
@stale stale bot closed this as completed Jul 16, 2021
@dglozano
Copy link
Contributor

@angularsen is this still an option? I've been wanting to look into source generators for a while, and this sounds like a good opportunity to try them out while learning.

@angularsen
Copy link
Owner

Absolutely, have at it 😄
I don't know enough about it to say whether it's a better approach than our current codegen, but it sure sounds promising.

@angularsen angularsen reopened this Nov 24, 2021
@stale stale bot removed the wontfix label Nov 24, 2021
@stale
Copy link

stale bot commented Mar 2, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants