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

Bug: Error parsing output from clippy #1225

Open
brynary opened this issue Nov 26, 2024 · 2 comments
Open

Bug: Error parsing output from clippy #1225

brynary opened this issue Nov 26, 2024 · 2 comments
Assignees
Labels

Comments

@brynary
Copy link
Member

brynary commented Nov 26, 2024

What happened?

Error parsing output from clippy

Clippy output includes success: false, ClippyIssue { message: None, success: Some(false), manifest_path: None, package_id: None, package_name: "", path_prefix: "" }, raw line: "{\"reason\":\"build-finished\",\"success\":false}"

What did you expect to happen?

No parse error

Can you reproduce the problem?

Yes, consistently

CLI Version

qlty 0.452.0 (3124098)

Relevant log output

https://qlty.sh/gh/qltysh/projects/qlty/builds/a25e2b82-eff1-46a1-ae89-93fc15ffdc03
@lsegal lsegal added the bug label Nov 26, 2024
@marschattha marschattha self-assigned this Nov 27, 2024
@marschattha
Copy link
Member

marschattha commented Nov 27, 2024

So we are throwing this error ourselves in case clippy failed to compile code.
https://github.com/qltysh/qlty/blob/main/qlty-check/src/parser/clippy.rs#L114

What do you think would be the desired output in this case?
Should we log a warning message onto the terminal and logs? Something like

Clippy failed to compile your code, either there is an error in your code or 
Clippy version is incompatible with your project.

Or better we should log it as an issue and move forward?

@brynary
Copy link
Member Author

brynary commented Nov 27, 2024

Hmm, let's take the qlty CLI out of the picture for the moment.

If the same problem was happening (compilation failure) and the user ran Clippy by hand without qlty, what output would they get?

I think that's a good place to start because that tells us how a user would debug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants