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

Fix forward: Filtering platform in codegen #34897

Closed
wants to merge 1 commit 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
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ 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 @@ -69,8 +70,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 @@ -142,13 +142,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
3 changes: 2 additions & 1 deletion scripts/codegen/generate-artifacts-executor.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ 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 @@ -319,7 +320,7 @@ function generateSchema(tmpDir, library, node, codegenCliPath) {
'cli',
'combine',
'combine-js-to-schema-cli.js',
)} --platform ios ${pathToSchema} ${pathToJavaScriptSources}`,
)} ${pathToSchema} ${pathToJavaScriptSources}`,
);
console.log(`[Codegen] Generated schema: ${pathToSchema}`);
return pathToSchema;
Expand Down