Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Move dev dependencies to Gemfile #517

Closed
wants to merge 1 commit into from
Closed

Move dev dependencies to Gemfile #517

wants to merge 1 commit into from

Conversation

pirj
Copy link
Member

@pirj pirj commented Sep 5, 2021

@JonRowe
Copy link
Member

JonRowe commented Sep 7, 2021

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
Copy link
Member Author

pirj commented Sep 7, 2021

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
Copy link
Member

JonRowe commented Sep 7, 2021

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 😂

@pirj
Copy link
Member Author

pirj commented Sep 7, 2021

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 pirj closed this Sep 7, 2021
@pirj pirj deleted the update-cucumber branch September 7, 2021 17:28
pirj added a commit to rubocop/rubocop-rspec that referenced this pull request Jul 7, 2022
A similar (unmerged) `rspec-support` PR rspec/rspec-support#517

Reasoning (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.

Discussions:
 - rubygems/rubygems#5065
 - rubygems/rubygems#1104
pirj added a commit to rubocop/rubocop-capybara that referenced this pull request Dec 29, 2022
A similar (unmerged) `rspec-support` PR rspec/rspec-support#517

Reasoning (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.

Discussions:
 - rubygems/rubygems#5065
 - rubygems/rubygems#1104
ydah pushed a commit to rubocop/rubocop-factory_bot that referenced this pull request Apr 13, 2023
A similar (unmerged) `rspec-support` PR rspec/rspec-support#517

Reasoning (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.

Discussions:
 - rubygems/rubygems#5065
 - rubygems/rubygems#1104
@pirj
Copy link
Member Author

pirj commented May 21, 2023

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

@JonRowe
Copy link
Member

JonRowe commented May 22, 2023

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

@pirj
Copy link
Member Author

pirj commented May 24, 2023

I would rely on this with my judgement.

@JonRowe
Copy link
Member

JonRowe commented Jun 5, 2023

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.

ydah pushed a commit to rubocop/rubocop-rspec_rails that referenced this pull request Mar 27, 2024
A similar (unmerged) `rspec-support` PR rspec/rspec-support#517

Reasoning (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.

Discussions:
 - rubygems/rubygems#5065
 - rubygems/rubygems#1104
ydah pushed a commit to rubocop/rubocop-rspec_rails that referenced this pull request Mar 27, 2024
A similar (unmerged) `rspec-support` PR rspec/rspec-support#517

Reasoning (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.

Discussions:
 - rubygems/rubygems#5065
 - rubygems/rubygems#1104
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants