Skip to content

Error/Warnings on save take a long time to disappear on crates with big dependents #18283

Closed
@Strackeror

Description

@Strackeror

So, in the project I'm working on, we have a big workspace with a graph of about a dozen crates. Generally this works fine, but I've realized that sometimes the inline errors/warnings take a lot longer to appear than others.

Investigating that, I realized this is mostly a problem in the crates that are depended on by a lot of other crates, and especially in the hodgepodge 'utils' crate that literally every other crate in the workspace uses. I also realized that, weirdly, while errors appear very quickly after saving a file in the utils crate, they take a lot longer to disappear.

What seems to be happening is that when you save a file, errors/warnings appear progressively, or as soon as the file's crate is checked. But the full graph of dependent crates needs to be checked for the errors to disappear.

I made a minimal way to reproduce this here, where we have a main crate that artificially takes long to compile (with a proc macro that waits for 10s). that depends on a 'dep' crate. example.zip
Editing the 'dep' create has that weird dev experience where errors appear super quick, but you need 10 full seconds to confirm they are gone. I've tried in both vscode and helix to confirm this wasn't specific to either.

Is this a bug ? Is there a workaround ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-flycheckissues with flycheck a.k.a. "check on save"C-supportCategory: support questions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions