8000 Dedup error message on ancestors check by ksss · Pull Request #1515 · soutaro/steep · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Dedup error message on ancestors check #1515

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

Merged
merged 1 commit into from
Mar 11, 2025
Merged

Dedup error message on ancestors check #1515

merged 1 commit into from
Mar 11, 2025

Conversation

ksss
Copy link
Contributor
@ksss ksss commented Mar 8, 2025

In ancestors error checking, the same issue may be reported multiple times.

$ cat sample.rbs
class InheritModule < Kernel
end

$ bundle exec steep check
# Type checking files:

F

sample.rbs:1:22: [error] Cannot inherit from a module `::Kernel`
│ Diagnostic ID: RBS::InheritModuleError
│
└ class InheritModule < Kernel
                        ~~~~~~

sample.rbs:1:22: [error] Cannot inherit from a module `::Kernel`
│ Diagnostic ID: RBS::InheritModuleError
│
└ class InheritModule < Kernel
                        ~~~~~~

Detected 2 problems from 1 file

This happens because both #one_instance_ancestors and #one_singleton_ancestors in RBS::DefinitionBuilder::AncestorBuilder generate the same error.

This issue can be reproduced by running the following command in the smoke/diagnostics-rbs directory:

$ bundle exec steep check --save-expectations=test_expectations.yml

So far, this issue seems to occur only in ancestors checking.

Therefore, I propose limiting the deduplication to this specific case.

@soutaro soutaro added this to the Steep 1.10 milestone Mar 10, 2025
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.

👍

@soutaro soutaro merged commit 563b9df into soutaro:master Mar 11, 2025
17 checks passed
@ksss ksss deleted the dedup branch March 11, 2025 06:59
@soutaro soutaro added the Released The PR is already included in a published release label Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Released The PR is already included in a published release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0