-
-
Notifications
You must be signed in to change notification settings - Fork 263
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
setup-ruby removes chocolatey from PATH #19
Comments
I'm essentially responsible for the code that does that. On CI systems, there's often issues with both multiple copies of applications being available and also 'dll resolution hell'. It's one thing to have an error showing that a dll can't be found, it's much worse if a different dll is loaded and then has unexpected results. Then again, one should be aware of issues like this, but a lot of macOS or *nix users won't expect them. Regardless, I don't have an issue with removing the code. Can your workflows work around the path changes? JFYI, most publicly facing Ruby MinGW builds use a manifest for dll resolution, and are bundled with their own dlls. But, the ruby/ruby CI is done without one. |
Thanks for the report. Line 68 in 30011b6
We could also have an option to not filter the PATH at all (on Windows). mingw64 should likely also be removed as it would conflict with msys2. Not sure about CMake and OpenSSL. Maybe msys2 already provide these 2? |
Sure, Hmm... Or I actually can't because I need other software installed via Chocolatey to be on PATH. Even if I manage to install them before you remove Chocolatey dir from PATH, they won't be available anymore for Ruby program. |
I'm sorry about that. FWIW, here is what is in I'll make a PR and ask @MSP-Greg to review it. |
Sorry for being AFK for a bit. People should be setting up their path to correctly load/run whatever requirements they have. I guess all the path cleaning could be removed... Enabling msys2 could be an option, as automatically putting it a the front of the path may cause issues for people using other compilers. I was kind of waiting to see if GH actually made a quick decision about whether to add MSYS2 to their images... |
Apologies for that. |
What do you mean by "Enabling msys2" ? Currently, it's added at the front of PATH. |
A first step I did in #20 is to show which entries are removed from PATH:
|
One possible messy item is 7-Zip, which is on the path in C:\ProgramData\Chocolatey\bin. It's also installed at C:\Program Files\7-Zip. I add that to path in actions-ruby just so 7z is available... |
Whether to add a windows specific option to add MSYS2 to the path, and leave it out by default. It's messy, because the newer Rubies (2.4+) will find it at C:\msys64 when one requires devkit, but the older ones (2.2 & 2.3) will not. I've got an issue in Ruby about adding a |
@MSP-Greg @slonopotamus Please share your thoughts on https://github.com/ruby/setup-ruby/pull/20/files#r376801834 |
* This might lead to more conflicts, but the flip side of a setup action removing capabilities seems worse and unexpected. * See #19
I released 1.15.0 with the fix, it should work now. |
See trivial workflow that reproduces the problem: https://github.com/slonopotamus/asciidoctor-diagram/runs/434520900?check_suite_focus=true
Before setup-ruby actions is called, there's
C:\ProgramData\Chocolatey\bin
on PATH. But it is gone after setup-ruby is called.For the reference, here's workflow file:
The text was updated successfully, but these errors were encountered: