Skip to content

Comments

refactor(ast_codegen): remove Generator::name and Pass::name methods#4764

Merged
graphite-app[bot] merged 1 commit intomainfrom
08-08-refactor_ast_codegen_remove_generator_name_method
Aug 8, 2024
Merged

refactor(ast_codegen): remove Generator::name and Pass::name methods#4764
graphite-app[bot] merged 1 commit intomainfrom
08-08-refactor_ast_codegen_remove_generator_name_method

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Aug 8, 2024

Remove Generator::name and Pass::name methods. All impls for these methods return a string identical to the struct name, so can set return value of Runner::name in define_generator! and define_pass! macros instead.

Copy link
Member Author

overlookmotel commented Aug 8, 2024

@graphite-app
Copy link
Contributor

graphite-app bot commented Aug 8, 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.

@overlookmotel overlookmotel marked this pull request as ready for review August 8, 2024 15:05
@overlookmotel overlookmotel force-pushed the 08-08-refactor_ast_codegen_remove_generator_name_method branch from 2f8e7cb to a19de15 Compare August 8, 2024 15:07
@overlookmotel overlookmotel changed the title refactor(ast_codegen): remove Generator::name method refactor(ast_codegen): remove Generator::name and Pass::name methods Aug 8, 2024
@overlookmotel overlookmotel requested a review from rzvxa August 8, 2024 15:09
@codspeed-hq
Copy link

codspeed-hq bot commented Aug 8, 2024

CodSpeed Performance Report

Merging #4764 will not alter performance

Comparing 08-08-refactor_ast_codegen_remove_generator_name_method (7345f68) with main (2dea0ca)

Summary

✅ 29 untouched benchmarks

Copy link
Contributor

@rzvxa rzvxa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I use this method to allow custom identifiers for generators/passes.
I leverage this for generating debug information.

.pass(AssertX("Test1"))
.pass(YYY)
.pass(AssertX("Test2"))

At the moment it doesn't have any use upstream but is useful for local development.
However, I can implement those manually. It doesn't have to go through the macro.

@rzvxa rzvxa added the 0-merge Merge with Graphite Merge Queue label Aug 8, 2024
@graphite-app
Copy link
Contributor

graphite-app bot commented Aug 8, 2024

Merge activity

  • Aug 8, 11:33 AM EDT: The merge label 'merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Aug 8, 11:38 AM EDT: rzvxa added this pull request to the Graphite merge queue.
  • Aug 8, 11:45 AM EDT: rzvxa merged this pull request with the Graphite merge queue.

…ods (#4764)

Remove `Generator::name` and `Pass::name` methods. All impls for these methods return a string identical to the struct name, so can set return value of `Runner::name` in `define_generator!` and `define_pass!` macros instead.
@rzvxa rzvxa force-pushed the 08-08-refactor_ast_codegen_re-order_imports branch from 3859fae to d32fb6f Compare August 8, 2024 15:39
@rzvxa rzvxa force-pushed the 08-08-refactor_ast_codegen_remove_generator_name_method branch from a19de15 to 7345f68 Compare August 8, 2024 15:40
Base automatically changed from 08-08-refactor_ast_codegen_re-order_imports to main August 8, 2024 15:44
@graphite-app graphite-app bot merged commit 7345f68 into main Aug 8, 2024
@graphite-app graphite-app bot deleted the 08-08-refactor_ast_codegen_remove_generator_name_method branch August 8, 2024 15:45
@overlookmotel
Copy link
Member Author

I use this method to allow custom identifiers for generators/passes. I leverage this for generating debug information.

I can't say I understand you. But feel free to revert this if those methods are actually useful. I just couldn't see them being used anywhere at present, but I may well be missing some context.

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