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

Fixes for some RBS errors within steep gem #668

Merged
merged 2 commits into from
Nov 21, 2022
Merged

Conversation

amatsuda
Copy link
Contributor

While running steep check on my app, I got some errors raised from inside Steep gem. I soon learned from the documentation that I could mute these errors by adding ignore entry in my rbs_collection.yaml, but anyway it'd be better for steep not to raise when being type checked, so here are my quick fixes for two of them.

I'm sorry though, I couldn't fix all the errors. I'm still seeing the following error, but I'll leave it untouched because I'm not sure what is the proper fix.

.../steep/sig/steep/subtyping/check.rbs:100:44: [error] Type application of `::Steep::Subtyping::Relation` doesn't satisfy the constraints: (::Steep::Interface::Block | nil) <: ::Object
│ Diagnostic ID: RBS::UnsatisfiableTypeApplication
│
└       def expand_block_given: (Symbol name, Relation[Interface::Block?] relation) -> (Relation[Interface::Block] | true | Result::t)

Fixes [error] Instance variable cannot have different type with parents: (::RBS::Resolver::TypeNameResolver | nil) <=> ::RBS::Resolver::TypeNameResolver
Fixes [error] Type `::Steep::Subtyping::Relation` is generic but used as a non generic type
@@ -384,11 +384,11 @@ module Steep
class IncompatibleAnnotation < Base
attr_reader result: Subtyping::Result::Base

attr_reader relation: Subtyping::Relation
attr_reader relation: Subtyping::Relation[untyped]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this can be typed stricter? Tell me if so.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be... I'm not sure what the type should be. 🥲

Copy link
Owner

@soutaro soutaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@soutaro soutaro enabled auto-merge November 21, 2022 07:05
@soutaro soutaro merged commit 2aebd80 into soutaro:master Nov 21, 2022
@soutaro soutaro added this to the Steep 1.3 milestone Nov 22, 2022
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