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

Add a schema version to JSON #45

Closed
RyanGlScott opened this issue May 2, 2023 · 0 comments · Fixed by #75
Closed

Add a schema version to JSON #45

RyanGlScott opened this issue May 2, 2023 · 0 comments · Fixed by #75

Comments

@RyanGlScott
Copy link
Contributor

On occasion, mir-json must make backwards-incompatible changes to the schema it uses for the JSON files that it produces. Ideally, such changes would be readily apparent from the JSON itself so that tools consuming the JSON can fail early, rather than misinterpreting the results of the new schema. To this end, we should add a version number to each JSON file that mir-json produces that describes which version of the schema is being used.

RyanGlScott added a commit that referenced this issue Sep 9, 2024
We now include a `"version": "X.Y.Z"` entry in the top-level JSON map that gets
generated for each MIR JSON file, where `X.Y.Z` represents the version of the
JSON schema that is used to generate the file. Going forward, any changes to
the JSON schema will be accompanied by a corresponding schema version bump
according to the version bumping principles laid out in [Semantic
Versioning](https://semver.org/).

Fixes #45.
RyanGlScott added a commit that referenced this issue Sep 10, 2024
We now include a `"version": <N>` entry in the top-level JSON map that gets
generated for each MIR JSON file, where `<N>` represents the version of the
JSON schema that is used to generate the file. Going forward, any changes to
the JSON schema will be accompanied by a corresponding schema version bump. I
have also included some logic in `link_crates` to ensure that all of the crates
being linked together use the same schema version.

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

Successfully merging a pull request may close this issue.

1 participant