-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
Ruby 3 rollout #16154
Comments
This seems like a nice-to-have rather than a blocker. Could be moved to the end.
Why is this?
This is fine, we can make this a minor Homebrew version bump. Meta-comment: other than the above questions: this all seems perfect. Thanks for the step-by-step plan, @Bo98 🎉 |
Lines 5 to 11 in 53107a5
We don't want Dependabot to start updating to 2.6-incompatible gems until after we've bumped However it can't be restrictive for actual users, so we will need to check some env that users have but Dependabot doesn't. |
Makes sense 👍🏻 |
I've removed the explicit I'd like to get this done before Christmas, so my proposed schedule (subject to any delays from issues arising):
The reason for the vendored gems overlap is because vendored gems are messy to revert (any revert would require bumping I realise that slightly complicates Dependabot for a few days, but I can handle that if any vendored gem gets updated - or just stall them briefly if non-critical. |
👍🏻
Is this just vendoring the same gems that we vendor for 2.6 and removing the need for a If so: 👍🏻. If not: let's talk more.
All sounds good.
Not a big deal for a few days 👍🏻 Appreciate the forward planning, great work here @Bo98. |
Yes |
Will do next stage after #16259, so that it won't conflict and we can apply the vendored gem cleanup to 3.1 from the get go. |
@Bo98 that PR is shipped now 👍🏻 |
I don't see this explicitly mentioned already so I'm adding it here just in case. The JSON API and website generation for |
That one is a little different in that technically speaking it's nothing to do with Can also update that too however if everyone is fine with installing their own Ruby 3.1+ for local testing for that. |
Yup 👍🏻 |
Ah, in that case, it's probably something that should happen as a follow-up but shouldn't delay the other Ruby 3 work. |
This update has broken ~: ⇒ brew upgrade
==> Downloading https://ghcr.io/v2/homebrew/portable-ruby/portable-ruby/blobs/sha256:02180ca8b8295422ae84921bcf034b7ee8ce5575488bd5e6a37a192e53cd5d34
############################################################################################################################################################################# 100.0%
==> Pouring portable-ruby-3.1.4.el_capitan.bottle.tar.gz
Error: Failed to install ruby 3.1.4!
Error: Failed to install Homebrew Portable Ruby (and your system version is too old)! I've tested the various solutions that come up when searching for this error, such as The tar file does get downloaded: ~: ⇒ exa -la /Users/myuser/Library/Caches/Homebrew/ | grep ruby
.rw-r--r--@ 13M myuser 26 Oct 16:00 portable-ruby-3.1.4.el_capitan.bottle.tar.gz Abbreviated system info: ⇒ system_profiler SPSoftwareDataType SPHardwareDataType
Software:
System Software Overview:
System Version: macOS 14.1.2 (23B92)
Kernel Version: Darwin 23.1.0
Hardware:
Hardware Overview:
Model Name: MacBook Pro
Model Identifier: MacBookPro16,1
Processor Name: 6-Core Intel Core i7
Memory: 32 GB
System Firmware Version: 2020.41.1.0.0 (iBridge: 21.16.1069.0.0,0)
OS Loader Version: 580~743 I haven't tested installing Ruby separately from Homebrew and / or setting I'd be happy to file a separate issue if that would be more appropriate, but this seemed like the right place since |
You're the first to report in the few days it's been out so it's unlikely to be widespread. Here's what it happening under the hood: cd "$(brew --repo)/Library/Homebrew/vendor"
tar xzf ~/Library/Caches/Homebrew/portable-ruby-3.1.4.el_capitan.bottle.tar.gz
cd portable-ruby
./3.1.4/bin/ruby --version
echo $? # aborts if this is not zero
# cleanup the above by doing
rm -rf "$(brew --repo)/Library/Homebrew/vendor/portable-ruby/3.1.4" Try those out manually and let me know what's happening. The error message I agree is probably not as useful as it could be. |
It failed on the tar command: /usr/local/Homebrew/Library/Homebrew/vendor|stable ⇒ tar xzf ~/Library/Caches/Homebrew/portable-ruby-3.1.4.el_capitan.bottle.tar.gz
tar: Error opening archive: Failed to open '/Users/myuser/Library/Caches/Homebrew/portable-ruby-3.1.4.el_capitan.bottle.tar.gz' I was able to open the archive with /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby|stable ⇒ ./3.1.4/bin/ruby --version
[1] 12130 killed ./3.1.4/bin/ruby --version I would have thought that would print a version string if everything worked correctly. |
If |
Also probably worth seeing that that xattr ~/Library/Caches/Homebrew/portable-ruby-3.1.4.el_capitan.bottle.tar.gz |
I've also encountered the same issue as reported by @doorisajar on a x86_64 Mac. Cleaning update and re-fetching:
Edit: |
This is likely your cause then. Which one do you use and can you submit a false positive report to them? |
Cylance Protect. Is there a workaround to force Ruby 2? Or what's the mechanism to temporarily pin to an older version of Homebrew that's pre-ruby 3? |
If you can't find a dedicated form: it might be through support tickets.
We're removing Ruby 2 support entirely for 4.2.0. The workaround I recommend is simply adding Portable Ruby to the whitelist, which all AV software I've seen should allow you to do (unless you're in a work environment?). If this is impossible and Cylance refuse to fix the issue, let me know and we can maybe consider functionality to allow you to use your own Ruby build. |
I'm in the same boat (Cylance) and am submitting a whitelist request to my org. I'll update with the outcome. Thanks for the help! |
It's a corporate environment, yes. There is not support for managing the whitelist at the workstation. |
As a temporary workaround to anyone encountering this portable ruby antivirus issue:
This will put Homebrew at a version prior to the Ruby 3 change. |
My org was able to whitelist Ruby 3.1.4 in Cylance, and it solved the issue. Everything seems to be working normally now! |
Thanks for closing this out @Bo98 and everyone for work here! |
HOMEBREW_RUBY3
HOMEBREW_RUBY3
(already supported underHOMEBREW_USE_RUBY_FROM_PATH
) - Support system Ruby 3 on Linux #16192HOMEBREW_RUBY3
by default forHOMEBREW_DEVELOPER
users - Enable Ruby 3 forHOMEBREW_DEVELOPER
and the Docker image #16241HOMEBREW_RUBY3
for everyone (land this just after a tag and this will effectively be a week of dev-cmd only users initially) - Enable Ruby 3 for all users #16268HOMEBREW_RUBY3
checks can be removed because of Dependabot (which we want to stay on 2.6 for a little longer). Some checks, such as 2.6 Portable Ruby downloads, can be removed however.HOMEBREW_REQUIRED_RUBY_VERSION
- Require Ruby 3.1 #16294HOMEBREW_RUBY3
checks and bumpGemfile
bounds (and removedid_you_mean
entry from Gemfile) - Update all dependencies #16338TargetRubyVersion
in RuboCop, but disable all cops that trigger new failures (to avoid chicken/egg issue) - rubocop: Set TargetRubyVersion to 3.1 & disable all cops that fail #16341Style/MutableConstant
RuboCop offenses for Ruby 3.1 #16346, rubocop: Fix remaining TODOs for triaging Ruby 3 cops #16745, etc.Each step should ideally be in its own PR (for easy reverts) and the state of brew after each step should be stable (i.e. no state should be release-blocking and steps shouldn't need to be done "quickly" after each other). Goal is to avoid "mega PRs".
The text was updated successfully, but these errors were encountered: