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

Cast from union for faster type checking #830

Merged
merged 1 commit into from
Jul 3, 2023
Merged

Cast from union for faster type checking #830

merged 1 commit into from
Jul 3, 2023

Conversation

soutaro
Copy link
Owner

@soutaro soutaro commented Jul 3, 2023

Generating a shape for class_var.location takes seconds because it is a union type more than 10 constructs. nil | RBS::Location[...] | RBS::Location[...] | RBS::Location[...] | .... Giving a type RBS::Location[untyped, untyped]? beforehand makes the shape generation much faster.

This change makes type checking the validator.rb using released (and the HEAD) version of Steep faster. Not an improvement of the type checking algorithm itself.

@soutaro soutaro enabled auto-merge July 3, 2023 05:25
@soutaro soutaro merged commit 831b6b3 into master Jul 3, 2023
20 checks passed
@soutaro soutaro deleted the faster branch July 3, 2023 05:37
@soutaro soutaro added this to the Steep 1.5 milestone Jul 5, 2023
@soutaro soutaro added the Released The PR is already included in a published release label Jul 5, 2023
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.

1 participant