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

Centralize annotation resolution and allow multivalued annotations #2489

Merged
merged 6 commits into from
Oct 1, 2024

Conversation

mhutch
Copy link

@mhutch mhutch commented Sep 19, 2024

  • Replace per-subsystem annotation providers with an annotation resolver. This simplifies things and means that subsystem authors have one centralized place to get annotation values, instead of having to know which subsystem to use.
  • Pass additional context to annotation providers, to allow more powerful dynamic resolution of annotation values
  • Annotations may be defined as having multiple values, in which case multiple values may be added to the internal storage on the symbol, and providers may return enumerations of values. New annotation
    enumeration APIs allow enumerating the values from the symbol and the providers.
  • Strongly type SetRange, add GetRange for symmetry

@mhutch
Copy link
Author

mhutch commented Sep 19, 2024

Note: I didn't touch ValueAnnotationExtensions.cs as it's mostly removed in #2486 and I expect that PR to go in before this one. I'll fix it up after #2486 merges.

@mhutch mhutch force-pushed the annotation-resolver branch from a4531f1 to e0f6640 Compare September 19, 2024 22:17
…esolver

This simplifies things and means that subsystem authors have one
centralized place to get annotation values, instead of having to
know which subsytem to use.
This allows more powerful dynamic resolution of annotation values
Annotations may be defined as having multiple values, in which case
multiple values may be added to the internal storage on the symbol,
and providers may return enumerations of values. New annotation
enumeration APIs allow enumerating the values from the symbol and
the providers.
@mhutch mhutch force-pushed the annotation-resolver branch from e0f6640 to b5e7d05 Compare September 20, 2024 20:21
@KathleenDollard KathleenDollard added the Powderhouse Work to isolate parser and features label Sep 20, 2024
@mhutch mhutch merged commit d25d2da into dotnet:main-powderhouse Oct 1, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Powderhouse Work to isolate parser and features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants