Skip to content

RubyLsp::Requests::Request breaks the Ruby LSP extension on shopify-build #1300

@zarifmahfuz

Description

@zarifmahfuz

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:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions