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

Add runtime annotation support to model #22031

Closed
AndriySvyryd opened this issue Aug 12, 2020 · 2 comments · Fixed by #23929
Closed

Add runtime annotation support to model #22031

AndriySvyryd opened this issue Aug 12, 2020 · 2 comments · Fixed by #23929
Labels
area-model-building area-perf breaking-change closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. customer-reported type-enhancement
Milestone

Comments

@AndriySvyryd
Copy link
Member

AndriySvyryd commented Aug 12, 2020

  1. These annotations provide caching capabilities to the model.
  2. Can only be added after a model is built
  3. Aren't returned with normal annotations

Can be used to store the relational model, TypeMappingSource, relational overrides (that don't affect configuration), property indexes/accessors, generating/propagating properties in ValueGenerationManager

Related to #9329, #19213, #19806 and #21901

Also review the nullability of some methods: GetKeyValueComparer, CreateDependentsMapFactory, etc...

@ajcvickers ajcvickers added this to the Backlog milestone Aug 14, 2020
@AndriySvyryd AndriySvyryd self-assigned this Aug 27, 2020
@ajcvickers ajcvickers modified the milestones: Backlog, 6.0.0 Nov 4, 2020
AndriySvyryd added a commit that referenced this issue Jan 20, 2021
  Runtime annotations can only be added to a read-only model and ModelRuntimeInitializer is the service that adds the required ones.
Model validation has been moved to ModelRuntimeInitializer.

Fixes #22031
@AndriySvyryd AndriySvyryd added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Jan 20, 2021
AndriySvyryd added a commit that referenced this issue Jan 20, 2021
  Runtime annotations can only be added to a read-only model and ModelRuntimeInitializer is the service that adds the required ones.
Model validation has been moved to ModelRuntimeInitializer.

Fixes #22031
AndriySvyryd added a commit that referenced this issue Jan 20, 2021
  Runtime annotations can only be added to a read-only model and ModelRuntimeInitializer is the service that adds the required ones.
Model validation has been moved to ModelRuntimeInitializer.

Fixes #22031
@AndriySvyryd AndriySvyryd removed their assignment Jan 20, 2021
AndriySvyryd added a commit that referenced this issue Jan 20, 2021
  Runtime annotations can only be added to a read-only model and ModelRuntimeInitializer is the service that adds the required ones.
Model validation has been moved to ModelRuntimeInitializer.

Fixes #22031
AndriySvyryd added a commit that referenced this issue Jan 21, 2021
  Runtime annotations can only be added to a read-only model and ModelRuntimeInitializer is the service that adds the required ones.
Model validation has been moved to ModelRuntimeInitializer.

Fixes #22031
AndriySvyryd added a commit that referenced this issue Jan 22, 2021
  Runtime annotations can only be added to a read-only model and ModelRuntimeInitializer is the service that adds the required ones.
Model validation has been moved to ModelRuntimeInitializer.

Fixes #22031
AndriySvyryd added a commit that referenced this issue Jan 25, 2021
  Runtime annotations can only be added to a read-only model and ModelRuntimeInitializer is the service that adds the required ones.
Model validation has been moved to ModelRuntimeInitializer.

Fixes #22031
@ghost ghost closed this as completed in #23929 Jan 26, 2021
ghost pushed a commit that referenced this issue Jan 26, 2021
Runtime annotations can only be added to a read-only model and ModelRuntimeInitializer is the service that adds the required ones.
Model validation has been moved to ModelRuntimeInitializer.

Fixes #22031
@ajcvickers ajcvickers removed this from the 6.0.0 milestone Jan 27, 2021
@ajcvickers ajcvickers added this to the 6.0.0-preview1 milestone Jan 27, 2021
@lauxjpn
Copy link
Contributor

lauxjpn commented Sep 8, 2021

Are those the same as regular annotations, with the key difference of not leaking into any output files, and are therefore intended (from a provider point of view) to keep track of stuff internally, without the need to carefully clean-up those annotations later on?

@AndriySvyryd
Copy link
Member Author

@lauxjpn The key difference is that non-runtime annotations cannot be mutated after the model is built. Runtime annotations can appear in files, like the compiled model in some cases to improve perf.

The providers are free to use both as they see fit. Any that shouldn't be output can be removed in classes derived from RuntimeModelConvention and CSharpRuntimeAnnotationCodeGenerator

@ajcvickers ajcvickers modified the milestones: 6.0.0-preview1, 6.0.0 Nov 8, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-model-building area-perf breaking-change closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. customer-reported type-enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants