Repository navigation
Add mswin release builds as mswin-X.Y and mswin-head - #979
Conversation
14493a1 to
c82cc17
Compare
| | `ruby` | 1.9.3, 2.0.0, 2.1.9, 2.2, all versions from 2.3.0 until 4.1.0-preview1, head, debug, mingw, ucrt | | ||
| | `jruby` | 9.1.17.0 - 10.1.3.0, head | | ||
| | `truffleruby` | 19.3.0 - 40.0.0, head | | ||
| | `truffleruby+graalvm` | 21.2.0 - 40.0.0, head | |
There was a problem hiding this comment.
It might be easier to understand, if we add another row to the table naming mswin and a rough overview of the available versions, instead of most of the text below. Technically mswin is the same cruby interpreter, but it has a very different ecosystem.
There was a problem hiding this comment.
I'd like to explore the idea I posted in the earlier and see what's everyone's thought: #971 (comment)
There was a problem hiding this comment.
I'd keep mswin here, as it selects a platform build of CRuby rather than a VM variant like GraalVM. A common syntax for CRuby variants would also rename ruby-asan and ruby-debug, so I think it fits better in a separate issue.
There was a problem hiding this comment.
I shortened the paragraph and moved the version overview into its first sentence. I kept mswin out of the table, since its rows are interpreters.
There was a problem hiding this comment.
I'd keep
mswinhere, as it selects a platform build of CRuby rather than a VM variant like GraalVM. A common syntax for CRuby variants would also renameruby-asanandruby-debug, so I think it fits better in a separate issue.
It's also a variant, using a different toolchain. I do think it'd be nice to generalize the concept of variants, for example we have asan-release currently and it's not so nice, ruby+asan/ruby+asan-head seems better.
We kind of need to decide this now, because it decides whether it's ruby+mswin-3.4 or mswin-3.4.
Though maybe the ruby+ prefix could be implicit, like ruby- currently, not sure how easy/hard that is though.
cache.ruby-lang.org publishes mswin builds of the 3.4 and 4.0 releases, so `mswin-X.Y` installs them and `mswin-head` the master build. `mswin` and `ruby-mswin` keep installing master until their known users move to `mswin-head`. 3.3 and older are left out because their mkmf ignores ENV['PKG_CONFIG'] and would not use the vcpkg pkgconf. mswin is CRuby built with MSVC, so it stays the ruby engine and the CRuby rules apply. `common.inputs.mswin` only selects the builds and keeps them out of the tool cache, where runners hold RubyInstaller builds of the same versions, and in their own bundler-cache key. Co-authored-by: なつき <i@ntk.me> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The README said what mswin is but not when to use it, which leaves users unsure which of the two Windows builds to choose. The available versions move into the first sentence of the paragraph, and mswin stays out of the table, whose rows are interpreters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
e4e8704 to
00746e6
Compare
|
Thanks @larskanis and @ntkme for the reviews. I'll work on moving the repositories whose workflows use |
|
This should not have been merged before my review, I think that's stated clearly in https://github.com/ruby/setup-ruby/blob/master/CONTRIBUTING.md#maintainers. |
|
You're right, I should have waited for your approval as CONTRIBUTING.md says, sorry. date, zlib, digest, resolv and pathname already test |
There was a problem hiding this comment.
The code changes themselves look good, it's not invasive and does not use mswin as a different engine.
The naming choice mswin-X.Y is not necessarily something we want to keep for the future (but is a natural choice for now).
For example if we require ruby+mswin-X.Y/head then we would also be safe to have ruby+mswin pick the latest release, while mswin could stay head forever.
|
|
||
| export function shouldUseToolCache(engine, version) { | ||
| return (engine === 'ruby' && !isHeadVersion(version)) || isSelfHostedRunner() | ||
| // The tool cache of runners holds RubyInstaller builds under the same Ruby/<version> names as mswin |
There was a problem hiding this comment.
I don't understand this comment, especially the as mswin part.
The code clearly says no toolcache for mswin, so it seems to contradict the comment.
Probably best to just remove the comment.
I see, please add this context here and/or ping me on Slack in such a case of needing a review more urgently, I didn't know that. |
| const mswin = engine === 'mswin' || rubyVersion === 'ruby-mswin' | ||
| if (mswin) { | ||
| engine = 'ruby' | ||
| // mswin and ruby-mswin keep installing the master build until their known users move to mswin-head |
There was a problem hiding this comment.
I think this is reasonable & pragmatic, once we have made PRs to all public repos using mswin (it's only a few) to switch to mswin-head.
Variants could avoid this breaking change but I think it's small enough here that we don't need to wait for it.
|
Fable found 2 relevant issues with the PR: 1.
|
|
It wasn't intended, but I'd keep it. The The patch version matching is fixed in #988, and the |
This adds the release builds split out of #971. cache.ruby-lang.org publishes mswin builds of the 3.4 and 4.0 releases, so
mswin-3.4installs the latest 3.4.x andmswin-headthe master build.Nothing changes for existing users, as
mswinandruby-mswinstill install the master build. larskanis suggested in #972 (comment) thatmswinshould install the latest release. I'll do that in a follow-up, after sending PRs that move the public workflows testing master withmswintomswin-head. I'll take care of the ruby org repositories like ruby/openssl.The README now says when to pick
mswinover the default RubyInstaller builds. I build and publish the mswin packages in ruby/actions and will maintain their support here.mswin is CRuby built with MSVC, not another implementation, so it stays the
rubyengine and goes through every CRuby rule. A flag only selects the mswin builds and keeps them apart from the RubyInstaller builds of the same versions in the tool cache and the bundler-cache key.I ran the built
dist/index.json my x64 and arm64 Windows machines.mswin,ruby-mswinandmswin-headinstalled the master build,mswin-3.4installed 3.4.12, and the mswin steps oftest.ymlpassed.Generated with Claude Code