Skip to content

Commit

Permalink
Disable iseq cache in Ruby 2.5
Browse files Browse the repository at this point in the history
There are many bugs in Ruby 2.5 related with iseq cache making it hard
to use tracepoints with it. This means that debuggers and any gem that
uses tracepoint don't play well with bootsnap when used with Ruby 2.5.

Until those issues are fixed in Ruby 2.5 we are going to disabled iseq
cache in the `bootsnap/setup` file.
  • Loading branch information
rafaelfranca committed Apr 22, 2019
1 parent 524ecbe commit 6f6c20e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/bootsnap/setup.rb
Expand Up @@ -24,12 +24,15 @@
cache_dir = File.join(app_root, 'tmp', 'cache')
end

ruby_version = Gem::Version.new(RUBY_VERSION)
iseq_cache_enabled = ruby_version >= Gem::Version.new('2.5.0') && ruby_version < Gem::Version.new('2.6.0')

Bootsnap.setup(
cache_dir: cache_dir,
development_mode: development_mode,
load_path_cache: true,
autoload_paths_cache: true, # assume rails. open to PRs to impl. detection
disable_trace: false,
compile_cache_iseq: true,
compile_cache_iseq: iseq_cache_enabled,
compile_cache_yaml: true,
)

0 comments on commit 6f6c20e

Please sign in to comment.