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

Modify generator to store determined data model with proper errors for conflicting types #74

Open
desaikd opened this issue Dec 7, 2023 · 0 comments
Assignees
Labels
code generation Improvements for code generation subcommand `generate`

Comments

@desaikd
Copy link
Contributor

desaikd commented Dec 7, 2023

Related conversations:

There's a point in the code gen method where we should go from Option<DataModel> to DataModel. This error should happen there, and all methods downstream of that point (including this one) should operate on DataModel instead of Option<DataModel>.

If constaints cannot be empty, it would be good to note that in a comment. If it can be empty, then code_gen_context can contain a None, which is possibly a problem?

We should be able to get a non-Option data type from this point on, I think.
Do we still need the CodeGenContext now that it's just this field? If you have a future use for it in mind, cool. Otherwise, the Option<DataModel> could just be a local variable in the code gen method.

@desaikd desaikd added the code generation Improvements for code generation subcommand `generate` label Dec 7, 2023
@desaikd desaikd self-assigned this Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code generation Improvements for code generation subcommand `generate`
Projects
Status: No status
Development

No branches or pull requests

1 participant