-
Notifications
You must be signed in to change notification settings - Fork 245
Description
Ruby version
3.1.2
Code snippet
No response
Description
I am seeing the following error when using Ruby LSP on https://github.com/Shopify/shopify-build:
Formatting error: undefined method `anything' for T:Module sig { abstract.returns(T.anything) } ^^^^^^^^^
I am guessing this is coming from the recently added RubyLsp::Requests::Request which is using T.anything:
ruby-lsp/lib/ruby_lsp/requests/request.rb
Line 13 in 4f1012e
| sig { abstract.returns(T.anything) } |
I think the reason we're seeing this is due to the fact that we're on a version of Sorbet (0.5.10326) that does not have the T.anything type. We use vendored gems on shopify-build and update gems once a year. T.anything was added to Sorbet in April, 2023: sorbet/sorbet@67c657a so we haven't updated our Sorbet to a version after that one yet.
Should this type make extension error out?
Expected output
T.anything should not cause Ruby LSP to fail