$ the-wire · showcase
Layouts guide rewritten, Bootsnap 1.26.0 fixes cache corruption
By RepoJournal · Filed · About Rails
Rails rewrote its Layouts and Rendering guide and released Bootsnap 1.26.0 with fixes for corrupted cache entries and a potential Ruby SEGV.
Rails merged a complete rewrite of the Layouts and Rendering guide [1]. The guide now focuses on the relationship between the controller and the view, with content already covered elsewhere, like partials rendering details, moved to other guides. The rewrite introduced a broken link to the Redirecting Requests section, which was quickly fixed to point to action_controller_overview.html#redirecting-requests [2]. This rewrite affects developers who rely on the guide as a reference for rendering conventions.
Bootsnap 1.26.0 is out, fixing a bug where `bootsnap precompile` could generate a corrupted cache entry if an already cached YAML file was modified without changing its size. It also handles cases where a top-level `Coverage` constant is defined without being the true stdlib module, and works around a potential Ruby SEGV when `Bootsnap.instrumentation` raises an error [3]. Upgrade to avoid corrupted caches and crashes in those edge cases.
Rails also refactored `@@variables` class variables into plain `attr_accessors` to make them safe to reference on Ractors today, in preparation for Ruby 4.0.6 where class variables won't be ractor-safe [4]. This is part of an ongoing effort to reduce class variable usage in Rails. Separately, the Le Mans agent tooling bumped to 1.3.1 and added an `agent.max_output_tokens` option to control the agent's output length [5][6].
Action items
- → Upgrade bootsnap to v1.26.0 to get the cache corruption and SEGV fixes rails/bootsnap [immediate]
- → Review the rewritten Layouts and Rendering guide for any changed guidance rails/rails [plan]
References
- [1] [RF-DOCS] Rewrite the Layouts and Rendering guide (#57152) ↗ rails/rails
- [2] Fix broken link to Redirecting Requests in layouts_and_rendering.md ↗ rails/rails
- [3] v1.26.0 ↗ rails/bootsnap
- [4] Refactor more class variables to accessors and delegators ↗ rails/rails
- [5] Bump 1.3.1 ↗ rails/lemans
- [6] + agent.max_output_tokens ↗ rails/lemans