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

feat(ast): implement From<Argument> for ArrayExpressionElement #7830

Conversation

Dunqing
Copy link
Member

@Dunqing Dunqing commented Dec 13, 2024

No description provided.

@github-actions github-actions bot added the A-ast Area - AST label Dec 13, 2024
Copy link
Member Author

Dunqing commented Dec 13, 2024


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.

Copy link

codspeed-hq bot commented Dec 13, 2024

CodSpeed Performance Report

Merging #7830 will not alter performance

Comparing 12-13-feat_ast_implement_from_argument_for_arrayexpressionelement (6466a4a) with main (d72c888)

Summary

✅ 29 untouched benchmarks

@Dunqing Dunqing force-pushed the 12-13-feat_ast_implement_from_argument_for_arrayexpressionelement branch 3 times, most recently from e66c18d to 84114bd Compare December 13, 2024 09:36
Copy link
Contributor

@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.

I'll make a change to this in a follow-up.

@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Dec 13, 2024
Copy link
Contributor

overlookmotel commented Dec 13, 2024

Merge activity

  • Dec 13, 6:55 AM EST: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Dec 13, 6:55 AM EST: A user added this pull request to the Graphite merge queue.
  • Dec 13, 6:59 AM EST: The Graphite merge queue couldn't merge this PR because it was not satisfying all requirements (Failed CI: 'Label and Check PR Title', 'Conformance', 'Test NAPI', 'Minification Size', 'AST Changes').
  • Dec 13, 8:00 AM EST: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Dec 13, 8:12 AM EST: A user added this pull request to the Graphite merge queue.
  • Dec 13, 8:18 AM EST: A user merged this pull request with the Graphite merge queue.

@overlookmotel overlookmotel force-pushed the 12-13-feat_ast_implement_from_argument_for_arrayexpressionelement branch from 84114bd to e633cf0 Compare December 13, 2024 11:56
@overlookmotel overlookmotel force-pushed the 12-13-feat_ast_implement_from_argument_for_arrayexpressionelement branch from e633cf0 to 38c849b Compare December 13, 2024 11:57
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 13, 2024
@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Dec 13, 2024
@Boshen Boshen force-pushed the 12-13-feat_ast_implement_from_argument_for_arrayexpressionelement branch from 38c849b to 6466a4a Compare December 13, 2024 13:14
@graphite-app graphite-app bot merged commit 6466a4a into main Dec 13, 2024
25 checks passed
@graphite-app graphite-app bot deleted the 12-13-feat_ast_implement_from_argument_for_arrayexpressionelement branch December 13, 2024 13:18
Dunqing pushed a commit that referenced this pull request Dec 13, 2024
…nElement` conversion (#7848)

Follow-on after #7830. Refactor.

Use an exhaustive match in implementation of `From<Argument<'a>> for ArrayExpressionElement<'a>`.

At present this change makes no difference. But the reason I feel an exhaustive match is preferable here is that if we add a variant to `Argument` enum later, then this match will be missing an arm to handle that variant, and compiler will refuse to compile until we deal with it.

Whereas before this PR, compiler would not complain, but instead it'd be a runtime panic when `into_expression` discovers that the new `Argument` variant is not an `Expression`.
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-ast Area - AST C-enhancement Category - New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants