feat: Only flycheck workspace that belongs to saved file#12808
feat: Only flycheck workspace that belongs to saved file#12808bors merged 5 commits intorust-lang:masterfrom
Conversation
|
Okay so I got a fix for the remaining problem, but somehow cargo is refusing to send diagnostics at some point. It works once and then never again for any but the last workspace... |
|
Ye so |
|
What if one workspace depends on a crate from the other workspace? For example if I edit cranelift-codegen it would be nice if cg_clif gets recompiled. I can't put cranelift-codegen in cg_clif's workspace as it is already in a different workspace and as it is used as |
|
Okay, so I think I am hitting a cargo bug now? I basically have three workspaces all of which have errors in them. When r-a starts up it starts a flycheck process for each and we get diagnostics for all three. But due to how r-a works we redo this a few times at the start (like 2 or 3 times due to VFS change reloads), now here is where it gets weird, all following flychecks report successfull builds on the first two workspaces while the last one still errors, and this keeps happening unless the workspaces are flychecked on their own. So it seems cargo gets confused when multiple checks are running at the same time? |
|
Lovely, so I guess we can't do this until that gets fixed. I assume there is no issue on the cargo issue tracker regarding this yet? |
|
The thing is, I can't reproduce this (outside of RA) with |
|
We also have the |
f2b219c to
df7f755
Compare
|
Turns out triggering the cargo bug doesnt always occur and I changed some things around so we don't start a bunch of flycheck in the middle of fetching the workspace which should surpress the bug from occuring mostly. I'll merge this for now, we'll see if this causes trouble though from my testing it should work fine. |
|
☀️ Test successful - checks-actions |
| if let Some(path) = vfs.file_path(file.file_id).as_path() { | ||
| let path = path.to_path_buf(); | ||
| if reload::should_refresh_for_change(&path, file.change_kind) { | ||
| tracing::warn!("fetch-fiel_change"); |
There was a problem hiding this comment.
Should be removed or changed to info!?
There was a problem hiding this comment.
was already removed in a follow up

Supercedes #11038
There is still the problem that all the diagnostics are cleared, only clearing diagnostics of the relevant workspace isn't easily doable though I think, will have to dig into that