Home / Companies / Fern / Blog / Post Details
Content Deep Dive

Introducing Fern Replay

Blog post from Fern

Post Details
Company
Date Published
Author
Tanmay Singh
Word Count
1,138
Company Posts That Month
10
Language
English
Hacker News Points
-
Summary

Replay is a feature designed to maintain customizations in Fern-generated SDKs by automatically applying user edits during each regeneration through a 3-way merge, allowing for seamless integration of new updates without losing manual modifications. This capability addresses limitations of the previous .fernignore system, which protected entire files from being overwritten but was less scalable for managing line-level changes. Replay works by detecting custom commits in the SDK's git history since the last generation, applying these as tracked patches, and resolving conflicts through a structured merge process. The tool ensures that custom helpers and domain-specific logic are preserved and reapplied on top of any code changes, thus eliminating the need for repetitive manual adjustments after every code generation. The feature has been successfully implemented in production environments for companies like Frame.io and Auth0, adapting to various edge cases such as non-linear histories, multi-developer overlaps, and complex renaming scenarios. By harmonizing with the existing .fernignore method, Replay enhances the flexibility and maintainability of SDK customizations, enabling developers to efficiently manage and evolve their codebases without sacrificing their tailored enhancements.

Trends Found in this Post

No tracked trend matches for this post yet.