Skip to content

Pin dev builds to 9.4 for now #9

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

Merged
merged 1 commit into from
Mar 3, 2025
Merged

Pin dev builds to 9.4 for now #9

merged 1 commit into from
Mar 3, 2025

Conversation

headius
Copy link
Collaborator

@headius headius commented Mar 3, 2025

JRuby 10 is about to become the new "jruby-head" but we want to ease into that transition. This PR filters available snapshot versions to just "9.4" releases until we are ready to support 10.

@headius
Copy link
Collaborator Author

headius commented Mar 3, 2025

I'm not sure the best path forward so this is to start a conversation.

JRuby 10 will be released soon, and in preparation for that we are moving it to master. At some point, jruby-head will refer to 10.x snapshot builds. However, we want to ease into that given the large number of users running CI against jruby-head.

This may be a setup-ruby question, but is there a way to have multiple "head" references? I believe we will have two possible situations for existing jruby-head users:

  • JRuby 10 works fine, and they can just continue without issues.
  • JRuby 10 is somehow incompatible, and they want to continue building against the 9.4 head.

And there may be users who want to explicitly opt into 10-head.

What's the best way to start making this move?

JRuby 10 is about to become the new "jruby-head" but we want to
ease into that transition. This PR filters available snapshot
versions to just "9.4" releases until we are ready to support 10.
@headius
Copy link
Collaborator Author

headius commented Mar 3, 2025

Tested locally to confirm that it only accepts 9.4 builds. Need to merge before tomorrow's release because there are now 10 snapshot builds in Maven and they will be picked up without this change.

@headius headius merged commit fe37f65 into master Mar 3, 2025
@headius headius deleted the headius-patch-1 branch March 3, 2025 22:29
@eregon
Copy link
Member

eregon commented Mar 4, 2025

This may be a setup-ruby question, but is there a way to have multiple "head" references?

No, there is nothing like that, it hasn't been needed so far and I would rather avoid the complexity from it.
My POV on this is jruby-head should point to JRuby master (10), that's what the other Rubies do.

Delaying it like this PR does has never been done for CRuby/TruffleRuby, but that's your choice and it may make sense temporarily in this situation.
It does break the assumption that jruby-head come from jruby/jruby master branch.

  • JRuby 10 works fine, and they can just continue without issues

So those use jruby-head

  • JRuby 10 is somehow incompatible, and they want to continue building against the 9.4 head.

Those can then simply use jruby-9.4. Testing against 9.4 "head" seems of limited value at that point.

@@ -12,7 +12,7 @@
versions = Nokogiri::XML(xml).css('version').map(&:text)

versions.delete('9000.dev-SNAPSHOT')
most_recent = versions.max_by { |v| Gem::Version.new(v) }
most_recent = versions.grep(/9\.4/).max_by { |v| Gem::Version.new(v) }
Copy link
Member

Choose a reason for hiding this comment

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

Could you use an anchor here like /^9\.4/ to avoid potentially wrong matches?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It won't be here long enough to matter.

Copy link
Member

Choose a reason for hiding this comment

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

Since I couldn't review before your merged, and this is my review, and I'm the main maintainer of setup-ruby & related repos I would like you to address this. I want to be sure we don't get some strange behavior because it matches e.g. 9.3.9.4. And it's just more correct.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There will never be a 9.3.9.4, nor a .9.4 for any previous release. In theory there could someday be a 10.0.9.4 or 10.9.4.0 but this patch will be gone before 10.0 is even released (within the next month).

Since I couldn't review before your merged

It was necessary to expedite because we started pushing 10 snapshot builds and I knew users would start seeing those in setup-ruby before we're ready. Given the time-sensitive nature I opted to merge in a working patch. I'll add your refinement now.

@headius
Copy link
Collaborator Author

headius commented Mar 4, 2025

My POV on this is jruby-head should point to JRuby master (10)

I already pointed out, and you mentioned, that this is a temporary move. Two things need to happen for 10 to become jruby-head in setup-ruby:

  1. A few remaining issues with 10 that will break most users must be resolved.
  2. JRuby's nightly builds need to be modified to use Java 21 for 10 snapshot builds.
  3. setup-ruby needs to adjust the default Java version for JRuby 10, which requires Java 21. We need a better answer than forcing all JRuby 10 setup-ruby users to also configure setup-java.

I'm currently working on tasks 1 and 2. Task 3 is under discussion at ruby/setup-ruby#684.

@headius
Copy link
Collaborator Author

headius commented Mar 4, 2025

So those use jruby-head
Those can then simply use jruby-9.4

I suppose this is valid. Once 10 is released, nearly all day-today development will focus on that line. The 9.4 line should not see heavy day-to-day development so testing against 9.4-head is probably not an important use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants