Skip to content

Commit

Permalink
Merge pull request #257 from Shopify/rm-disable-iseq-2.5
Browse files Browse the repository at this point in the history
Disable iseq cache in Ruby 2.5
  • Loading branch information
rafaelfranca committed Apr 24, 2019
2 parents 524ecbe + 7631334 commit 4ed465c
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 4ed465c

Please sign in to comment.