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

Add tracing to rustc_codegen_spirv #193

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

LegNeato
Copy link
Collaborator

@LegNeato LegNeato commented Jan 2, 2025

Fixes #192

@LegNeato
Copy link
Collaborator Author

LegNeato commented Jan 2, 2025

Open questions:

  1. Do we want to do it in __rustc_codegen_backend() so we can trace very early?
  2. Do we want to use our own env var? (I mirrored it off rustc and rustdoc, but I can see a case for reusing RUSTC_LOG)
  3. Do we want a tracing feature that completely compiles tracing-related code out if we want? There is some non-trivial work in Replace printing codegen args with tracing #196 to generate info for the logs. It looks like tracing has a couple of knobs to query, so I gated code behind that but it will still be in the binary. I would lean towards compiling it in always without a feature, as that is what rustc does
  4. Do we want a test? We can probably put an "I am alive" type log item and then run a passing compiletest asserting on the stderr output.

@LegNeato
Copy link
Collaborator Author

LegNeato commented Jan 2, 2025

tokio-rs/tracing#3183 for nu-ansi-term version fix.

@LegNeato
Copy link
Collaborator Author

LegNeato commented Jan 2, 2025

I'm not sure I agree with the lint...I am mirroring what rustc and rustdoc do themselves. Thoughts? Should I change it to only use codegen args? For now I have updated the lint to allow it.

@LegNeato
Copy link
Collaborator Author

LegNeato commented Jan 2, 2025

tokio-rs/tracing#3184 for regex stuff.

@LegNeato LegNeato force-pushed the tracing branch 3 times, most recently from 6621970 to 892f3d8 Compare January 3, 2025 02:49
@LegNeato
Copy link
Collaborator Author

LegNeato commented Jan 3, 2025

I am not going to document this until a future PR where there is actually logging in place.

@LegNeato LegNeato changed the title Add tracing to rustc_codegen_spirv Add tracing to rustc_codegen_spirv Jan 3, 2025
@LegNeato LegNeato enabled auto-merge January 5, 2025 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add tracing support to rustc_codegen_spirv
1 participant