Skip to content

Bump `bootsnap` version to be Ruby 3 - compatible

Aleksei Lipniagov requested to merge alipniagov-bump-bootsnap-ver into master

What does this MR do and why?

Updates bootsnap gem patch version.
This is extracted from our Ruby 3 MR.

The current version 1.9.1 was broken with Ruby 3, more in the Changelog notes.

We went with the minimal update (patch version bump, 1.9.1->1.9.4 instead of going to 1.10) to reduce the scope of the update. The bootsnap is being invoked during the app load and is critical for the startup sequence.

Changelog (https://github.com/Shopify/bootsnap/blob/main/CHANGELOG.md):

1.9.4
Ignore absolute paths in the loaded feature index. (#385) This fixes a compatibility issue with Zeitwerk when Zeitwerk is loaded before bootsnap. It also should reduce the memory usage and improve load performance of Zeitwerk managed files.

Automatically invalidate the load path cache whenever the Ruby version change. (#387) This is to avoid issues in case the same installation path is re-used for subsequent ruby patch releases.

1.9.3
Only disable the compile cache for source files impacted by Ruby 3.0.3 [Bug 18250]. This should keep the performance loss to a minimum.   
    
1.9.2
Disable compile cache if Ruby 3.0.3's ISeq cache bug is detected. AKA iseq.rb:13 to_binary: wrong argument type false (expected Symbol)
Fix Kernel.load behavior: before load 'a' would load a.rb (and other tried extensions) and wouldn't load a unless development_mode: true, now only a would be loaded and files with extensions wouldn't be.

How to set up and validate locally

  • Check that the application starts/restarts
  • Rely on CI/QA

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Aleksei Lipniagov

Merge request reports