-
Notifications
You must be signed in to change notification settings - Fork 1
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
gemspec's usage of git ls-files introduces runtime dependency on git #4
Comments
I've never noticed this because git is the first thing I install on any computer, ever. If you can give me something that's as easy to use as git-ls, I'd consider a patch, but i'm not super concerned about this, to be honest. |
I don't think there's any really cross-platform replacement you could stick in there. Not even the current git ls-files calls are cross-platform. So I could give you some find(1) command line, but it would still suck ;) |
I'm not super concerned about cross-platform, exactly. Though obviously that's important. I'm surprised you haven't run into this with other gems, because this is a pretty common pattern. In fact, this line was created by the gem creation tools that (bundler itself makes)[https://github.com/carlhuda/bundler/blob/1-0-stable/lib/bundler/templates/newgem/newgem.gemspec.tt#L16]. So... yeah. Is there a reason you don't have git installed? |
There's no specific reason except that this happens in a production environment which is automatically rebuilt from scratch, and currently we're not installing git there. Another thing to consider is probably startup time (all these git calls aren't free ;) ), but if this is a common pattern, oh well. |
Ahh, see, the first thing I do in production is install git, because I use it to deploy. ;) Anyway, if you figure something out, let me know. I'd love for you to use my gem! |
When using this gem with bundler, git ls-files gets executed during application startup, therefore git becomes a runtime requirement for this gem.
I can see what value the
git ls-files
calls provide in the gemspec, but feel strongly that this shouldn't require git during runtime.We're using your gem like this in the Gemfile:
Error message:
The text was updated successfully, but these errors were encountered: