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

fix: ensure parsing schema metadata isn't ambiguous #1024

Merged
merged 1 commit into from
Mar 6, 2024

Conversation

alecthomas
Copy link
Collaborator

An example of the ambiguity is on fields. Given an alias:

data Data {
  field Field alias json "foo"
}

This effectively prevents the next field from being named "alias":

data Data {
  field Field
  alias json "foo"
}

Metadata is now disambiguated by requiring a + before every piece of metadata:

data Data {
  field Field +alias json "foo"
}

(also converted field aliases to metadata)

@alecthomas alecthomas force-pushed the aat/disambiguate-schema branch from 7a0f4a6 to 26a4d48 Compare March 6, 2024 04:16
@alecthomas alecthomas mentioned this pull request Mar 6, 2024
@alecthomas alecthomas force-pushed the aat/disambiguate-schema branch from 26a4d48 to e2a8bc0 Compare March 6, 2024 04:30
An example of the ambiguity is on fields. Given an alias:

```
data Data {
  field Field alias json "foo"
}
```

This effectively prevents the next field from being named "alias":

```
data Data {
  field Field
  alias json "foo"
}
```

Metadata is now disambiguated by requiring a `+` before every piece of
metadata:

```
data Data {
  field Field +alias json "foo"
}
```

(also converted field aliases to metadata)
@alecthomas alecthomas force-pushed the aat/disambiguate-schema branch from e2a8bc0 to 18e0718 Compare March 6, 2024 04:30
@alecthomas alecthomas merged commit aeef03a into main Mar 6, 2024
11 checks passed
@alecthomas alecthomas deleted the aat/disambiguate-schema branch March 6, 2024 04:34
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 this pull request may close these issues.

1 participant