-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
1 parent
131980a
commit 0fe6859
Showing
7 changed files
with
72 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
The following document describes the changes to the JSON schema that | ||
`mir-json`–produced files adhere to. (This document should not be interpreted | ||
as a changelog for the code in the `mir-json` tools themselves, which are | ||
versioned separately.) | ||
|
||
## 1 | ||
|
||
Initial schema version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,5 +24,6 @@ extern crate rustc_target; | |
pub mod analyz; | ||
pub mod lib_util; | ||
pub mod link; | ||
pub mod schema_ver; | ||
|
||
mod tar_stream; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/// The version of the JSON schema that `mir-json` follows. This is intended for | ||
/// use by downstream tools to quickly determine if they are ingesting a MIR | ||
/// JSON file that is compatible with the version of the schema that they are | ||
/// expecting. | ||
/// | ||
/// Each version of the schema is assumed to be backwards-incompatible with | ||
/// previous versions of the schema. As such, any time this version number is | ||
/// bumped, it should be treated as a major version bump. | ||
pub const SCHEMA_VER: u64 = 1; |