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

Convention for field order in AST types #6453

Closed
overlookmotel opened this issue Oct 11, 2024 · 2 comments · Fixed by #6863
Closed

Convention for field order in AST types #6453

overlookmotel opened this issue Oct 11, 2024 · 2 comments · Fixed by #6863
Assignees

Comments

@overlookmotel
Copy link
Contributor

overlookmotel commented Oct 11, 2024

I opened #6391 to re-order fields on some types so they're in source order. I had assumed:

Our convention is that AST type fields are ordered in order they appear in source.

@Boshen replied:

In source or runtime order? This should be documented.

Opening this issue to resolve question of what is our convention, so that we can document it.

A couple of questions:

  1. What does "runtime order" mean exactly? The order of runtime evaluation?

  2. Are there any cases where source order and runtime order are different? I can't immediately think of any, but JS is weird - there may well be some obscure cases where they're different.

@overlookmotel overlookmotel added the C-bug Category - Bug label Oct 11, 2024
@Boshen Boshen added needs-discussion Requires a discussion from the core team and removed C-bug Category - Bug labels Oct 11, 2024
@Boshen
Copy link
Member

Boshen commented Oct 12, 2024

Evaluation order defined in the spec. For types, we look at how it's defined in tsc.

@Boshen Boshen closed this as completed Oct 12, 2024
@overlookmotel
Copy link
Contributor Author

Reopening this just for the action point of adding this info to the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants