lib/tapioca/helpers/sorbet_helper.rb in tapioca-0.11.3 vs lib/tapioca/helpers/sorbet_helper.rb in tapioca-0.11.4

- old
+ new

@@ -17,20 +17,22 @@ SORBET_EXE_PATH_ENV_VAR = "TAPIOCA_SORBET_EXE" SORBET_PAYLOAD_URL = "https://github.com/sorbet/sorbet/tree/master/rbi" + SPOOM_CONTEXT = T.let(Spoom::Context.new("."), Spoom::Context) + FEATURE_REQUIREMENTS = T.let( { # feature_name: ::Gem::Requirement.new(">= ___"), # https://github.com/sorbet/sorbet/pull/___ non_generic_weak_map: ::Gem::Requirement.new(">= 0.5.10587"), # https://github.com/sorbet/sorbet/pull/6610 }.freeze, T::Hash[Symbol, ::Gem::Requirement], ) sig { params(sorbet_args: String).returns(Spoom::ExecResult) } def sorbet(*sorbet_args) - Spoom::Sorbet.srb(sorbet_args.join(" "), sorbet_bin: sorbet_path, capture_err: true) + SPOOM_CONTEXT.srb(sorbet_args.join(" "), sorbet_bin: sorbet_path) end sig { returns(String) } def sorbet_path sorbet_path = ENV.fetch(SORBET_EXE_PATH_ENV_VAR, SORBET_BIN)