-
Notifications
You must be signed in to change notification settings - Fork 24
Move development dependencies to gemspec #5
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
Conversation
I saw commit 38fe194, but I don't think that it's a good practice: 1. Dependencies of gems should have locks, but not too strict. Without locks at all it's too dangerous, with `Gemfile.lock` there are unrelevant git changes. 2. We should use `development_dependency` of gemspecs instead of `Gemfile` for gems. An example article: https://yehudakatz.com/2010/12/16/clarifying-the-roles-of-the-gemspec-and-gemfile/ An example of failed CI: https://github.com/ruby/optparse/pull/4/checks?check_run_id=2134749228#step:3:10
Ignoring to Gemfile.lock is acceptable with Git. It's my misstake.
No, gemspec couldn't specify flexible versions. There is no chance to revert it. |
I can change (or create a new one) my PR, no problem, just want to discuss.
Why? What do you mean? Is it bad to lock dependencies versions? Is it bad to specify development dependencies in gemspec file? I want to know reasons. |
While minimal gem versions for runtime dependencies should be specified, there is typically only downsides in specifying anything about dev dependencies (unless there's a recent and incompatible version). I consider it a mistake of bundler that
Once upon a time, rubygems wanted to know the dependencies for testing a gem. I am not aware of a single gem that actually does this today, nor am I aware of anyone running specs from a gem. Note that even |
And rubygems and bundler removed |
Which downsides? I'd like to hear examples. I see problems when somebody wants to contribute and faces with unexpected behavior when some dev dependency (for tests, coverage, tasks, something else) fails.
I consider it's about safety.
Sorry, but I don't understand you. You can test a gem with
I'm not too care about Bundler generating because of course it cares only about itself, not too much about gem. For example, it even doesn't contain enough options, like indentation for files (I know, I can contribute to it). And the thing is that when you install a gem, via
Yes, but you can define them in
It's very strange and weird for me that some parts of Ruby we want to separate, like take out standard gems to different repos and projects, but somewhy there is movement to combine gemspec (RubyGems?) with Bundler, but… again, as I wrote, as I know, Again, if you want to specify some |
I saw commit 38fe194, but I don't think that it's a good practice:
Without locks at all it's too dangerous,
with
Gemfile.lock
there are unrelevant git changes.development_dependency
of gemspecs instead ofGemfile
for gems.An example article: https://yehudakatz.com/2010/12/16/clarifying-the-roles-of-the-gemspec-and-gemfile/
An example of failed CI: https://github.com/ruby/optparse/pull/4/checks?check_run_id=2134749228#step:3:10