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

Loosen dependency version requirements #489

Open
faisal opened this issue Apr 15, 2024 · 5 comments
Open

Loosen dependency version requirements #489

faisal opened this issue Apr 15, 2024 · 5 comments

Comments

@faisal
Copy link
Contributor

faisal commented Apr 15, 2024

From #482:

The looser this gem is in terms of versioning the dependencies, the easier it is for projects to bundle it in.

At present, 23 of the 28 dependencies in rubycritic.gemspec have version restrictions. Are they all needed?

@brkn
Copy link

brkn commented Apr 15, 2024

Just to give an anecdata.

I never add this gem into the gemfile, and those restrictions helps when I do gem install rubycritic

@faisal
Copy link
Contributor Author

faisal commented Apr 27, 2024

Ruby 3 is deprecated, so here's a fork that jumps rubycritic's minimum version to 3.1: https://github.com/faisal/rubycritic/tree/ruby_31

And here's one that also gets rid of almost all version requirements in the gemspec: https://github.com/faisal/rubycritic/tree/ruby_31_loose

Right now they produce the same bundles. I'm curious how much that will continue to be true as dependency gems update.

@faisal
Copy link
Contributor Author

faisal commented Apr 27, 2024

Just to give an anecdata.

I never add this gem into the gemfile, and those restrictions helps when I do gem install rubycritic

In what way do they help?

@brkn
Copy link

brkn commented May 3, 2024

I meant that they are needed in ruby2.7 context. But I guess since v4.9.1 is already the latest version supporting the ruby2.7, maybe this doesn't matter for further releases? Apologies for confusion.

To demonstrate how it was before v4.9.1, this was the behaviour

❯ ruby -v
ruby 2.7.8p225 (2023-03-30 revision 1f4d455848) [arm64-darwin22]

❯ gem install rubycritic -v 4.9.0   
Fetching flay-2.13.2.gem
Fetching rubycritic-4.9.0.gem
ERROR:  Error installing rubycritic:
        The last version of reek (~> 6.0, < 7.0) to support your Ruby & RubyGems was 6.1.4. Try installing it with `gem install reek -v 6.1.4` and then running the current command again
        reek requires Ruby version >= 3.0.0. The current ruby version is 2.7.8.225.

After v4.9.1, the restrictions made gem install smooth.

@aseroff
Copy link

aseroff commented May 28, 2024

FWIW, I had to pin to 4.9.0 because 4.9.1 sent my rubocop several versions behind edge.

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

3 participants