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

Replace printing codegen args with tracing #196

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,16 @@ clippy_no_features examples/shaders/simplest-shader
# which could be disastrous because env vars access can't be tracked by
# `rustc`, unlike its CLI flags (which are integrated with incremental).
if (
egrep -r '::\s*env|env\s*::' crates/rustc_codegen_spirv/src/ |
egrep -r '::\s*env|env\s*::' crates/rustc_codegen_spirv/src |
# HACK(eddyb) exclude the one place in `rustc_codegen_spirv`
# needing access to an env var (only for codegen args `--help`).
egrep -v '^crates/rustc_codegen_spirv/src/codegen_cx/mod.rs: let help_flag_comes_from_spirv_builder_env_var = std::env::var\(spirv_builder_env_var\)$'
egrep -v '^crates/rustc_codegen_spirv/src/codegen_cx/mod.rs: let help_flag_comes_from_spirv_builder_env_var = std::env::var\(spirv_builder_env_var\)$' |
# HACK(LegNeato) exclude logging. This mirrors `rustc` (`RUSTC_LOG`) and
#`rustdoc` (`RUSTDOC_LOG`).
# There is not a risk of this being disastrous as it does not change the build settings.
egrep -v '^crates/rustc_codegen_spirv/src/lib.rs:.*(RUSTGPU_LOG|RUSTGPU_LOG_FORMAT|RUSTGPU_LOG_COLOR).*$' |
egrep -v '^crates/rustc_codegen_spirv/src/lib.rs: use std::env::{self, VarError};$'

); then
echo '^^^'
echo '!!! Found disallowed `std::env` usage in `rustc_codegen_spirv` !!!'
Expand Down
Loading