Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate files with Gem dependency using :path #465

Open
fzakaria opened this issue Jan 17, 2020 · 7 comments
Open

Duplicate files with Gem dependency using :path #465

fzakaria opened this issue Jan 17, 2020 · 7 comments

Comments

@fzakaria
Copy link

fzakaria commented Jan 17, 2020

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

@headius
Copy link
Member

headius commented Jan 20, 2020

Nevermind previous comment if it came through, I did not notice you did file it with Warbler.

Yes, this would be a good fix!

@fzakaria
Copy link
Author

@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.

@headius
Copy link
Member

headius commented Jan 21, 2020

A repro would be helpful, sure! Not sure when I will circle back to this but any assistance you provide will help others contribute.

@fzakaria
Copy link
Author

@headius you can use the same repro https://github.com/fzakaria/warbler-bundler-jruby-failure that I've linked in jruby/jruby#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

@headius
Copy link
Member

headius commented Feb 10, 2020

@fzakaria Thank you!

@headius
Copy link
Member

headius commented May 22, 2020

I assume this isn't resolved by my fix for jruby/jruby#6045 but I have not yet looked into it.

@fzakaria
Copy link
Author

My intuition says no; since I still see this issue even with the Bundler workaround introduced to circumvent the expand_path bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants