-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Monomorphised log statements have the wrong path in the crate_map #3046
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
I'm particularly expecting to see http_client in the log map |
Right now i'm thinking this is specifically a problem compiling the module map for logs in the top-level module. http_client's log statements are all in the top level, and they work when compiling with --test, but not when used as a library. |
Indeed, when I add log statements to |
The log statements are all inside a generic class, so they are not being compiled with the http_client crate. so what are they being called? |
Updated the OP to reflect the actual problem. |
I think this can be fixed by converting log to a macro that uses other macros to get the module path during the original syntax expansion. |
This may also be related to the fact that inlining does not preserve span information atm. (#1972) |
Oh, reading more of your comments, I think I was wrong. |
I don't believe this is backwards incompatible, renominating. |
just a bug, removing milestone/nomination. |
accepted for production-ready milestone |
Rustup also more ABI compat tests
Adds a hidden `--crate-name` option to standalone Kani (i.e., `kani`) only. This option allows users to override the crate name used during the compilation of single-file Rust programs, making it easier to apply Kani to non-Cargo projects (see rust-lang#3046 for more details). Resolves rust-lang#3046
If you write
RUST_LOG=::help ./servo
you get a list that includes modules from core, std, and servo, but not any of the many other used crates. As a result I can't turn logging on for a lot of stuff. Probably we're hitting some arbitrary limit.Edit:
When a generic function in crate
http_client
gets monomorphised when compilingservo
, then you have to useRUST_LOG=servo
to turn the logs on instead ofRUST_LOG=http_client
. The problem is this line in trans:It prepends the current crate's name to every logging key, so logs for
http_client::response_header
end up asservo::response_header
.The text was updated successfully, but these errors were encountered: