rspec / rspec-support

Common code needed by the other RSpec gems. Not intended for direct use.
https://rspec.info
MIT License
95 stars 104 forks source link

Move dev dependencies to Gemfile #517

Closed pirj closed 2 years ago

pirj commented 2 years ago

Sibling PRs:

JonRowe commented 2 years ago

Do you have a citation saying this is now considered best practise? As I don't want to do this without some community backing of "this is a better idea ™"; Gems normally have an empty bundle file (other than gemspec).

The only reason we do is our ridiculous whackamole for older Rubies. I'd much rather remove all the gem overrides and go back to relying on gemspecs. (Same goes for linked PRs)

pirj commented 2 years ago

Do you have a citation saying this is now considered best practise?

Not really. The only remotely related confirmation for this is https://bundler.io/v2.2/man/gemfile.5.html#GEMSPEC

The .gemspec file is ... where you specify the dependencies your gem needs to run.

Even though it contradicts the very existence of add_development_dependency.

.gemspec is controller by rubygems, while Gemfile by bundler. I can't figure out a local development workflow without bundler these days.

If we ever happen to need to test against different versions of soft-dependencies (e.g. mocha), we could use appraisal-controller Gemfiles, and specify those versions there. And keep the gemspec clean.

much rather remove all the gem overrides

Absolutely agree. We'd have to abandon JRuby tests, make rubocop an optional step for certain Ruby versions, and skip minitest. Sounds like a significant change. I'm sympathetic to JRuby, but it's probably a good moment for them to start running stable builds of RSpec in scope of their CI, not the other way around.

JonRowe commented 2 years ago

As rubygems / bundler come closer to merging, maybe its worth asking the core team what they would do? We can then follow them and hey thats an opportunity for a blog post to talk about it :joy:

pirj commented 2 years ago

Smells free virtual karma! 😆

I'll close this, since due to curious circumstances, there's no clarity what approach is correct. For sibling PRs removed this change, too.

Only kept Cucumber update. There is an update to script files, too, if you approve, I'll send script update PRs using rspec-dev, and will rebase cucumber update PRs.

pirj commented 1 year ago

I'd love to revive this PR eventually, in the light of new circumstances, with the introduction of Gemspec/DevelopmentDependencies cop.

JonRowe commented 1 year ago

Citation still required, Rubocop has a ton of rules which aren't "standard"...

pirj commented 1 year ago

I would rely on this with my judgement.

JonRowe commented 1 year ago

I read that (took a while, very wordy) but it doesn't seem like a clear conclusion, I think until its marked as deprecated we'll stick with specifying them in the gemspec.