Skip to content

[Request-evaluator] Improve debuggability #17277

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 4 commits into from
Jun 16, 2018

Conversation

DougGregor
Copy link
Member

Improve debuggability of the request-evaluator:

  • Add pretty stack traces for all requests being evaluated
  • Add a -debug-cycles frontend option to dump cycles when we encounter them (without affecting type checking behavior)
  • Improve output of the dependency dumps with color and cycle highlighting

Print out the stack of requests being evaluated when we crash, so we can see
the dependency chain the triggered the crash.
As a debugging aid, introduce a new frontend flag `-debug-cycles` that
will emit a debug dump whenever the request-evaluator encounters a cyclic
dependency, while otherwise allowing compilation to continue.
When dumping dependencies, clean up the output in two ways:

* Elide redundant but (non-cyclic) references to the same dependency.
* When dumping a cycle, highlight the path to the cycle so it stands out.
@DougGregor DougGregor force-pushed the evaluator-debug-cycle-diags branch from 37f7fc1 to 7bf8623 Compare June 16, 2018 20:06
@DougGregor
Copy link
Member Author

@swift-ci please smoke test and merge

@swift-ci swift-ci merged commit b4d3a98 into swiftlang:master Jun 16, 2018
@DougGregor DougGregor deleted the evaluator-debug-cycle-diags branch June 16, 2018 21:36
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