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

tokio-console cannot handle window path correctly #550

Open
hi-rustin opened this issue May 9, 2024 · 0 comments
Open

tokio-console cannot handle window path correctly #550

hi-rustin opened this issue May 9, 2024 · 0 comments
Assignees
Labels
C-console Crate: console. S-bug Severity: bug

Comments

@hi-rustin
Copy link
Collaborator

hi-rustin commented May 9, 2024

What crate(s) in this repo are involved in the problem?

tokio-console

What is the issue?

image

Although the output seems correct for this 'app' example, it actually isn't. The problem arises because when we use the spawn function, it uses std::panic::Location::caller to get the file location. I printed the location we received from the console-subscriber on Windows, which is console-subscriber\examples\app.rs:68:10. Unfortunately, this doesn't match the regex, so we end up calling toString(), which results in console-subscriber\examples\app.rs:68:10.

How can the bug be reproduced?

Run tokio-console on the Windows.

Logs, error output, etc

No response

Versions

cargo run -- -V
   Compiling tokio-console v0.1.10 (/Volumes/t7/code/console/tokio-console)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 4.07s
     Running `target/debug/tokio-console -V`
tokio-console 0.1.10

Possible solution

To fix this problem, I will test more cases on Windows and improve the regex to support Windows path. But I don't think we should do it in this PR. I will open a new PR to fix it.

Additional context

ref #541 (comment)

Would you like to work on fixing this bug?

yes

@hi-rustin hi-rustin added S-bug Severity: bug C-console Crate: console. labels May 9, 2024
@hi-rustin hi-rustin self-assigned this May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-console Crate: console. S-bug Severity: bug
Projects
None yet
Development

No branches or pull requests

1 participant