pocke / rbs_rails

Apache License 2.0
285 stars 33 forks source link

Remove some type definitions from parser #232

Closed fugakkbn closed 2 years ago

fugakkbn commented 2 years ago

When we run steep check we get the following error:

[error] Non-overloading method definition of `type` in `::Parser::AST::Node` cannot be duplicated
│ Diagnostic ID: RBS::DuplicatedMethodDefinition
│
└   def type: () -> Symbol
    ~~~~~~~~~~~~~~~~~~~~~~

It says "cannot be duplicated," so I checked and it appears that a type definitions for the Parser module has recently been added to Steep. https://github.com/soutaro/steep/blob/56eab05da8872051ab258f5ddb32b576a4b73256/sig/shims/parser.rbs#L4-L6

Looking at the added rbs files, it appears that the Parser module, Parser::AST module, and Parser::AST::Node class have all been added. Therefore, these definitions are removed.

pocke commented 2 years ago

RBS Rails ignores Steep's type signature by rbs_collection.yaml. So I'm not sure why you got the error.

fugakkbn commented 2 years ago

Hmmm...seems to be a problem with my environment. I will investigate the cause separately, but would like to close this PR. Sorry for the inconvenience. Thanks.