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

Add Ruby 3.2 and 3.3 platforms to Gemfile DSL #6346

Merged
merged 1 commit into from
Feb 7, 2023

Conversation

composerinteralia
Copy link
Contributor

What was the end-user or developer problem that led to this PR?

Ruby 3.2 platforms are not yet supported in the Gemfile DSL:

gem "abc", platform: :ruby_32

What is your fix for the problem, implemented in this PR?

Along the same lines as #5469, this adds support for Ruby 3.2 platforms.

Make sure the following tasks are checked

@composerinteralia
Copy link
Contributor Author

Seeing #5469 (comment), I played around with a test to catch this earlier in the future, and ended up with something like this:

    it "allows platforms matching the running Ruby version" do
      platform = "ruby_#{RbConfig::CONFIG["MAJOR"]}#{RbConfig::CONFIG["MINOR"]}"
      subject.gem("foo", :platform => platform)
    end

Do you think that is worth adding? Or is there a better way of getting at that?

@deivid-rodriguez
Copy link
Member

Nice, I like it! It should make our daily CI against ruby-head fail, and then fixed after adding :ruby_33.

Copy link
Member

@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.

Approving the current changeset since it seems good to introduce right away, but feel free to also add the extra spec on this PR if you prefer!

@composerinteralia
Copy link
Contributor Author

composerinteralia commented Feb 6, 2023

Confirmed the test fails on 3.3: https://github.com/rubygems/rubygems/actions/runs/4106956899/jobs/7085847793

I'll add those platforms and then this should be ready to go. Ready when green!

@composerinteralia composerinteralia changed the title Add Ruby 3.2 as valid platform in Gemfile DSL Add Ruby 3.2 and 3.3 platforms to Gemfile DSL Feb 6, 2023
Copy link
Member

@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.

Thanks a bunch!

@composerinteralia
Copy link
Contributor Author

https://github.com/rubygems/rubygems/actions/runs/4107455290/jobs/7086969404 looks like it succeeded, but is stuck 😕

@deivid-rodriguez
Copy link
Member

Indeed, it seems like an actions glitch?

Along the same lines as rubygems#5469,
this adds support for Ruby 3.2 and 3.3 platforms: `:ruby_32`, `mri_32`,
etc.

It also includes a spec that should help catch this earlier in the
future, failing if we don't support platforms for the version of Ruby
that is running the tests.
auto-merge was automatically disabled February 7, 2023 18:18

Head branch was pushed to by a user without write access

@composerinteralia
Copy link
Contributor Author

This time https://github.com/rubygems/rubygems/actions/runs/4112632902/jobs/7097788892 got cancelled for some reason 😢

I'll rebase to trigger this one more time 🤞🏻

@deivid-rodriguez
Copy link
Member

Oh boy, sorry about that. Our CI has become a little bit unstable since adding Ruby 3.2 :(

@simi simi merged commit c31c575 into rubygems:master Feb 7, 2023
@simi
Copy link
Member

simi commented Feb 7, 2023

Finally 🟢 💪.

deivid-rodriguez pushed a commit that referenced this pull request Feb 15, 2023
Add Ruby 3.2 and 3.3 platforms to Gemfile DSL

(cherry picked from commit c31c575)
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.

None yet

3 participants