Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump rbs from v3.6.0 to v3.7.0 and steep from v1.8.0 to v1.8.1 #481

Merged
merged 8 commits into from
Dec 16, 2024

Conversation

ydah
Copy link
Member

@ydah ydah commented Dec 9, 2024

The following warnings and errors have been fixed as a result of the version update:

bundle exec steep check
# Type checking files:

............F.........................F..................................F...FF.......F......

lib/lrama/grammar/parameterizing_rule/rhs.rb:19:23: [warning] Empty hash doesn't have type annotation
│ Diagnostic ID: Ruby::UnannotatedEmptyCollection
│
└           var_to_arg = {}
                         ~~

lib/lrama/bitmap.rb:16:10: [warning] Empty array doesn't have type annotation
│ Diagnostic ID: Ruby::UnannotatedEmptyCollection
│
└       a = []
            ~~

lib/lrama/grammar/rule_builder.rb:70:28: [warning] Empty array doesn't have type annotation
│ Diagnostic ID: Ruby::UnannotatedEmptyCollection
│
└         resolved_builders = []
                              ~~

lib/lrama/lexer/token/user_code.rb:19:23: [warning] Empty array doesn't have type annotation
│ Diagnostic ID: Ruby::UnannotatedEmptyCollection
│
└           references = []
                         ~~

lib/lrama/state/reduce.rb:30:36: [error] Type annotation has a syntax error: Failed to parse a type in annotation
│ Diagnostic ID: Ruby::AnnotationSyntaxError
│
└           # @type ivar @look_ahead: Array<Grammar::Symbol>
                                      ~~~~~~~~~~~~~~~~~~~~~~

lib/lrama/grammar.rb:385:15: [warning] Empty array doesn't have type annotation
│ Diagnostic ID: Ruby::UnannotatedEmptyCollection
│
└       errors = []
                 ~~

Detected 6 problems from 6 files
rake aborted!

@yui-knk
Copy link
Collaborator

yui-knk commented Dec 15, 2024

Is it possible to use inline type annotation for var = [] and var = {}?
I feel it's tricky to use Enumerator.new and each_with_object to avoid type check.

ydah added 5 commits December 15, 2024 10:31
```
lib/lrama/grammar/parameterizing_rule/rhs.rb:19:23: [warning] Empty hash doesn't have type annotation
│ Diagnostic ID: Ruby::UnannotatedEmptyCollection
│
└           var_to_arg = {}
                         ~~
```
```
lib/lrama/bitmap.rb:16:10: [warning] Empty array doesn't have type annotation
│ Diagnostic ID: Ruby::UnannotatedEmptyCollection
│
└       a = []
            ~~
```
```
lib/lrama/grammar/rule_builder.rb:70:28: [warning] Empty array doesn't have type annotation
│ Diagnostic ID: Ruby::UnannotatedEmptyCollection
│
└         resolved_builders = []
                              ~~
```
```
lib/lrama/lexer/token/user_code.rb:19:23: [warning] Empty array doesn't have type annotation
│ Diagnostic ID: Ruby::UnannotatedEmptyCollection
│
└           references = []
                         ~~
```
```
lib/lrama/grammar.rb:385:15: [warning] Empty array doesn't have type annotation
│ Diagnostic ID: Ruby::UnannotatedEmptyCollection
│
└       errors = []
                 ~~
```
@ydah ydah force-pushed the bump-rbs-and-steep branch from 1507cf9 to a48c27d Compare December 15, 2024 01:35
@ydah ydah marked this pull request as draft December 15, 2024 01:36
@ydah ydah force-pushed the bump-rbs-and-steep branch from 03e060a to 12516fa Compare December 16, 2024 05:22
@ydah ydah marked this pull request as ready for review December 16, 2024 05:23
@ydah ydah merged commit 5e819cf into ruby:master Dec 16, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants