sorbet: Regenerate homegrown RBI files with brew typecheck --update
- I needed to add some more `require`s to the `tty.rb` generator script since it failed to recognise `env_config` and Sorbet's `T` setup if I ran it not via `brew ruby`, and I couldn't get `brew ruby` to work within `safe_system` in the `typecheck` dev-cmd.
This commit is contained in:
parent
1295904986
commit
48802daf01
@ -64,6 +64,9 @@ module Homebrew
|
|||||||
tapioca_args = ["--exclude", *excluded_gems, "--typed-overrides", *typed_overrides]
|
tapioca_args = ["--exclude", *excluded_gems, "--typed-overrides", *typed_overrides]
|
||||||
tapioca_args << "--all" if args.update_all?
|
tapioca_args << "--all" if args.update_all?
|
||||||
|
|
||||||
|
ohai "Updating homegrown RBI files..."
|
||||||
|
safe_system "bundle", "exec", "ruby", "sorbet/custom_generators/tty.rb"
|
||||||
|
|
||||||
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"
|
||||||
|
|||||||
@ -1,12 +1,13 @@
|
|||||||
# typed: true
|
# typed: true
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
require_relative "../../global"
|
||||||
|
require_relative "../../env_config"
|
||||||
require_relative "../../utils/tty"
|
require_relative "../../utils/tty"
|
||||||
|
|
||||||
File.open("#{File.dirname(__FILE__)}/../../utils/tty.rbi", "w") do |file|
|
File.open("#{File.dirname(__FILE__)}/../../utils/tty.rbi", "w") do |file|
|
||||||
file.write(<<~RUBY)
|
file.write(<<~RUBY)
|
||||||
# typed: strict
|
# typed: strict
|
||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
module Tty
|
module Tty
|
||||||
RUBY
|
RUBY
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user