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

Remove CodegenDataModelInstance and make applications provide their codegen data model (likely via a static for example) #36740

Open
2 tasks
andy31415 opened this issue Dec 5, 2024 · 2 comments
Assignees

Comments

@andy31415
Copy link
Contributor

See #36658 (comment)

The usage of a mutable persistence provider that is used at startup is awkward. It seems better to have the persistence provider established in the constructor.

Expected changes:

  • Make the persistence provider to use part of the CodegenDataModel constructor (may be null, which means unchanged)
  • Remove CodegenDataModelProviderInstance (header and cpp files and all linkages), let applications build their own codegen data model provider instead and allocate space for them.
@andy31415
Copy link
Contributor Author

Note that this means a LOT of file changes, however making applications be responsible of what data model provider they use seems to be the best dependency use (this way it is clear that applications use zap/ember for example, so they provide that one as their underlying model)

@andy31415 andy31415 changed the title Remove CodegenDataModelInstance and make applications provide theyr codegen data model (likely via a static for example) Remove CodegenDataModelInstance and make applications provide their codegen data model (likely via a static for example) Dec 5, 2024
@bzbarsky-apple
Copy link
Contributor

This is also the sanest way to have applications have a provider that uses ZAP codegen for some endpoints and dynamic things for others.

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

No branches or pull requests

3 participants