Skip to content
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

rustc_log: provide a way to init logging based on the values, not names, of the env vars #117814

Merged
merged 2 commits into from
Nov 15, 2023

Conversation

RalfJung
Copy link
Member

Miri wants to affect how rustc does logging. So far this required setting environment variables before calling rustc_driver::init_rustc_env_logger. However, set_var is a function one should really avoid calling, so this adds the necessary APIs to rustc such that Miri can just pass it the values of all the log-relevant environment variables, rather than having to change the global environment.

@rustbot
Copy link
Collaborator

rustbot commented Nov 11, 2023

r? @TaKO8Ki

(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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Nov 11, 2023
@rustbot
Copy link
Collaborator

rustbot commented Nov 11, 2023

The Miri subtree was changed

cc @rust-lang/miri

@RalfJung RalfJung force-pushed the rustc-logger-without-set-var branch from d61eda3 to 19b5600 Compare November 11, 2023 12:51
@rust-log-analyzer

This comment has been minimized.

@RalfJung RalfJung force-pushed the rustc-logger-without-set-var branch from 19b5600 to 6317583 Compare November 11, 2023 13:19
@rust-log-analyzer

This comment has been minimized.

@RalfJung RalfJung force-pushed the rustc-logger-without-set-var branch from 6317583 to 86e5d36 Compare November 11, 2023 14:24
@TaKO8Ki
Copy link
Member

TaKO8Ki commented Nov 15, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Nov 15, 2023

📌 Commit 86e5d36 has been approved by TaKO8Ki

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 Nov 15, 2023
@bors
Copy link
Contributor

bors commented Nov 15, 2023

⌛ Testing commit 86e5d36 with merge ee85f7f...

@bors
Copy link
Contributor

bors commented Nov 15, 2023

☀️ Test successful - checks-actions
Approved by: TaKO8Ki
Pushing ee85f7f to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 15, 2023
@bors bors merged commit ee85f7f into rust-lang:master Nov 15, 2023
12 checks passed
@rustbot rustbot added this to the 1.76.0 milestone Nov 15, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (ee85f7f): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

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)
2.2% [2.2%, 2.2%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.4% [-3.6%, -3.3%] 2
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 674.6s -> 675.537s (0.14%)
Artifact size: 311.10 MiB -> 311.09 MiB (-0.00%)

@RalfJung RalfJung deleted the rustc-logger-without-set-var branch November 16, 2023 09:25
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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants