-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[ConstraintSystem] Improve connected components printing in the type inference algorithm debug output #59971
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
[ConstraintSystem] Improve connected components printing in the type inference algorithm debug output #59971
Conversation
f06a2c0
to
ad86ec2
Compare
716e93f
to
020da92
Compare
020da92
to
7aa60d4
Compare
7aa60d4
to
d079755
Compare
57f5c19
to
8c9a341
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I left a few small comments inline.
…splayed during component step.
…r for Active Scope starting index for use in printing.
8c9a341
to
6f6e089
Compare
…heck that bindings exist before printing.
6f6e089
to
6d55c52
Compare
} | ||
log.indent(CS.solverState->getCurrentIndent()); | ||
|
||
if (disjunction) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and conjunction section prints a selected disjunction/conjunction instead of all of them but let’s address that in a follow up PR instead of holding this one.
@swift-ci please test |
The connected components will explicitly state the type variables currently in scope, their initial possible bindings, and the next type variable eligible for evaluation. Additionally, any new type variables, constraints or equivalence classes found, added, and removed as a result of the solver step attempt will be listed under a new section called
Changes
For each component under evaluation, an
Current Bindings
section will present the initial type variable bindings and disjunctions/conjunctions.For example:
will now print as:
When a new type variable, equivalence class or constraint is removed or added during a solving attempt, a
Changes
section will present these updated type variables and constraints. For example:will now print the following
Changes
: