warbler
warbler copied to clipboard
Duplicate files with Gem dependency using `:path`
I've been using warbler to build a gem where one of the dependencies are :path => to a local gem
gem "some-gem", :path => "./gems/some-gem"
I've noticed that warbler is including the built gem in a gem directory within the JAR & the source directory itself (./gems/some-gem
) from the :path variable
Not a big deal but it causes 2x files to be included for size/bloat
Nevermind previous comment if it came through, I did not notice you did file it with Warbler.
Yes, this would be a good fix!
@headius do you need a repro project ? I think it's pretty straightforward in explanation --
If you also point me to some good hunches for files & I can take a look.
A repro would be helpful, sure! Not sure when I will circle back to this but any assistance you provide will help others contribute.
@headius you can use the same repro https://github.com/fzakaria/warbler-bundler-jruby-failure that I've linked in https://github.com/jruby/jruby/issues/6045
After building the JAR you can just execute jar -tf
to see the duplicate files.
jar -tf warbler-example.jar | grep demo
gems/demo-1.0/
gems/demo-1.0/Gemfile
gems/demo-1.0/Gemfile.lock
gems/demo-1.0/README.md
gems/demo-1.0/demo.gemspec
gems/demo-1.0/lib/
gems/demo-1.0/lib/demo.rb
specifications/demo-1.0.gemspec
warbler-example/ruby-gems/demo/
warbler-example/ruby-gems/demo/Gemfile
warbler-example/ruby-gems/demo/Gemfile.lock
warbler-example/ruby-gems/demo/README.md
warbler-example/ruby-gems/demo/demo.gemspec
warbler-example/ruby-gems/demo/lib/
warbler-example/ruby-gems/demo/lib/demo.rb
@fzakaria Thank you!
I assume this isn't resolved by my fix for jruby/jruby#6045 but I have not yet looked into it.
My intuition says no; since I still see this issue even with the Bundler workaround introduced to circumvent the expand_path
bug.