Closed gjtorikian closed 9 months ago
The bootsnap precompile
command tries to precompile all Ruby files under the gem lib/
folders, even those not matching your Ruby version (and, thus, not used in production). We cannot fix this at our end (and should not, since there is no issue or bug). The only workaround is to exclude these files from precompilation:
bundle exec bootsnap precompile --gemfile --exclude 'anyway/tracing|anyway/auto_cast|anyway/type_casting|anyway/config|' app/ lib/
# or simpler (not a big deal excluding a small library)
bundle exec bootsnap precompile --gemfile --exclude 'anyway/' app/ lib/
Doesn't this imply an upcoming breaking change in this gem for 3.4 though?
Edit: I guess if the expected behavior is that "calls without arguments [should] refer to the first block param" for these lines of code then there is no breaking change.
"calls without arguments [should] refer to the first block param" for these lines of code then there is no breaking change.
Yep, correct. We use it
intentionally as the first argument; so, in Ruby 3.4 the original source files would be used (right now the transpiled ones are loaded).
Gotchu, thanks!
What did you do?
Ran
bundle exec bootsnap precompile --gemfile app/ lib/
.What did you expect to happen?
No warnings to be printed.
What actually happened?
The following warnings were printed:
Additional context
Environment
Ruby Version: 3.3
Framework Version (Rails, whatever): 7.1.2
Anyway Config Version: 2.6.2