Skip to content

Conversation

@depfu
Copy link
Contributor

@depfu depfu bot commented Nov 19, 2022

Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ bootsnap (1.9.1 → 1.14.0) · Repo · Changelog

Release Notes

1.14.0 (from changelog)

  • Require Ruby 2.6.
  • Add a way to skip directories during load path scanning. If you have large non-ruby directories in the middle of your load path, it can severly slow down scanning. Typically this is a problem with node_modules. See #277.
  • Fix Bootsnap.unload_cache!, it simply wouldn't work at all becaue of a merge mistake. See #421.

1.13.0 (from changelog)

  • Stop decorating Kernel.load. This used to be very useful in development because the Rails "classic" autoloader was using Kernel.load in dev and Kernel.require in production. But Zeitwerk is now the default, and it doesn't use Kernel.load at all.

    People still using the classic autoloader might want to stick to bootsnap 1.12.

  • Add Bootsnap.unload_cache!. Applications can call it at the end of their boot sequence when they know no more code will be loaded to reclaim a bit of memory.

1.12.0 (from changelog)

  • bootsnap precompile CLI will now also precompile Rakefile and .rake files.

  • Stop decorating Module#autoload as it was only useful for supporting Ruby 2.2 and older.

  • Remove uname and other patform specific version from the cache keys. RUBY_PLATFORM + RUBY_REVISION should be enough to ensure bytecode compatibility. This should improve caching for alpine based setups. See #409.

1.11.1 (from changelog)

  • Fix the can't modify frozen Hash error on load path cache mutation. See #411.

1.11.0 (from changelog)

  • Drop dependency on fileutils.

  • Better respect Kernel#require duck typing. While it almost never comes up in practice, Kernel#require follow a fairly intricate duck-typing protocol on its argument implemented as rb_get_path(VALUE) in MRI. So when applicable we bind rb_get_path and use it for improved compatibility. See #396 and #406.

  • Get rid of the Kernel.require_relative decorator by resolving $LOAD_PATH members to their real path. This way we handle symlinks in $LOAD_PATH much more efficiently. See #402 for the detailed explanation.

  • Drop support for Ruby 2.3 (to allow getting rid of the Kernel.require_relative decorator).

1.10.3 (from changelog)

  • Fix Regexp and Date type support in YAML compile cache. (#400)

  • Improve the YAML compile cache to support UTF-8 symbols. (#398, #399) The default MessagePack symbol serializer assumes all symbols are ASCII, because of this, non-ASCII compatible symbol would be restored with ASCII_8BIT encoding (AKA BINARY). Bootsnap now properly cache them in UTF-8.

    Note that the above only apply for actual YAML symbols (e..g --- :foo). The issue is still present for string keys parsed with YAML.load_file(..., symbolize_names: true), that is a bug in msgpack that will hopefully be solved soon, see: msgpack/msgpack-ruby#246

  • Entirely disable the YAML compile cache if Encoding.default_internal is set to an encoding not supported by msgpack. (#398) Psych coerce strings to Encoding.default_internal, but MessagePack doesn't. So in this scenario we can't provide YAML caching at all without returning the strings in the wrong encoding. This never came up in practice but might as well be safe.

1.10.2 (from changelog)

  • Reduce the Kernel.require extra stack frames some more. Now bootsnap should only add one extra frame per require call.

  • Better check freeze option support in JSON compile cache. Previously JSON.load_file(..., freeze: true) would be cached even when the msgpack version is missing support for it.

1.10.1 (from changelog)

  • Fix Kernel#autoload's fallback path always being executed.

  • Consider unlink failing with ENOENT as a success.

1.10.0 (from changelog)

  • Delay requiring FileUtils. (#285) FileUtils can be installed as a gem, so it's best to wait for bundler to have setup the load path before requiring it.

  • Improve support of Psych 4. (#392) Since 1.8.0, YAML.load_file was no longer cached when Psych 4 was used. This is because load_file loads in safe mode by default, so the Bootsnap cache could defeat that safety. Now when precompiling YAML files, Bootsnap first try to parse them in safe mode, and if it can't fallback to unsafe mode, and the cache contains a flag that records wether it was generated in safe mode or not. YAML.unsafe_load_file will use safe caches just fine, but YAML.load_file will fallback to uncached YAML parsing if the cache was generated using unsafe parsing.

  • Minimize the Kernel.require extra stack frames. (#393) This should reduce the noise generated by bootsnap on LoadError.

1.9.4 (from changelog)

  • 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 (from changelog)

  • 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 (from changelog)

  • 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.

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.

↗️ msgpack (indirect, 1.4.2 → 1.6.0) · Repo · Changelog

Release Notes

1.6.0 (from changelog)

* Fix a potential use-after-free bug in Buffer_free when accessing a packer or unpacker buffer. 
* `old-style-definition` compilation warnings.
* Restore zero-copy buffer feed when provided a Ruby string. This was accidentally broken in 1.5.4.
* Provide implementations for `ObjectSpace.memsize`. Message pack objects now properly report their size to Ruby.
* Fix an endianess bug on Windows platform.

1.5.6 (from changelog)

* No actual code change, just re-release the `java` version properly.

1.5.5 (from changelog)

* Fix a segfault when GC triggers inside a recursive extension.

1.5.3 (from changelog)

* Fix deduplication of empty strings when using the `freeze: true` option.
* Use `rb_hash_new_capa` when available (Ruby 3.2) for improved performance when parsing large hashes.

1.5.2 (from changelog)

* Fix bug about unpacking ext type objects with the recursive option

1.5.1 (from changelog)

* Fix bug about packing/unpacking ext type objects with the recursive option

1.5.0 (from changelog)

* Add recursive option on Factory#register_type to operate Packer/Unpacker manually
* Add oversized_integer_extension option on Factory#register_type to pack/unpack bigint using ext types
* Add Factory#pool method and Factory::Pool class to provide pooled Packer and Unpacker instances

1.4.5 (from changelog)

* Fix to create UTF-8 Symbol keys when symbolize_keys: true
* Fix to assume Symbols as US-ASCII or UTF-8
* Optimize Packer/Unpacker initialization
* Optimize extension class lookup
* Rename Packer#clear as Packer#reset (#clear is still available as an alias)

1.4.4 (from changelog)

* Specify the build option --platform=8 for older Java platforms

1.4.3 (from changelog)

* Optimize serialization/deserialization of Symbols
* Support registering ext types for objects of subclasses of primitive types (like Hash)
* Add optimized_symbols_parsing option to Factory#register_type on MRI implementation
* Optimize to deduplicate Hash keys on JRuby
* Support JRuby 9.3 (and drop 9.1)

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by more commits than we can show here.


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)
Go to the Depfu Dashboard to see the state of your dependencies and to customize how Depfu works.

@depfu
Copy link
Contributor Author

depfu bot commented Nov 26, 2022

Closed in favor of #228.

@depfu depfu bot closed this Nov 26, 2022
@depfu depfu bot deleted the depfu/update/bootsnap-1.14.0 branch November 26, 2022 15:49
@depfu
Copy link
Contributor Author

depfu bot commented Nov 26, 2022

Closed in favor of #228.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants