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

Restore Filtering platform in codegen #35028

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/react-native-codegen/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-codegen",
"version": "0.71.0",
"version": "0.71.1",
"description": "⚛️ Code generation tools for React Native",
"homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/react-native-codegen",
"repository": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ abstract class GenerateCodegenSchemaTask : Exec() {
}

internal fun setupCommandLine() {
// TODO: restore the --platform android parameters as soon as we publish the codegen package.
commandLine(
windowsAwareCommandLine(
*nodeExecutableAndArgs.get().toTypedArray(),
Expand All @@ -72,8 +71,8 @@ abstract class GenerateCodegenSchemaTask : Exec() {
.get()
.asFile
.absolutePath,
// "--platform",
// "android",
"--platform",
"android",
generatedSchemaFile.get().asFile.absolutePath,
jsRootDir.asFile.get().absolutePath,
))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,13 @@ class GenerateCodegenSchemaTaskTest {
}

task.setupCommandLine()
// TODO: restore the --platform android parameters as soon as we publish the codegen package.

assertEquals(
listOf(
"--verbose",
File(codegenDir, "lib/cli/combine/combine-js-to-schema-cli.js").toString(),
// "--platform",
// "android",
"--platform",
"android",
File(outputDir, "schema.json").toString(),
jsRootDir.toString(),
),
Expand Down
2 changes: 1 addition & 1 deletion repo-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"mkdirp": "^0.5.1",
"prettier": "^2.4.1",
"react": "18.2.0",
"react-native-codegen": "^0.71.0",
"react-native-codegen": "^0.71.1",
"react-test-renderer": "18.2.0",
"shelljs": "^0.8.5",
"signedsource": "^1.0.0",
Expand Down
3 changes: 1 addition & 2 deletions scripts/codegen/generate-artifacts-executor.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,6 @@ function generateSchema(tmpDir, library, node, codegenCliPath) {

console.log(`\n\n[Codegen] >>>>> Processing ${library.config.name}`);
// Generate one schema for the entire library...
// TODO: restore the `--platform ios` parameters as soon as we publish the codegen package.
executeNodeScript(
node,
`${path.join(
Expand All @@ -320,7 +319,7 @@ function generateSchema(tmpDir, library, node, codegenCliPath) {
'cli',
'combine',
'combine-js-to-schema-cli.js',
)} ${pathToSchema} ${pathToJavaScriptSources}`,
)} --platform ios ${pathToSchema} ${pathToJavaScriptSources}`,
);
console.log(`[Codegen] Generated schema: ${pathToSchema}`);
return pathToSchema;
Expand Down