Skip to content

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Mar 12, 2025

ExplicitResourceManagement has no enter_block_statement method.

@github-actions github-actions bot added A-transformer Area - Transformer / Transpiler C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Mar 12, 2025
Copy link
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@overlookmotel overlookmotel marked this pull request as ready for review March 12, 2025 04:23
@overlookmotel overlookmotel requested a review from Dunqing as a code owner March 12, 2025 04:23
@overlookmotel overlookmotel requested review from camc314 and removed request for Dunqing March 12, 2025 04:24
@codspeed-hq
Copy link

codspeed-hq bot commented Mar 12, 2025

CodSpeed Performance Report

Merging #9698 will not alter performance

Comparing 03-12-refactor_transformer_using_remove_unused_call_to_enter_block_statement_ (0903e7e) with main (3d4400c)

Summary

✅ 33 untouched benchmarks

@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Mar 12, 2025
Copy link
Contributor

camc314 commented Mar 12, 2025

Merge activity

  • Mar 12, 5:03 AM EDT: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Mar 12, 5:03 AM EDT: A user added this pull request to the Graphite merge queue.
  • Mar 12, 5:17 AM EDT: A user merged this pull request with the Graphite merge queue.

…ment` (#9698)

`ExplicitResourceManagement` has no `enter_block_statement` method.
@graphite-app graphite-app bot force-pushed the 03-12-refactor_transformer_using_remove_unused_call_to_enter_block_statement_ branch from fcb892e to 0903e7e Compare March 12, 2025 09:03
@graphite-app graphite-app bot merged commit 0903e7e into main Mar 12, 2025
25 checks passed
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Mar 12, 2025
@graphite-app graphite-app bot deleted the 03-12-refactor_transformer_using_remove_unused_call_to_enter_block_statement_ branch March 12, 2025 09:17
@camc314
Copy link
Contributor

camc314 commented Mar 12, 2025

@overlookmotel would it be better if the transforms didn't implement the trait, and instead just had pub fn enter..., this way we'd catch these errors at compile time, rather than manually with our eyes

@overlookmotel
Copy link
Member Author

Yes maybe. The idea was to impose some consistency/order on transformers by mandating that they implement all their "entry points" as an impl Traverse. I do think that has some merit, but this is the unfortunate downside.

The only cost of making a mistake is bad code style. As the default methods in Traverse trait are all empty and all marked #[inline] any redundant calls will be completely optimized out. So there's no perf cost.

The mistake fixed in #9692 (which did have a perf impact) would not have been caught except by eye either way.

So... hmm... maybe, maybe not!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-transformer Area - Transformer / Transpiler C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants