-
Notifications
You must be signed in to change notification settings - Fork 57
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
color-spantrace: print_source_if_avail: can't extract source if working dir is crate in workspace #164
Comments
Basically, normally you'd get the following:
Because of the bug I got:
|
Aah yea, I have a PR that attempts to fix this but I never figured out the proper way to resolve the relative paths we should be searching in and ended up forgetting about the PR, I should really try to finish that one... |
I think Cargo should offer the root directory of the current base directory (the workspace or the standalone dir) as an environment variable, but it seems this doesn't exist. Maybe |
Hi,
I'm debugging my PR for
color_eyre
at the moment. For some reason, the source code lines were not printed out.The reason was, that I'm using a workspace and that tracing_core::metadata::Metadata contains a file path relative to the workspace, not my current working directory.
So I'm in "$workspace/color_eyre" and execute a test.
This line is then executed because
filename
is "color-spantrace/tests/color_schemes.rs" – which is relative to the workspace, not my current working directory:I believe this is only a problem for people who work on
color_spantrace
, and not for end-users who installcolor_spantrace
via cargo (but I'm not 100% sure).I'm reporting this in case there is an easy workaround (I can't see one), or in case this could lead to problems for end-users.
Feel free, to close this if you don't think this is a problem.
Maybe a note in the README for people who want to work on
color_spantrace
would make sense?The text was updated successfully, but these errors were encountered: