-
Notifications
You must be signed in to change notification settings - Fork 13k
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
make MIR graphviz generation use gsgdt #78399
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @oli-obk (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
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.
cc @rust-lang/wg-mir-opt
a09a9f8
to
d5bc68e
Compare
☔ The latest upstream changes (presumably #78267) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:
|
@vn-ki - I just saw this PR was mentioned after bors landed a conflicting commit from my PR #78267 . I like your goals of moving graphviz code out of rustc. Note that my PR added a generic_graphviz.rs implementation, based mostly on the MIR graphviz.rs in the same directory. I needed a MIR-like graphviz output for coverage graphs, but didn't want to create another type-specific 1-off. You may need to look that over and decide how to work in your changes, whether replacing my implementation or not. FYI, I implemented enough hooks (by generic handler functions) to support the coverage graph, but not all of the hooks required to completely implement an equivalent to the existing MIR graphviz.rs implementation. It wouldn't be hard to extend generic_graphviz.rs to do that though. But you may or may not want to consider that approach. (If this is even relevant to your change.) |
gsgdt [https://crates.io/crates/gsgdt] is a crate which provides an interface for stringly typed graphs. It also provides generation of graphviz dot format from said graph.
This PR does not intend to touch coverage graphs, so I guess both implementations will be in rustc (for now). I will move the rest of the graphviz consumers to gsgdt in future PRs, and then we will be able to finally remove all graphviz code. Most of the current logic in |
@rustbot modify labels: +S-waiting-on-review -S-waiting-on-author |
@bors r+ |
📌 Commit 86a7831 has been approved by |
🌲 The tree is currently closed for pull requests below priority 100, this pull request will be tested once the tree is reopened |
let label = node(def_id, block); | ||
|
||
let (title, bgcolor) = if data.is_cleanup { | ||
(format!("{} (cleanup)", block.index()), "lightblue") |
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.
I just noticed you missed a bug fix during the rebase conflict resolution:
This should be:
let color = if dark_mode { "royalblue" } else { "lightblue" };
(format!("{} (cleanup)", block.index()), color)
See line 116 in the deleted sections of graphviz.rs
@bors r- |
💔 Test failed - checks-actions |
@rust-lang/infra bors seems to have tried to merge this PR even though it shouldn't have been in the approved state. That, or someone |
Also, Oli's |
Should I have cc'd Pietro instead? I know they work on bors, and they don't seem to be on the infra GH team... |
Pietro is absolutely on the infra GH team and you should always ping the team. I think once bors starts testing you need to r- retry. |
Ah, GitHub was only showing three team members in the hovercard, so it confused me.
Hmm, maybe that should be changed so just an |
I also hit this. TL;DR I think you can hotfix this by adapting the test, the changes should not affect what is being tested. diff --git a/src/tools/clippy/tests/ui/crashes/used_underscore_binding_macro.rs b/src/tools/clippy/tests/ui/crashes/used_underscore_binding_macro.rs
index 6d2124c12fe..c57a45dc7aa 100644
--- a/src/tools/clippy/tests/ui/crashes/used_underscore_binding_macro.rs
+++ b/src/tools/clippy/tests/ui/crashes/used_underscore_binding_macro.rs
@@ -1,10 +1,9 @@
-#![allow(clippy::useless_attribute)] //issue #2910
+// edition:2018
-#[macro_use]
-extern crate serde_derive;
+use serde::Deserialize;
/// Tests that we do not lint for unused underscores in a `MacroAttribute`
/// expansion
#[deny(clippy::used_underscore_binding)]
#[derive(Deserialize)]
struct MacroAttributesTest { Long story: Clippy tries to avoid this problem by adding This is a long-standing issue in Clippy, which would be fixed by knowing the exact libraries cargo used when building |
@oli-obk this is ready for review |
@bors r+ |
📌 Commit 6fe31e7 has been approved by |
make MIR graphviz generation use gsgdt gsgdt [https://crates.io/crates/gsgdt] is a crate which provides an interface for stringly typed graphs. It also provides generation of graphviz dot format from said graph. This is the first in a series of PRs on moving graphviz code out of rustc into normal crates and then implementating graph diffing on top of these crates. r? `@oli-obk`
make MIR graphviz generation use gsgdt gsgdt [https://crates.io/crates/gsgdt] is a crate which provides an interface for stringly typed graphs. It also provides generation of graphviz dot format from said graph. This is the first in a series of PRs on moving graphviz code out of rustc into normal crates and then implementating graph diffing on top of these crates. r? ``@oli-obk``
make MIR graphviz generation use gsgdt gsgdt [https://crates.io/crates/gsgdt] is a crate which provides an interface for stringly typed graphs. It also provides generation of graphviz dot format from said graph. This is the first in a series of PRs on moving graphviz code out of rustc into normal crates and then implementating graph diffing on top of these crates. r? ```@oli-obk```
☀️ Test successful - checks-actions |
make MIR graphviz generation use gsgdt gsgdt [https://crates.io/crates/gsgdt] is a crate which provides an interface for stringly typed graphs. It also provides generation of graphviz dot format from said graph. This is the first in a series of PRs on moving graphviz code out of rustc into normal crates and then implementating graph diffing on top of these crates. r? `@oli-obk`
gsgdt [https://crates.io/crates/gsgdt] is a crate which provides an
interface for stringly typed graphs. It also provides generation of
graphviz dot format from said graph.
This is the first in a series of PRs on moving graphviz code out of rustc into normal crates and then implementating graph diffing on top of these crates.
r? @oli-obk