Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Library/Homebrew/sorbet/tapioca/compilers/api_structs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
module Tapioca
module Compilers
class ApiStructs < Tapioca::Dsl::Compiler
extend T::Generic

ConstantType = type_member { { fixed: T.class_of(T::Struct) } }

sig { override.returns(T::Enumerable[T::Module[T.anything]]) }
Expand Down
2 changes: 2 additions & 0 deletions Library/Homebrew/sorbet/tapioca/compilers/args.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
module Tapioca
module Compilers
class Args < Tapioca::Dsl::Compiler
extend T::Generic

GLOBAL_OPTIONS = T.let(
Homebrew::CLI::Parser.global_options.map do |short_option, long_option, _|
[short_option, long_option].map { "#{Homebrew::CLI::Parser.option_to_name(it)}?" }
Expand Down
2 changes: 2 additions & 0 deletions Library/Homebrew/sorbet/tapioca/compilers/cask/caveats.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
module Tapioca
module Compilers
class CaskCaveats < Tapioca::Dsl::Compiler
extend T::Generic

ConstantType = type_member { { fixed: T::Module[T.anything] } }

sig { override.returns(T::Enumerable[T::Module[T.anything]]) }
Expand Down
2 changes: 2 additions & 0 deletions Library/Homebrew/sorbet/tapioca/compilers/cask/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
module Tapioca
module Compilers
class CaskConfig < Tapioca::Dsl::Compiler
extend T::Generic

ConstantType = type_member { { fixed: T::Module[T.anything] } }

sig { override.returns(T::Enumerable[T::Module[T.anything]]) }
Expand Down
2 changes: 2 additions & 0 deletions Library/Homebrew/sorbet/tapioca/compilers/cask/dsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
module Tapioca
module Compilers
class CaskDsl < Tapioca::Dsl::Compiler
extend T::Generic

ConstantType = type_member { { fixed: T::Module[T.anything] } }

sig { override.returns(T::Enumerable[T::Module[T.anything]]) }
Expand Down
2 changes: 2 additions & 0 deletions Library/Homebrew/sorbet/tapioca/compilers/env_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
module Tapioca
module Compilers
class EnvConfig < Tapioca::Dsl::Compiler
extend T::Generic

ConstantType = type_member { { fixed: T::Module[T.anything] } }

sig { override.returns(T::Enumerable[T::Module[T.anything]]) }
Expand Down
2 changes: 2 additions & 0 deletions Library/Homebrew/sorbet/tapioca/compilers/forwardables.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
module Tapioca
module Compilers
class Forwardables < Tapioca::Dsl::Compiler
extend T::Generic

FORWARDABLE_FILENAME = "forwardable.rb"
ARRAY_METHODS = ["to_a", "to_ary"].freeze
HASH_METHODS = ["to_h", "to_hash"].freeze
Expand Down
2 changes: 2 additions & 0 deletions Library/Homebrew/sorbet/tapioca/compilers/on_system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
module Tapioca
module Compilers
class OnSystem < Tapioca::Dsl::Compiler
extend T::Generic

ConstantType = type_member { { fixed: T::Module[T.anything] } }

sig { override.returns(T::Enumerable[T::Module[T.anything]]) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
module Tapioca
module Compilers
class RspecDynamicMatchers < Tapioca::Dsl::Compiler
extend T::Generic

ConstantType = type_member { { fixed: T::Module[T.anything] } }

sig { override.returns(T::Enumerable[T::Module[T.anything]]) }
Expand Down
2 changes: 2 additions & 0 deletions Library/Homebrew/sorbet/tapioca/compilers/rubocop.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
module Tapioca
module Compilers
class RuboCop < Tapioca::Dsl::Compiler
extend T::Generic

# This should be a module whose singleton class contains RuboCop::AST::NodePattern::Macros,
# but I don't know how to express that in Sorbet.
ConstantType = type_member { { fixed: T::Module[T.anything] } }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
module Tapioca
module Compilers
class Stanza < Tapioca::Dsl::Compiler
extend T::Generic

ConstantType = type_member { { fixed: T::Module[T.anything] } }

sig { override.returns(T::Enumerable[T::Module[T.anything]]) }
Expand Down
2 changes: 2 additions & 0 deletions Library/Homebrew/sorbet/tapioca/compilers/subcommand_args.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
module Tapioca
module Compilers
class SubcommandArgs < Tapioca::Dsl::Compiler
extend T::Generic

ConstantType = type_member { { fixed: T.class_of(Homebrew::AbstractSubcommand) } }

sig { override.returns(T::Enumerable[T.class_of(Homebrew::AbstractSubcommand)]) }
Expand Down
2 changes: 2 additions & 0 deletions Library/Homebrew/sorbet/tapioca/compilers/tty.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
module Tapioca
module Compilers
class Tty < Tapioca::Dsl::Compiler
extend T::Generic

ConstantType = type_member { { fixed: T::Module[T.anything] } }

sig { override.returns(T::Enumerable[T::Module[T.anything]]) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
require "bundler"
require "tapioca/dsl"

# Tapioca's CLI applies this through its RBS rewriter before loading custom compilers.
Tapioca::Dsl::Compiler.extend(T::Generic)

require "abstract_command"
require "abstract_subcommand"
require "sorbet/tapioca/compilers/args"
Expand Down
3 changes: 0 additions & 3 deletions Library/Homebrew/test/sorbet/tapioca/config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
require "bundler"
require "tapioca/dsl"

# Tapioca's CLI applies this through its RBS rewriter before loading custom compilers.
Tapioca::Dsl::Compiler.extend(T::Generic)

require "sorbet/tapioca/compilers/cask/config"
require "yaml"

Expand Down
Loading