[pull] main from fern-api:main#770
Merged
Merged
Conversation
* feat(swift): improve Swift SDK build performance Three changes that reduce Swift SDK E2E build time without altering customer-facing library output: 1. Fix SPM auto-compiling dynamic snippet files as 650+ separate executables by renaming Snippets/ to .snippets/ (hidden from SPM 5.9+ auto-discovery). Saves ~71s of linking overhead. 2. Add `maxExamplesPerEndpoint` config option to limit wire test examples per endpoint, reducing test compilation time for large specs. 3. Combine build and test into single `swift test -c release` invocation in seed scripts to avoid redundant recompilation. Benchmarked against Square OpenAPI spec: 680s → 139s E2E (-79%). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Remove maxExamplesPerEndpoint — it only games the benchmark, not real customers Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Revert metadata.json changes from local seed run Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Move snippets to Tests/Snippets/ and wrap as library code Instead of renaming Snippets/ to .snippets/ (which hides files from SPM but also prevents compilation), move snippets into Tests/Snippets/ so they compile as part of the test target. Each snippet is wrapped in an enum to eliminate top-level executable code, preventing SPM from treating them as standalone executables while still validating compilation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix biome formatting: inline writeFile call Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Address review feedback - Align Docker and local scripts: both use `swift build -c release --build-tests` + `swift test -c release` (no echo no-op, no debug/release divergence) - Add validation to wrapSnippetAsLibrary: warn and fall back to raw snippet if the expected function pattern isn't found Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Revert to single-invocation build+test for maximum E2E gains The split approach (swift build + swift test) added a second SPM invocation costing ~3m35s of release-mode build graph validation. Reverting to `swift test -c release` in the build phase with echo in the test phase. Seed always runs build→test sequentially so the test phase is never invoked independently. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Extract wrapSnippetAsLibrary as exported function and add unit tests Makes the snippet-wrapping logic directly testable by extracting it from the class. Adds tests covering: typical wrapping, missing func declaration fallback, missing invocation fallback, trailing whitespace tolerance, enum naming, and trailing empty line stripping. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Move changelog from swift generator to CLI (review feedback) Co-Authored-By: barry.zou <barry.zou@buildwithfern.com> --------- Co-authored-by: Barry <barry@Barrys-MacBook-Pro.local> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: lifanzou <265923155+lifanzou@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )