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): reorder fields to reflect their visit order. #3994

Conversation

rzvxa
Copy link
Collaborator

@rzvxa rzvxa commented Jul 1, 2024

No description provided.

Copy link

graphite-app bot commented Jul 1, 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.

@github-actions github-actions bot added the A-ast Area - AST label Jul 1, 2024
Copy link

codspeed-hq bot commented Jul 1, 2024

CodSpeed Performance Report

Merging #3994 will not alter performance

Comparing 07-01-refactor_ast_reorder_fields_to_reflect_their_visit_order (0fe22a8) with main (bdee156)

Summary

✅ 28 untouched benchmarks

Copy link

graphite-app bot commented Jul 1, 2024

Merge activity

@Boshen Boshen force-pushed the 07-01-refactor_ast_reorder_fields_to_reflect_their_visit_order branch from e4f27b3 to 0fe22a8 Compare July 1, 2024 16:10
@graphite-app graphite-app bot merged commit 0fe22a8 into main Jul 1, 2024
24 checks passed
@graphite-app graphite-app bot deleted the 07-01-refactor_ast_reorder_fields_to_reflect_their_visit_order branch July 1, 2024 16:14
@overlookmotel
Copy link
Collaborator

@rzvxa I'm late on this one, but a question: Does this new order align with Visit's current visitation order? Or just to "what makes sense"?

@rzvxa
Copy link
Collaborator Author

rzvxa commented Jul 1, 2024

@rzvxa I'm late on this one, but a question: Does this new order align with Visit's current visitation order? Or just to "what makes sense"?

It is both, That's the order they would get interpreted; And we already visit them in this interpretation order, Right now we have the exact same visit order as our field definitions, If we find a conflict with the interpretation order we probably should consider it as a bug(unless we have a good reason for keeping it out of order)

@github-actions github-actions bot mentioned this pull request Jul 2, 2024
Boshen added a commit that referenced this pull request Jul 2, 2024
## [0.16.3] - 2024-07-02

### Features

- b257d53 linter: Support report
`@typescript-eslint/consistent-type-imports` (#3895) (mysteryven)

### Bug Fixes

- 23038ad codegen: Print `TSFunctionType` inside `TSTypeAssertion`
(#3999) (Boshen)
- d995f94 semantic: Resolve reference incorrectly when a parameter
references a parameter that hasn't been defined yet (#4004) (Dunqing)
- bdee156 transformer/typescript: `declare class` incorrectly preserved
as runtime class (#3997) (Dunqing)
- a50ce3d transformer/typescript: Missing initializer for class
constructor arguments with `private` and `protected` modifier (#3996)
(Dunqing)

### Refactor

- 0fe22a8 ast: Reorder fields to reflect their visit order. (#3994)
(rzvxa)
- d0eac46 parser: Use function instead of trait to parse normal lists
(#4003) (Boshen)

Co-authored-by: Boshen <Boshen@users.noreply.github.com>
Boshen pushed a commit that referenced this pull request Jul 10, 2024
Won't fix #4142

It is similar to #3994 but for those types that weren't relying on this order. It seems to be the right order.
technically speaking it is a breaking change but I know as a fact that it won't have a big difference on our downstream. If you want it to be chronically correct feel free to merge as a breaking change.
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants