-
Notifications
You must be signed in to change notification settings - Fork 2
Rewrite #26
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
Rewrite #26
Conversation
8ee3180
to
6f2d245
Compare
Thanks for the work on this. I'm fine with the rewrite, as anyone interested in it should be familiar with PowerShell, Bash, and MSYS2. One question. The current code in the matrix:
include:
- os: windows-2022
sys: mingw64
env: x86_64
variant: -gcc@14-openssl@1.1
- os: windows-2022
sys: ucrt64
env: ucrt-x86_64
variant: -gcc@14
- os: windows-2022
sys: ucrt64
env: ucrt-x86_64
variant: -gcc@14-openssl@1.1 Might we be able to specify packages in the matrix, something like: matrix:
include:
- os: windows-2022
sys: mingw64
env: x86_64
variant: -gcc@14-openssl@1.1
packages: gcc-14.2.0-3 openssl-1.1.1.w-1
- os: windows-2022
sys: ucrt64
env: ucrt-x86_64
variant: -gcc@14
packages: gcc-14.2.0-3
- os: windows-2022
sys: ucrt64
env: ucrt-x86_64
variant: -gcc@14-openssl@1.1
packages: gcc-14.2.0-3 openssl-1.1.1.w-1 Right now, there are two steps |
Definitely possible. The reason that I split them is mainly that openssl require a v3 library backup and restore step, which is quite unique, but I can wrap two steps around the generic downgrade step. Will update. |
Sorry, I forgot v3 dll's need to be kept for the other items installed when we downgrade to OpenSSL 1.1... Also, one thing discussed was possibly adding a json file here that would be copied to setup-ruby, it would contain the logic for the archive package selection. Something similar to what you added to the readme. A quick object might be something like (ruby code, not complete) the below: Once again, the goal is to keep repo updates for MSYS2 package compatibility issues as 'code free' as possible...
Thanks again. Somewhat busy with family things this afternoon... |
7cb0ac5
to
37fb3d8
Compare
My worry is the cost of creating and maintaining a DSL/schema and parser for it would be way too expensive than just writing the code directly. Also, I'm worried in the future we might need to certain feature detection instead of relying on simply version number, which a fixed JSON won't be able to handle. const msys2Type = os.arch() === 'arm64'
? 'clangarm64'
: rubyIsMSVCRT(prefix)
? 'mingw64'
: 'ucrt64'
let suffix = `-${msys2Type}`
if (!(common.isHeadVersion(version) || common.floatVersion(version) >= 3.5) && msys2Type !== 'clangarm64') {
suffix += '-gcc@14'
}
if (!(common.isHeadVersion(version) || common.floatVersion(version) >= 3.2)) {
suffix += '-openssl@1.1'
} Consider the code above, I think a DSL will be way less efficient than this. |
9ba49ef
to
cf78e66
Compare
@MSP-Greg I have a question for you as I don't know much about vcpkg and mswin builds. I'm seeing the following warning in setup-ruby's test when it's running
I think what happens here is that Maybe this is simply an oversight as the code was written before this change? https://devblogs.microsoft.com/cppblog/vcpkg-is-now-included-with-visual-studio/ So maybe we should install vcpkg packages into both |
Ok it seems https://github.com/MSP-Greg/ruby-loco is hardcoded to use |
I was starting to type this when you sent the last post/message. Yes. Ruby doesn't really need Given that the vcvars code is setting As to the warning, maybe change the workflow step code (add JFYI, I was looking at the job logs and was confused. Any thoughts on a better name than |
I guess my question was more of whether these DLLs are required at a hard coded location during mswin ruby's run-time to match the location during compile/link-time? If that's the expectation, then I totally agree that having 2022 in the path is going to cause trouble in the future. - If it's just a compile-time requirement, then I think it does not really matter as long as the correct VCPKG_ROOT is set during compilation. If the DLLs and headers are only a compile-time dependencies (e.g. if they get bundled into the mswin ruby distribution for runtime), then I think a better way to handle this is to remove the vcpkg packages from setup-ruby, and put that step directly into ruby-loco? |
They're needed for compiling std-lib extension items and other extension gems. |
Got it. Still not sure about how the compiler find the right location as in setup-ruby we didn’t export VCPKG_ROOT to the correct one with the packages installed… Or maybe it will actually fail to compile and it’s just that we never tried as the CI only test compiling the json gem. Do you know which std gem(s) need these dependencies that I can do a test? |
Fiddle requires libffi, Psych requires libyaml, openssl requires openssl, zlib require zlib. Puma compiles against openssl. I think most of these are tested in their respective Ruby repos, all of the above are tested on at least one of the MSYS2 builds, and also mswin. EDIT: most of the3 above have worked for a long time (years). Note that the compilers are part of the Visual Studio install, they aren't part of vcpkg. Not sure about arm64, I haven't started a ruby-loco build for that yet... Lars Kanis has one built, I could check there... |
Oh, I didn't realize that ruby also bundles I was looking at the changes in mingw-w64 and found the changes in the headers seem to be compatible, but did not realize that we have two Sounds like we want to downgrade |
I just checked the last GHA builds of stable Ruby branches of 3.4, 3.3 & 3.2, and they were done last week, but before the changes happened. I'll run them locally with all current packages... I can upload all the required packages to the release here. BTW, no idea where I got LA from, your profile shows Bay area... |
My two cents: If we're bundling vendor provided DLLs in RI2 or whatever packaging, maybe it should also bundle the necessary headers from the vendor so that the compiler can always find the matching pairs of headers/dlls, without having to rely on the end user to install the "correct" version of header from the vendor. |
@ntkme not sure what you're following, see https://bugs.ruby-lang.org/issues/21327#note-3 |
@ntkme I just uploaded the 24 x64 'r688' packages here. |
Forgot to answer here. I had noticed this, too. I think it may be some issue in |
Thanks. I also pushed commits to do the downgrade, as well as run a regression test for updating the |
@MSP-Greg It seems like date gem on clangarm64 is also broken. I'm going to create a new variant for downgrading. Could you please upload the same set of package for clangarm64? |
@ntkme I just uploaded the twelve |
035c3e7
to
c104b8d
Compare
@ntkme Thanks. Since arm head hasn't been built since 05-May... Once this is merged (and setup-ruby), I may try a ruby-loco arm build. A few days can change a lot of things. |
Yes, I've commented out the test for arm head for now. |
23806fe
to
86ac40f
Compare
I saw that rubyinstaller-head-arm.7z was updated so I gave it a try and run into this: oneclick/rubyinstaller2#434 It brings us to a weird situation that msys64 needs to be extracted to |
To no one's surprise, the missing DLL in |
clangarm64 ruby head test is now passing after I disabled the "update bundler" step in setup-ruby. The problem is that in this repo we're intentionally setting up msys2 after installing ruby during our test. Not having msys2 installed currently causes the built-in See oneclick/rubyinstaller2-packages#25 (comment) and ruby/date#126 (comment) |
@MSP-Greg I think we're out of the woods for |
Done. LGTM. As I see it, this doesn't affect the current Thanks for all your work. |
Correct, the msys2-gcc-pkgs tag and release assets will be untouched and they will stop receiving future updates. Basically, it will become immutable but will remain functional. |
@MSP-Greg One last thing you might want to do before merging this is downgrade mingw-w64 packages for the current setup so that they are frozen at the older version... |
This is a complete rewrite:
Preview Links
README: https://github.com/ntkme/setup-msys2-gcc/blob/main/README.md
Latest release: https://github.com/ntkme/setup-msys2-gcc/releases/latest
Sample setup-msys2-gcc run: https://github.com/ntkme/setup-msys2-gcc/actions/runs/14843438988
Sample setup-ruby run: https://github.com/ntkme/setup-ruby/actions/runs/14845974480
Note: The first time building vcpkg packages will take ~40 minutes without cache, but the subsequent builds with full cache only take ~2 minutes if nothing has changed.