Skip to content

Commit d2b4e9c

Browse files
authored
Merge pull request #77 from Shopify/use_new_no_errors_option
Use new no error sections option
2 parents 035d6c0 + 50dfb89 commit d2b4e9c

File tree

5 files changed

+16
-10
lines changed

5 files changed

+16
-10
lines changed

Gemfile.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ PATH
33
specs:
44
spoom (1.0.9)
55
colorize
6-
sorbet (~> 0.5.5)
6+
sorbet (>= 0.5.6347)
77
sorbet-runtime
88
thor (>= 0.19.2)
99

@@ -45,11 +45,11 @@ GEM
4545
rubocop-sorbet (0.4.0)
4646
rubocop
4747
ruby-progressbar (1.10.1)
48-
sorbet (0.5.6196)
49-
sorbet-static (= 0.5.6196)
50-
sorbet-runtime (0.5.6196)
51-
sorbet-static (0.5.6196-universal-darwin-14)
52-
thor (1.0.1)
48+
sorbet (0.5.6349)
49+
sorbet-static (= 0.5.6349)
50+
sorbet-runtime (0.5.6349)
51+
sorbet-static (0.5.6349-universal-darwin-14)
52+
thor (1.1.0)
5353
unicode-display_width (1.7.0)
5454

5555
PLATFORMS

lib/spoom/cli/bump.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,12 @@ def bump(directory = ".")
7676
exit(files_to_bump.empty?)
7777
end
7878

79-
output, no_errors = Sorbet.srb_tc(path: exec_path, capture_err: true, sorbet_bin: options[:sorbet])
79+
output, no_errors = Sorbet.srb_tc(
80+
"--no-error-sections",
81+
path: exec_path,
82+
capture_err: true,
83+
sorbet_bin: options[:sorbet]
84+
)
8085

8186
if no_errors
8287
print_changes(files_to_bump, command: cmd, from: from, to: to, dry: dry, path: exec_path)

lib/spoom/git.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ def self.exec(command, *arg, path: '.')
1414
return "", "Error: `#{path}` is not a directory.", false unless File.directory?(path)
1515
opts = {}
1616
opts[:chdir] = path
17-
_, o, e, s = Open3.popen3(*T.unsafe([command, *T.unsafe(arg), opts]))
17+
i, o, e, s = Open3.popen3(*T.unsafe([command, *T.unsafe(arg), opts]))
1818
out = o.read.to_s
1919
o.close
2020
err = e.read.to_s
2121
e.close
22+
i.close
2223
[out, err, T.cast(s.value, Process::Status).success?]
2324
end
2425

spoom.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
3333
spec.add_development_dependency("minitest", "~> 5.0")
3434

3535
spec.add_dependency("sorbet-runtime")
36-
spec.add_dependency("sorbet", "~> 0.5.5")
36+
spec.add_dependency("sorbet", ">= 0.5.6347")
3737
spec.add_dependency("thor", ">= 0.19.2")
3838
spec.add_dependency("colorize")
3939

test/spoom/cli/lsp_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def foo(a)
4444
assert_equal(<<~MSG, err)
4545
Error: Sorbet returned typechecking errors for `/errors.rb`
4646
8:0-8:11: Not enough arguments provided for method `Foo#foo`. Expected: `1`, got: `0` (7004)
47-
4:2-5:5: Returning value that does not conform to method result type (7005)
47+
4:2-5:5: Expected `String` but found `NilClass` for method result type (7005)
4848
3:2-3:43: Method `sig` does not exist on `T.class_of(Foo)` (7003)
4949
3:8-3:25: Method `params` does not exist on `T.class_of(Foo)` (7003)
5050
9:0-9:3: Unable to resolve constant `Bar` (fix available) (5002)

0 commit comments

Comments
 (0)