Skip to content

Tweak debug outputs to make debugging new solver easier#109956

Merged
bors merged 1 commit into
rust-lang:masterfrom
compiler-errors:tweak-debug-outputs
Apr 5, 2023
Merged

Tweak debug outputs to make debugging new solver easier#109956
bors merged 1 commit into
rust-lang:masterfrom
compiler-errors:tweak-debug-outputs

Conversation

@compiler-errors

Copy link
Copy Markdown
Contributor
  1. Move the fields that are "most important" (I know this is subjective) to the beginning of the structs.

For goals, I typically care more about the predicate than the param-env (which is significantly longer in debug output).
For canonicalized things, I typically care more about what is being canonicalized.
For a canonical response, I typically care about the response -- or at least, it's typically useful to put it first since it's short and affects the whether the solver recurses or not...

  1. Add some more debug and instrument calls to functions to add more structure to tracing lines.

r? @oli-obk or @BoxyUwU (since I think @lcnr is on holiday)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Apr 5, 2023
@rustbot

rustbot commented Apr 5, 2023

Copy link
Copy Markdown
Collaborator

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

@oli-obk

oli-obk commented Apr 5, 2023

Copy link
Copy Markdown
Contributor

Yea, it's annoying that we have to print debug-logged structs in a single line. I wonder if we should start deriving Valuable and then teaching tracing-tree to render these values in multiple lines.

@oli-obk

oli-obk commented Apr 5, 2023

Copy link
Copy Markdown
Contributor

@bors r+ rollup

@bors

bors commented Apr 5, 2023

Copy link
Copy Markdown
Collaborator

📌 Commit 786fc90 has been approved by oli-obk

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 5, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 5, 2023
Rollup of 6 pull requests

Successful merges:

 - rust-lang#107236 (Add T-bootstrap label to tools)
 - rust-lang#109847 (Only create graphviz nodes for reachable MIR bb's)
 - rust-lang#109848 (submodule detection for proper fix on rust-lang#96188)
 - rust-lang#109932 (Source code scrollbar)
 - rust-lang#109952 (Move comment about python2 closer to the place it's used)
 - rust-lang#109956 (Tweak debug outputs to make debugging new solver easier)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 038ece0 into rust-lang:master Apr 5, 2023
@rustbot rustbot added this to the 1.70.0 milestone Apr 5, 2023
@compiler-errors compiler-errors deleted the tweak-debug-outputs branch August 11, 2023 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants