Skip to content

Disable path trimming during graphviz output #109954

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 1 commit into from
Apr 5, 2023

Conversation

clubby789
Copy link
Contributor

Fixes #109943

We can end up pretty-printing a path for the graphviz file without emitting a diagnostic, so disable path trimming at this point.

@rustbot
Copy link
Collaborator

rustbot commented Apr 5, 2023

r? @compiler-errors

(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. labels Apr 5, 2023
@compiler-errors
Copy link
Member

Yeah, this is fine. Full paths are possibly better than trimmed ones here... Alternatively, we could defuse the delayed good-path bug if we know that we'll be emitting a graphviz file, like all the other if conditions here:

pub fn delay_good_path_bug(&self, msg: impl Into<DiagnosticMessage>) {
if self.opts.unstable_opts.print_type_sizes
|| self.opts.unstable_opts.query_dep_graph
|| self.opts.unstable_opts.dump_mir.is_some()
|| self.opts.unstable_opts.unpretty.is_some()
|| self.opts.output_types.contains_key(&OutputType::Mir)
|| std::env::var_os("RUSTC_LOG").is_some()
{

Thoughts? Otherwise, r=me.

@bors delegate+

@bors
Copy link
Collaborator

bors commented Apr 5, 2023

✌️ @clubby789 can now approve this pull request

@clubby789
Copy link
Contributor Author

Hmm, we can check there if we've asked for graphs on the command line but I don't see an easy way to check for the linked case, where it's being emitted due to an attribute (other than adding some is_emitting_graphviz field to the sess which doesn't sound good to me)

@compiler-errors
Copy link
Member

Reasonable enough

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 5, 2023

📌 Commit 422c330 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 Apr 5, 2023
@bors
Copy link
Collaborator

bors commented Apr 5, 2023

⌛ Testing commit 422c330 with merge a412564...

@bors
Copy link
Collaborator

bors commented Apr 5, 2023

☀️ Test successful - checks-actions
Approved by: compiler-errors
Pushing a412564 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 5, 2023
@bors bors merged commit a412564 into rust-lang:master Apr 5, 2023
@rustbot rustbot added this to the 1.70.0 milestone Apr 5, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (a412564): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.4% [-0.4%, -0.4%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.5% [1.5%, 1.5%] 1
Improvements ✅
(primary)
-2.9% [-2.9%, -2.9%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.9% [-2.9%, -2.9%] 1

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.4% [3.4%, 3.4%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.6% [-2.7%, -2.5%] 2
All ❌✅ (primary) - - 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compile error
5 participants