Skip to content

feat(transformer/statement-injector): add an assertion to check if it still contains statements that don't inject#9063

Merged
graphite-app[bot] merged 1 commit intomainfrom
02-12-feat_transformer_statement-injector_add_an_assertion_to_check_if_it_still_contains_statements_that_don_t_inject
Feb 18, 2025
Merged

feat(transformer/statement-injector): add an assertion to check if it still contains statements that don't inject#9063
graphite-app[bot] merged 1 commit intomainfrom
02-12-feat_transformer_statement-injector_add_an_assertion_to_check_if_it_still_contains_statements_that_don_t_inject

Conversation

@Dunqing
Copy link
Member

@Dunqing Dunqing commented Feb 12, 2025

When there are still statements that aren't inserted after the visitor ends, it means statements inserted with an incorrect address or outdated address (e.g., the original statement has mutated to a new statement).

This PR adds an assertion to expose this potential bug as soon as possible on the development side.

Copy link
Member Author

Dunqing commented Feb 12, 2025


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.

@github-actions github-actions bot added A-transformer Area - Transformer / Transpiler C-enhancement Category - New feature or request labels Feb 12, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Feb 12, 2025

CodSpeed Performance Report

Merging #9063 will not alter performance

Comparing 02-12-feat_transformer_statement-injector_add_an_assertion_to_check_if_it_still_contains_statements_that_don_t_inject (3289721) with main (c2101ad)

Summary

✅ 33 untouched benchmarks

Copy link
Member

@overlookmotel overlookmotel left a comment

Choose a reason for hiding this comment

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

This is a really good idea. You can ignore my nit about naming if you can't be bothered!

@Dunqing Dunqing force-pushed the 02-12-fix_transformer_decorator_decoration_disappear_due_to_incorrect_statement_address branch from 27b2fe4 to 0abf0d8 Compare February 16, 2025 03:09
@Dunqing Dunqing force-pushed the 02-12-feat_transformer_statement-injector_add_an_assertion_to_check_if_it_still_contains_statements_that_don_t_inject branch from c35f52b to 06b6052 Compare February 16, 2025 03:09
@Dunqing Dunqing changed the base branch from 02-12-fix_transformer_decorator_decoration_disappear_due_to_incorrect_statement_address to graphite-base/9063 February 16, 2025 07:21
@Dunqing Dunqing force-pushed the 02-12-feat_transformer_statement-injector_add_an_assertion_to_check_if_it_still_contains_statements_that_don_t_inject branch from 06b6052 to 61d2090 Compare February 16, 2025 07:21
@Dunqing Dunqing changed the base branch from graphite-base/9063 to 02-16-fix_transformer_statement-injector_skip_empty_iterator February 16, 2025 07:21
@Dunqing Dunqing force-pushed the 02-12-feat_transformer_statement-injector_add_an_assertion_to_check_if_it_still_contains_statements_that_don_t_inject branch 2 times, most recently from 3896b18 to 29d72ae Compare February 17, 2025 08:20
@Dunqing Dunqing force-pushed the 02-16-fix_transformer_statement-injector_skip_empty_iterator branch from 52bbfc2 to a851799 Compare February 17, 2025 08:20
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Feb 18, 2025
@overlookmotel overlookmotel changed the base branch from 02-16-fix_transformer_statement-injector_skip_empty_iterator to graphite-base/9063 February 18, 2025 21:43
graphite-app bot pushed a commit that referenced this pull request Feb 18, 2025
… `insert_many_before` (#9157)

Insert an empty iterator which will cause panic after #9063
@overlookmotel overlookmotel force-pushed the 02-12-feat_transformer_statement-injector_add_an_assertion_to_check_if_it_still_contains_statements_that_don_t_inject branch from 29d72ae to f5e73e0 Compare February 18, 2025 21:47
Copy link
Member

overlookmotel commented Feb 18, 2025

Merge activity

  • Feb 18, 4:48 PM EST: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Feb 18, 4:58 PM EST: A user added this pull request to the Graphite merge queue.
  • Feb 18, 5:02 PM EST: A user merged this pull request with the Graphite merge queue.

@overlookmotel overlookmotel changed the base branch from graphite-base/9063 to main February 18, 2025 21:48
@overlookmotel overlookmotel force-pushed the 02-12-feat_transformer_statement-injector_add_an_assertion_to_check_if_it_still_contains_statements_that_don_t_inject branch from f5e73e0 to d7e3555 Compare February 18, 2025 21:48
… still contains statements that don't inject (#9063)

When there are still statements that aren't inserted after the visitor ends, it means statements inserted with an incorrect address or outdated address (e.g., the original statement has mutated to a new statement).

This PR adds an assertion to expose this potential bug as soon as possible on the development side.
@graphite-app graphite-app bot force-pushed the 02-12-feat_transformer_statement-injector_add_an_assertion_to_check_if_it_still_contains_statements_that_don_t_inject branch from d7e3555 to 3289721 Compare February 18, 2025 21:58
@graphite-app graphite-app bot merged commit 3289721 into main Feb 18, 2025
25 checks passed
@graphite-app graphite-app bot deleted the 02-12-feat_transformer_statement-injector_add_an_assertion_to_check_if_it_still_contains_statements_that_don_t_inject branch February 18, 2025 22:02
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 A-transformer Area - Transformer / Transpiler C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants