I'm on the latest version of sorbet:
sorbet (0.5.5933)
sorbet-static (= 0.5.5933)
sorbet-coerce (0.2.7)
polyfill (~> 1.8)
safe_type (~> 1.1, >= 1.1.1)
sorbet (>= 0.4.4704)
sorbet-runtime (>= 0.4.4704)
sorbet-rails (0.7.1)
method_source (>= 0.9.2)
parlour (~> 2.0)
parser (>= 2.7)
sorbet-coerce (>= 0.2.6)
sorbet-runtime (>= 0.5)
sorbet-runtime (0.5.5933)
sorbet-static (0.5.5933-universal-darwin-14)
Running bundle exec srb rbi update on my project results in an exception:
Traceback (most recent call last):
6: from /Users/dev/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sorbet-0.5.5933/bin/srb-rbi:237:in `<main>'
5: from /Users/dev/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sorbet-0.5.5933/bin/srb-rbi:196:in `main'
4: from /Users/dev/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sorbet-0.5.5933/bin/srb-rbi:121:in `init'
3: from /Users/dev/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sorbet-0.5.5933/bin/srb-rbi:232:in `block in make_step'
2: from /Users/dev/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sorbet-0.5.5933/lib/hidden-definition-finder.rb:38:in `main'
1: from /Users/dev/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sorbet-0.5.5933/lib/hidden-definition-finder.rb:47:in `main'
/Users/dev/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/sorbet-0.5.5933/lib/hidden-definition-finder.rb:151:in `write_constants': /var/folders/d0/b5hrfn1d66n4dw4kdnrndkmm0000gn/T/d20201005-96009-q2bkpm/reflection.rbi had unexpected errors. Check this file for a clue: /var/folders/d0/b5hrfn1d66n4dw4kdnrndkmm0000gn/T/d20201005-96009-q2bkpm/reflection.json.err (RuntimeError)
That file's contents are here:
/var/folders/d0/b5hrfn1d66n4dw4kdnrndkmm0000gn/T/d20201005-96251-13nzr2p/reflection.rbi:492715: Parent of class `Net::SSH::Transport::Kex::EcdhSHA2NistP256` redefined from `Net::SSH::Transport::Kex::Abstract5656` to `Net::SSH::Transport::Kex::DiffieHellmanGroup1SHA1` https://srb.help/5012
492715 |class Net::SSH::Transport::Kex::EcdhSHA2NistP256 < Net::SSH::Transport::Kex::DiffieHellmanGroup1SHA1
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I think this is related to #3177 which was fixed recently, but the subclass is different.
on my project
We can't reproduce errors unless there's a specific set of steps to reproduce the issue, including the project itself.
If you can provide concrete steps to reproduce the problem, please add them and reopen this issue.
I encounter this bug in my project too. The root cause seems to be that the change in #3177 is not backward-compatible with older version. If I'm using a net-ssh smaller than 6.0 (5.2 in my case) then I will encounter this bug.
Also running into this.
Using a net-ssh version below 6 seems to be the issue like pointed out above, as it does not happen if I use a version >= 6
Most helpful comment
I encounter this bug in my project too. The root cause seems to be that the change in #3177 is not backward-compatible with older version. If I'm using a net-ssh smaller than 6.0 (5.2 in my case) then I will encounter this bug.