You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suspect that there could be an issue in case the library has nested folders which alphabetically precede the library itself, but it is just a guess
re_namespaced_gems=[GemBench::Jersey.new(gem_name: "inline_svg",trades: {"InlineSvg"=>'InlineSvgGithubMain'},verbose: true),].each(&:doff_and_don)# Copies, re-namespaces, and requires each gem.
$ bundle exec ruby benchmarks.rb
[inline_svg] Doffing ~/.rvm/gems/ruby-3.3.6/bundler/gems/inline_svg-01b5e607814d
[inline_svg] --------------------------------
[inline_svg] Doffing file ~/.rvm/gems/ruby-3.3.6/bundler/gems/inline_svg-01b5e607814d/lib/inline_svg/action_view/helpers.rb
[inline_svg] --------------------------------
[inline_svg][helpers.rb] dirname: ~/.rvm/gems/ruby-3.3.6/bundler/gems/inline_svg-01b5e607814d/lib/inline_svg/action_view
[inline_svg][helpers.rb] is_at_gem_root: false
[inline_svg][helpers.rb] lib_split: inline_svg/action_view
[inline_svg][helpers.rb] relative_path: inline_svg/action_view
~/.rvm/gems/ruby-3.3.6/gems/gem_bench-2.0.5/lib/gem_bench/jersey.rb:95:in `mkdir': No such file or directory @ dir_s_mkdir - /var/folders/tmp/path/to/inline_svg/action_view (Errno::ENOENT)
from ~/.rvm/gems/ruby-3.3.6/gems/gem_bench-2.0.5/lib/gem_bench/jersey.rb:95:in `block (2 levels) in doff_and_don'
from ~/.rvm/gems/ruby-3.3.6/gems/gem_bench-2.0.5/lib/gem_bench/jersey.rb:72:in `map'
from ~/.rvm/gems/ruby-3.3.6/gems/gem_bench-2.0.5/lib/gem_bench/jersey.rb:72:in `block in doff_and_don'
from ~/.rvm/rubies/ruby-3.3.6/lib/ruby/3.3.0/tmpdir.rb:99:in `mktmpdir'
from ~/.rvm/gems/ruby-3.3.6/gems/gem_bench-2.0.5/lib/gem_bench/jersey.rb:70:in `doff_and_don'
Thanks for trying it out!! I will have a look and see if I can figure out where it fails. It struggles in certain scenarios where load order is important.
Hi,
I suspect that there could be an issue in case the library has nested folders which alphabetically precede the library itself, but it is just a guess
I've changed this line
gem_bench/lib/gem_bench/jersey.rb
Line 95 in 7624082
with
FileUtils.mkdir_p(dir_path) unless Dir.exist?(dir_path)
(plus requiring fileutils) and it workedPS: The gem does not work yet because of a couple of require relatives that I've missed: (jamesmartin/inline_svg#173)
PS2: Even with the changes at jamesmartin/inline_svg#173,
gem_bench
does not work withinline_svg
The text was updated successfully, but these errors were encountered: