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

refactor(ast_codegen): move away from RType in generators. #4682

Conversation

rzvxa
Copy link
Contributor

@rzvxa rzvxa commented Aug 6, 2024

This PR introduces EarlyCtx and LateCtx in place of the old CodegenCtx, Early passes operate at the AST level while generators and other late passes operate on the schema.

It will also replace the confusing RType name with something more idiomatic (open for suggestions, I haven't found a good name yet) I've named it AstType and dropped the R prefix for REnum and RStruct.

There are some qualities of life improvements too, Things like to_type_elide can be used to simplify the code.

Related to #4442 (and can potentially mark it "close as fixed").

Copy link

graphite-app bot commented Aug 6, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

Copy link

codspeed-hq bot commented Aug 6, 2024

CodSpeed Performance Report

Merging #4682 will not alter performance

Comparing 08-06-refactor_ast_codegen_move_away_from_rtype_in_generators (1690a57) with main (e24fb5b)

Summary

✅ 29 untouched benchmarks

@rzvxa rzvxa force-pushed the 08-06-refactor_ast_codegen_move_away_from_rtype_in_generators branch from 009c234 to b51e7b0 Compare August 6, 2024 13:17
@rzvxa rzvxa changed the base branch from main to 08-06-refactor_ast_add_explicit_enum_discriminants August 6, 2024 13:17
@rzvxa rzvxa force-pushed the 08-06-refactor_ast_codegen_move_away_from_rtype_in_generators branch from b691815 to 1350541 Compare August 6, 2024 13:58
@rzvxa rzvxa changed the base branch from 08-06-refactor_ast_add_explicit_enum_discriminants to 08-06-refactor_syntax_add_explicit_enum_discriminants_to_ast_related_types August 6, 2024 13:58
@rzvxa rzvxa force-pushed the 08-06-refactor_syntax_add_explicit_enum_discriminants_to_ast_related_types branch from 1d1315e to a2621cd Compare August 6, 2024 14:44
@rzvxa rzvxa force-pushed the 08-06-refactor_ast_codegen_move_away_from_rtype_in_generators branch from 1350541 to 05d5cd6 Compare August 6, 2024 14:44
@rzvxa rzvxa marked this pull request as ready for review August 6, 2024 15:42
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Aug 6, 2024
@overlookmotel overlookmotel force-pushed the 08-06-refactor_syntax_add_explicit_enum_discriminants_to_ast_related_types branch from a2621cd to e24fb5b Compare August 6, 2024 17:09
Copy link

graphite-app bot commented Aug 6, 2024

Merge activity

@overlookmotel overlookmotel changed the base branch from 08-06-refactor_syntax_add_explicit_enum_discriminants_to_ast_related_types to main August 6, 2024 17:13
This PR introduces `EarlyCtx` and `LateCtx` in place of the old `CodegenCtx`, Early passes operate at the AST level while generators and other late passes operate on the schema.

It will also replace the confusing `RType` name with something more idiomatic ~~(open for suggestions, I haven't found a good name yet)~~ I've named it `AstType` and dropped the `R` prefix for `REnum` and `RStruct`.

There are some qualities of life improvements too, Things like `to_type_elide` can be used to simplify the code.

Related to #4442 (and can potentially mark it "close as fixed").
@overlookmotel overlookmotel force-pushed the 08-06-refactor_ast_codegen_move_away_from_rtype_in_generators branch from 05d5cd6 to 1690a57 Compare August 6, 2024 17:14
@graphite-app graphite-app bot merged commit 1690a57 into main Aug 6, 2024
24 checks passed
@graphite-app graphite-app bot deleted the 08-06-refactor_ast_codegen_move_away_from_rtype_in_generators branch August 6, 2024 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0-merge Merge with Graphite Merge Queue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants