Skip to content

Using source generators #902

Closed
Closed

Description

@ebfortin

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.

Activity

  1. angularsen commented on Mar 13, 2021

    @angularsen
    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.

  2. angularsen commented on May 6, 2021

    @angularsen
    Owner

    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

  3. stale commented on Jul 8, 2021

    @stale

    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.

  4. dglozano commented on Nov 24, 2021

    @dglozano
    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.

  5. angularsen commented on Nov 24, 2021

    @angularsen
    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.

  6. stale commented on Mar 2, 2022

    @stale

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions