Skip to content

Commit aaf8a79

Browse files
fix(cli-generator): add @fern-api/rust-sdk#dist:cli to turbo dependency graph (#16304)
The cli-generator's build.mjs copies the rust-sdk dist/ into dist/rust-sdk-dist/ for the Docker image, but the turbo.jsonc only listed @fern-api/rust-model#dist:cli as a dependency. This meant the rust-sdk dist was never built before the cli-generator's dist:cli ran, causing the copy to silently fail (try/catch in build.mjs) and the Docker image to ship without rust-sdk-dist/cli.cjs. At runtime, generateEmbeddedSdk's resolveRustSdkCli() then throws 'Could not resolve the @fern-api/rust-sdk CLI' since neither the bundled path nor the workspace resolution finds the entry point. Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
1 parent 7eedd81 commit aaf8a79

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
- summary: |
2+
Fix Docker image build to include rust-sdk dist by adding
3+
@fern-api/rust-sdk#dist:cli to turbo dependency graph.
4+
type: fix

generators/cli/turbo.jsonc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
"tasks": {
44
"dist:cli": {
55
// cli-generator's build.mjs copies the rust-model dist/ tree
6-
// into dist/rust-model-dist/ so the Docker image can invoke it
7-
// as a child process for embedded types generation.
8-
"dependsOn": ["^compile", "compile", "@fern-api/rust-model#dist:cli"]
6+
// into dist/rust-model-dist/ and the rust-sdk dist/ tree into
7+
// dist/rust-sdk-dist/ so the Docker image can invoke them as
8+
// child processes for embedded types and SDK generation.
9+
"dependsOn": ["^compile", "compile", "@fern-api/rust-model#dist:cli", "@fern-api/rust-sdk#dist:cli"]
910
}
1011
}
1112
}

0 commit comments

Comments
 (0)