You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
@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.
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.
Activity
angularsen commentedon Mar 13, 2021
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 commentedon 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 commentedon 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.
dglozano commentedon Nov 24, 2021
@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 commentedon Nov 24, 2021
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.
stale commentedon 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.
Add consumer-owned quantity generation with UnitsNet.Modular (#1705)