RN: Fix Codegen Schema Buck Dependency (#28719)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/28719

The Buck dependencies for the schema rule is missing the source files for the new codegen (and specifically, the parser).

Changelog:
[Internal]

(Note: this ignores all push blocking failures!)

Reviewed By: cpojer

Differential Revision: D21162993

fbshipit-source-id: 4addb6f257134e245a5d86dd427ee2536ed6d658
This commit is contained in:
Tim Yung 2020-04-21 19:12:57 -07:00 коммит произвёл Facebook GitHub Bot
Родитель 5242ad931b
Коммит 6aab3f8946
2 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -29,6 +29,7 @@ fb_native.sh_binary(
resources = [ resources = [
"src/cli/combine/combine-js-to-schema.js", "src/cli/combine/combine-js-to-schema.js",
"src/cli/combine/combine_js_to_schema.sh", "src/cli/combine/combine_js_to_schema.sh",
":yarn-workspace",
"//xplat/js:setup_env", "//xplat/js:setup_env",
], ],
visibility = ["PUBLIC"], visibility = ["PUBLIC"],

Просмотреть файл

@ -163,7 +163,9 @@ function convertDefaultTypeToString(
return ''; return '';
default: default:
(typeAnnotation.name: empty); (typeAnnotation.name: empty);
throw new Error('Received unknown NativePrimitiveTypeAnnotation'); throw new Error(
`Unsupported type annotation: ${typeAnnotation.name}`,
);
} }
case 'ArrayTypeAnnotation': { case 'ArrayTypeAnnotation': {
const elementType = typeAnnotation.elementType; const elementType = typeAnnotation.elementType;
@ -198,7 +200,7 @@ function convertDefaultTypeToString(
)}`; )}`;
default: default:
(typeAnnotation: empty); (typeAnnotation: empty);
throw new Error('Received invalid typeAnnotation'); throw new Error(`Unsupported type annotation: ${typeAnnotation.type}`);
} }
} }