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

Continued flycheck issues with newest version #18875

Closed
mattklein123 opened this issue Jan 7, 2025 · 11 comments
Closed

Continued flycheck issues with newest version #18875

mattklein123 opened this issue Jan 7, 2025 · 11 comments
Labels
A-flycheck issues with flycheck a.k.a. "check on save" C-bug Category: bug

Comments

@mattklein123
Copy link

This is a a follow up from #18854. I don't think the underlying issue(s) are completely fixed. I just saw an example of a squiggly not going away when it should. I don't have a repro but I will report back if I find one.

@mattklein123 mattklein123 added the C-bug Category: bug label Jan 7, 2025
@lnicola
Copy link
Member

lnicola commented Jan 7, 2025

There's also #18864 which might help, I can trigger a pre-release build if you want to test it (or you can try one tomorrow).

@lnicola lnicola added the A-flycheck issues with flycheck a.k.a. "check on save" label Jan 7, 2025
@gbbosak
Copy link
Contributor

gbbosak commented Jan 8, 2025

I'm also seeing issues in the latest release on Fuchsia.

@gbbosak
Copy link
Contributor

gbbosak commented Jan 8, 2025

In my case, the diagnostics show up while Cargo is running, then disappear as soon as the invocation finishes (clearing valid errors)

@robinhundt
Copy link

I'm encountering the same issue in one codebase but not another. The only difference I can currently spot is the problematic one is a workspace, the other not.

@gbbosak
Copy link
Contributor

gbbosak commented Jan 8, 2025

I think the issue is that non-Cargo build systems don't have a package_id, so for those systems, trying to clear based on whether or not a package_id was received is incorrect (and it should instead be based on whether or not any diagnostics were received). I'd assume that the following would fix this (though I can't test this as we roll in prebuilt rust_analyzers and can't test specific builds in our setup).

  • On a new flycheck run, clear any existing diagnostics for good measure
  • Add new diagnostics

Since diagnostics from the previous run get cleared before new ones are added, I think this should solve the issue where the build system doesn't have a concept of Rust package ids.

@Veykril
Copy link
Member

Veykril commented Jan 8, 2025

I think the issue is that non-Cargo build systems don't have a package_id, so for those systems, trying to clear based on whether or not a package_id was received is incorrect (and it should instead be based on whether or not any diagnostics were received).

That's what #18864 did

@lnicola
Copy link
Member

lnicola commented Jan 8, 2025

Please update to v0.3.2257 and see if this still happens.

@gbbosak
Copy link
Contributor

gbbosak commented Jan 8, 2025

Thanks! It's fixed for us now!

@lnicola
Copy link
Member

lnicola commented Jan 8, 2025

Optimistically closing this. Do say if you run into it again.

@lnicola lnicola closed this as completed Jan 8, 2025
@mattklein123
Copy link
Author

@lnicola I can open a new issue but one behavior change I have noticed is the following: in a project with multiple crates, a compilation error in a dependent crate no longer clears flycheck errors/squiggles in dependee crates. Personally I find this confusing and prefer the old behavior. If this is a bug I can open a new issue on that.

@Veykril
Copy link
Member

Veykril commented Jan 9, 2025

Basically you have crate A depend on B, A has errors, now you change things such that B has errors. B gets updated to show the errors but A is not being cleared? Indeed I think that should be improved (we should clear everything untouched at the end)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-flycheck issues with flycheck a.k.a. "check on save" C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

5 participants