Skip to content

Allow filtering what proof trees are dumped to stdout via a rustc attr #113694

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

Closed
wants to merge 2 commits into from

Conversation

BoxyUwU
Copy link
Member

@BoxyUwU BoxyUwU commented Jul 14, 2023

Adds a #![rustc_filter_proof_tree_dump("...")] attribute that can be placed on the crate root to filter the output of -Zdump-solver-proof-tree=always. It works by only generating proof trees if the debug output of the root goal's predicate is the same as the string. It doesn't feel ideal although I wasn't sure how else to make something like this work- actually trying to parse goal syntax seemed far harder.

Ideally this would also work for =on_error but i haven't made that work yet. I was hoping this could be used to generate proof trees in ui tests but the output still seems kinda huge and its not deduplicated at all (the stdout file i commited literaly has the exact same proof tree Twice...) I'm not sure its actually worth adding -Zdump-solver-proof-tree to ui tests yet.

@rustbot
Copy link
Collaborator

rustbot commented Jul 14, 2023

r? @petrochenkov

(rustbot has picked a reviewer for you, use r? to override)

@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 Jul 14, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jul 14, 2023

Some changes occurred to the core trait solver

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

@BoxyUwU
Copy link
Member Author

BoxyUwU commented Jul 14, 2023

r? @compiler-errors @lcnr

@compiler-errors
Copy link
Member

@bors r+ rollup (new solver)

@bors
Copy link
Collaborator

bors commented Jul 16, 2023

📌 Commit 85bfe07 has been approved by compiler-errors

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 Jul 16, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 16, 2023
… r=compiler-errors

Allow filtering what proof trees are dumped to stdout via a rustc attr

Adds a `#![rustc_filter_proof_tree_dump("...")]` attribute that can be placed on the crate root to filter the output of `-Zdump-solver-proof-tree=always`. It works by only generating proof trees if the debug output of the root goal's predicate is the same as the string. It doesn't feel ideal although I wasn't sure how else to make something like this work- actually trying to parse goal syntax seemed far harder.

Ideally this would also work for `=on_error` but i haven't made that work yet. I was hoping this could be used to generate proof trees in ui tests but the output still seems kinda huge and its not deduplicated at all (the stdout file i commited literaly has the exact same proof tree Twice...) I'm not sure its actually worth adding `-Zdump-solver-proof-tree` to ui tests yet.
@matthiaskrgr
Copy link
Member

@bors r-
#113763
probably just needs rebase + rebless

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 16, 2023
@bors
Copy link
Collaborator

bors commented Aug 5, 2023

☔ The latest upstream changes (presumably #114492) made this pull request unmergeable. Please resolve the merge conflicts.

@Dylan-DPC
Copy link
Member

@BoxyUwU any updates on this?

@BoxyUwU BoxyUwU closed this Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

7 participants