feat(cli): make sdk-config authoritative for generation - #17759
Conversation
There was a problem hiding this comment.
AI Review Summary
This PR makes sdk-config.yml authoritative for fern generate --sdk-config, replacing generators.yml group matching with an in-memory OSSWorkspace built from SDK Config sources/targets. Overall the approach is coherent, but the removal of validateSdkConfigImportSettings drops a validation path, and a few details in createSdkConfigWorkspace (temp file extension for remote specs, silently dropping extra overlays vs. failing, output path handling) deserve a second look.
- 🟡 2 warning(s)
- 🔵 2 suggestion(s)
AI Review
🔵 suggestion — packages/cli/cli/src/commands/generate/createSdkConfigWorkspace.ts (line 160)
Failing hard when a source declares more than one overlay is fine, but the surrounding code then silently uses only overlays[0]. Since a single overlay is supported and >1 throws, the intent is clear — just note that any future schema change allowing multiple overlays will hit this hard error at generation time rather than at config parse time. Consider surfacing this constraint in the SDK Config schema validation instead, so users learn about it before running generation.
This review is complete for the current scope. Addressing all critical and warning findings above satisfies the review; suggestions are optional. Request another review only if subsequent changes introduce new behavior or materially expand the pull request's scope.
There was a problem hiding this comment.
Devin Review found 5 potential issues.
2 flags not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)
Docs Generation Benchmark ResultsComparing PR branch against median of 5 nightly run(s) on
Docs generation runs |
SDK Generation Benchmark ResultsComparing PR branch against median of 5 nightly run(s) on Full benchmark table (click to expand)
main (generator): generator-only time via --skip-scripts (includes Docker image build, container startup, IR parsing, and code generation — this is the same Docker-based flow customers use via |
Description
Makes sdk-config.yml authoritative when generating SDKs with fern generate --sdk-config.
Changes
Backwards compatibility
Generation without --sdk-config continues through the existing generators.yml path unchanged.
Hand-authored generatorVersion values remain supported as exact pins. When omitted, the CLI resolves the latest supported generator during generation.
Testing