Merge pull request #16281 from Bo98/ruby3-hidden-defs-fix

Hack fix for Sorbet hidden definitions update failing on Ruby 3
This commit is contained in:
Kevin 2023-12-03 10:36:31 -08:00 committed by GitHub
commit 0f39516cf6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 4214 additions and 1169 deletions

View File

@ -47,17 +47,20 @@ jobs:
id: update id: update
working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }} working-directory: ${{ steps.set-up-homebrew.outputs.repository-path }}
run: | run: |
git fetch origin if [[ "${GITHUB_EVENT_NAME}" != "pull_request" ]]
BRANCH="sorbet-files-update"
echo "branch=${BRANCH}" >> "$GITHUB_OUTPUT"
if git ls-remote --exit-code --heads origin "${BRANCH}"
then then
git checkout "${BRANCH}" git fetch origin
git checkout "Library/Homebrew/sorbet"
else BRANCH="sorbet-files-update"
git checkout --no-track -B "${BRANCH}" origin/master echo "branch=${BRANCH}" >> "$GITHUB_OUTPUT"
if git ls-remote --exit-code --heads origin "${BRANCH}"
then
git checkout "${BRANCH}"
git checkout "Library/Homebrew/sorbet"
else
git checkout --no-track -B "${BRANCH}" origin/master
fi
fi fi
brew typecheck --update --suggest-typed brew typecheck --update --suggest-typed

View File

@ -63,7 +63,8 @@ module Homebrew
ohai "Updating Tapioca RBI files..." ohai "Updating Tapioca RBI files..."
safe_system "bundle", "exec", "tapioca", "gem", *tapioca_args safe_system "bundle", "exec", "tapioca", "gem", *tapioca_args
safe_system "bundle", "exec", "parlour" safe_system "bundle", "exec", "parlour"
safe_system "bundle", "exec", "srb", "rbi", "hidden-definitions" safe_system({ "RUBYLIB" => "#{HOMEBREW_LIBRARY_PATH}/sorbet/hidden_definitions_hacks" },
"bundle", "exec", "srb", "rbi", "hidden-definitions")
safe_system "bundle", "exec", "tapioca", "todo" safe_system "bundle", "exec", "tapioca", "todo"
if args.suggest_typed? if args.suggest_typed?

View File

@ -0,0 +1,4 @@
# typed: strict
# frozen_string_literal: true
# This file intentionally left blank

File diff suppressed because it is too large Load Diff

View File

@ -5,6 +5,7 @@
# typed: false # typed: false
module ::Nokogiri; end module ::Nokogiri; end
module BigDecimal::Deprecation; end
module T::InterfaceWrapper::Helpers; end module T::InterfaceWrapper::Helpers; end
module T::Private::Abstract::Hooks; end module T::Private::Abstract::Hooks; end
module T::Private::Methods::MethodHooks; end module T::Private::Methods::MethodHooks; end