Skip to content

Conversation

@simi
Copy link
Contributor

@simi simi commented Oct 25, 2021

This is just concept what we can do to improve situation of filled in required_ruby_version value to prevent problems described in rubygems/rfcs#34.

I have used placeholder text for now. Feel free to suggest better. We can also use different text for different situations.

ℹ️ required_ruby_version is already part of bundle gem template based on this logic.

https://github.com/rubygems/rubygems/blob/2f48d60afe050862258212d0c68530f39fb5fdfa/bundler/lib/bundler/cli/gem.rb#L407-L414

Later on we can move this attribute to required. It could be also possible to warn on "potentially misused values". For example when newer Ruby is used to build gem (then the minimal), we can inform user to ensure it is good idea to check if gem is still compatible with minimal Ruby version.

related to rubygems/guides#295, rubygems/rfcs#34 and rubygems/rfcs#26

/cc @marcandre

@deivid-rodriguez
Copy link
Contributor

I really like this! 👍

@doodzik
Copy link
Contributor

doodzik commented Oct 26, 2021

I really like it 🔥

This is a bit tangential, but I wonder If it would make sense to enforce a minimal ruby version based on what ruby version is supported by rubygems/bundler. I could see this being problematic if we prevent security patches to gems, but I'm not sure how much that is a concern.

@deivid-rodriguez
Copy link
Contributor

@doodzik That seems a bit too much to me. I think there's a variety of reasons why people still support old rubies in their gems, and I think completely forbidding it might have the effect of discouraging people from upgrading rubygems/bundler.

@deivid-rodriguez
Copy link
Contributor

What's left to do here?

@simi
Copy link
Contributor Author

simi commented Nov 1, 2021

Warning text is currently just a placeholder. Feel free to suggest better.

@simi simi force-pushed the recommend-ruby-version branch 2 times, most recently from 2d88804 to ded2a57 Compare April 19, 2023 21:23
@simi simi marked this pull request as ready for review April 19, 2023 21:27
Copy link
Contributor

@doodzik doodzik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@deivid-rodriguez deivid-rodriguez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@hsbt
Copy link
Member

hsbt commented Aug 8, 2023

@simi Can you merge this? I'd like to merge for Ruby 3.3.0-preview2.

@simi
Copy link
Contributor Author

simi commented Aug 8, 2023 via email

@hsbt
Copy link
Member

hsbt commented Dec 6, 2023

I'll handle this for RubyGems 3.6 and Ruby 3.4.

@hsbt hsbt self-assigned this Dec 6, 2023
@hsbt hsbt force-pushed the recommend-ruby-version branch from 7f07c4f to 9c2d1e6 Compare December 8, 2023 05:19
@simi simi force-pushed the recommend-ruby-version branch 2 times, most recently from cd2ab99 to c418947 Compare February 25, 2024 22:05
@simi
Copy link
Contributor Author

simi commented Feb 25, 2024

rebased @hsbt

@simi simi force-pushed the recommend-ruby-version branch from c418947 to e4bb337 Compare February 25, 2024 22:10
Copy link
Member

@hsbt hsbt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@simi Thank you!

@hsbt hsbt merged commit 1aa7252 into master Feb 27, 2024
@hsbt hsbt deleted the recommend-ruby-version branch February 27, 2024 03:32
deivid-rodriguez pushed a commit that referenced this pull request Mar 20, 2024
Warn on empty or open required_ruby_version specification attribute.

(cherry picked from commit 1aa7252)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants