Skip to content
This repository has been archived by the owner on Dec 1, 2024. It is now read-only.

Commit

Permalink
Add new compatible schema version (4.125)
Browse files Browse the repository at this point in the history
  • Loading branch information
fredemmott committed Aug 31, 2021
1 parent a48b40f commit 81fe7cc
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 26 deletions.
9 changes: 7 additions & 2 deletions codegen/inferred_relationships.hack

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion codegen/schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions codegen/syntax/ClosureTypeSpecifier.hack

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions codegen/syntax/CollectionLiteralExpression.hack

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions codegen/syntax/TupleExpression.hack

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion codegen/token_from_data.hack

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions codegen/tokens/NewctxToken.hack

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions codegen/version.hack

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions src/__Private/is_compatible_schema_version.hack
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,16 @@ use const Facebook\HHAST\SCHEMA_VERSION;
*/
function is_compatible_schema_version(string $other_version): bool {
invariant(
SCHEMA_VERSION === '2021-08-09-0002',
SCHEMA_VERSION === '2021-08-12-0001',
'%s needs updating',
__FILE__,
);
if ($other_version === SCHEMA_VERSION) {
if ($other_version === '2021-08-12-0001') {
// - Adds `newctx` token
// - Infers usage of `readonly` token
return true;
}
if ($other_version === '2021-08-09-0002') {
return true;
}
return false;
Expand Down

0 comments on commit 81fe7cc

Please sign in to comment.