Releases: rails/spring
Release list
4.7.0
What's Changed
Full Changelog: v4.6.0...v4.7.0
4.6.0
- Add
Spring.dangerously_allow_disabling_reloadingopt-in to skip the:ensure_reloading_is_enabledinitializer check, so projects that want to run withconfig.cache_classes = true/config.enable_reloading = falsecan.
The default behavior (refuse to boot) is unchanged, as using this option requires a Rails application that uses
lazy-loader for everything (most importantly, routes & i18n translations).
What's Changed
Full Changelog: v4.5.0...v4.6.0
4.5.0
-
Skip spring without error if spring is not in installed bundler groups.
-
Adds a Spring.after_environment_load hook that runs immediately after the Rails application environment is
loaded in the Spring server process, but before GC.compact/Process.warmup and before the server enters its
wait loop. This hook enables applications to preload expensive test infrastructure (e.g. test helpers, fixture
caches, datastore connections) into the Spring server so that forked test workers inherit that work via
copy-on-write instead of paying it on every invocation. -
Fixed crashes when a client disconnects mid-handshake (e.g. on connect timeout). Previously,
Errno::EPIPE
raised inSpring::Server#serveorSpring::Application#servewould propagate up through the accept loop and
kill the process, leaving a stale socket that broke every subsequent client. Both crash sites are now rescued,
including writes that happen inside therescue Exceptionhandler inApplication#servewhile reporting an earlier failure to the gone client. -
Eagerly autoload framework base classes (
ActionMailer::Base,ActionController::Base,
ActionController::API) at the end of preload so theirActiveSupport.on_loadhooks fire in the parent
process. Without this, the reloader probe in#servematerializes Rails internals (notably Action View's
CacheExpiry::ViewReloader) in a half-initialized state and triggers an expensiveFileUpdateCheckerrebuild
on everyprepend_view_pathinside each fork. See rails/rails#51308 for the lazy-init contract this aligns
with.
What's Changed
- Add Spring.after_environment_load hook for post-Rails preloading by @jahfer in #754
- Don't crash on client disconnect (Server and Application) by @Korri in #751
- Eagerly preload framework base classes by @Korri in #752
- Do not load configuration options from
.railsrcwhen generating dummy app by @sebroeder in #543 - Run without error if spring is in uninstalled group by @mkllnk in #684
New Contributors
- @jahfer made their first contribution in #754
- @Korri made their first contribution in #751
- @sebroeder made their first contribution in #543
- @mkllnk made their first contribution in #684
- @boddhisattva made their first contribution in #537
Full Changelog: v4.4.2...v4.5.0
4.4.2
What's Changed
- Fix spawn_on_env vars leaking from server to app by @hmcguire-shopify in #749
New Contributors
- @hmcguire-shopify made their first contribution in #749
Full Changelog: v4.4.1...v4.4.2
4.4.1
What's Changed
- Uses subclasses instead of descendants to support Rails < 7.1
- Pass signaled exit code properly to the client by @rafaelfranca in #744
Full Changelog: v4.4.0...v4.4.1
4.4.0
- Revert the removal of UTF-8 force encoding in JSON loading.
- Shush the
backtrace_locationstoo. - Recommend setting
enable_reloadingon newer Rails version. - Drop support to end-of-life Ruby versions.
- Fixed a bug that would crash the server if sending IO to the child failed.
What's Changed
- Revert the removal of UTF-8 force encoding in JSON loading by @paracycle in #738
- Shush the
backtrace_locations, too by @amomchilov in #740 - Recommend setting
enable_reloadingon newer Rails versions by @nvasilevski in #715 - Drop support to end-of-life Ruby versions by @rafaelfranca in #743
- Prevent server crash by restarting child by @prognostikos in #727
New Contributors
- @paracycle made their first contribution in #738
- @vfonic made their first contribution in #742
- @fynsta made their first contribution in #722
- @amomchilov made their first contribution in #740
- @prognostikos made their first contribution in #728
Full Changelog: v4.3.0...v4.4.0
4.3.0
- Fix reloading issue in Ruby 3.3.
- Fixed compatibility with
--enable-frozen-string-literal. - Add embeded engines to default reload matcher.
What's Changed
- Fix reloading issue in Ruby 3.3.
- Fixed compatibility with
--enable-frozen-string-literal. - Add embeded engines to default reload matcher.
New Contributors
- @chaadow made their first contribution in #719
- @thomasmarshall made their first contribution in #730
Full Changelog: v4.2.1...v4.3.0
4.2.1
- Added
Spring.connect_timeoutandSpring.boot_timeoutto allow to increase timeout for larger apps. Spring.connect_timeoutnow default to5seconds instead of1.
What's Changed
- Added
Spring.connect_timeoutandSpring.boot_timeoutto allow to increase timeout for larger apps. Spring.connect_timeoutnow default to5seconds instead of1.
Full Changelog: v4.2.0...v4.2.1
4.2.0
- Added
Spring.reset_on_envto define environment variables which should cause spring to reload when they change. - Added
Spring.spawn_on_envto define environment variables that should cause spring to start a distinct server. - Better handle a case where the server could hang.
What's Changed
- Added
Spring.reset_on_envto define environment variables which should cause spring to reload when they change. - Added
Spring.spawn_on_envto define environment variables that should cause spring to start a distinct server. - Better handle a case where the server could hang.
New Contributors
- @technicalpickles made their first contribution in #708
Full Changelog: v4.1.3...v4.2.0
4.1.3
- Bring back
Spring::Watcher::Abstract#synchronizemethod to fix compatibility withspring-watcher-listen.
What's Changed
- Bring back
Spring::Watcher::Abstract#synchronizemethod to fix compatibility withspring-watcher-listen.
Full Changelog: v4.1.2...v4.1.3