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

Limited feedback in large VS Code workspace #2202

Open
djc opened this issue Nov 10, 2019 · 14 comments
Open

Limited feedback in large VS Code workspace #2202

djc opened this issue Nov 10, 2019 · 14 comments
Labels
C-support Category: support questions E-unknown It's unclear if the issue is E-hard or E-easy without digging in S-actionable Someone could pick this issue up and work on it right now

Comments

@djc
Copy link

djc commented Nov 10, 2019

I have a largish VS Code workspace; at the moment it contains 13 projects, each of these contains one crate or virtual workspace in the root. After starting VS Code, rust-analyzer reports "workspace loaded, 2268 rust packages", and there's no output in the debug console.

However, after loading this workspace, I only get very limited feedback from rust-analyzer. For example, if I change a field name to be incorrect, there's no error (as in, red underlining). However, syntax errors are correctly flagged (for example, if I remove the comma between two items in imports).

I'm using rust-analyzer master as my daily driver, updated every few days. Currently running 9d786ea.

@bjorn3
Copy link
Member

bjorn3 commented Nov 10, 2019

For example, if I change a field name to be incorrect, there's no error (as in, red underlining).

That kind of errors comes from cargo watch I believe, not ra itself. Does cargo watch get run for all cargo workspaces/projects?

@djc
Copy link
Author

djc commented Nov 10, 2019

I have "Enable Cargo Watch On Startup" set to true in the VS Code config, if that's what you're asking.

@bjorn3
Copy link
Member

bjorn3 commented Nov 10, 2019

I was thinking about if the ra ext does actually run cargo watch for all projects of a vscode workspace.

@djc
Copy link
Author

djc commented Nov 10, 2019

@matklad seems to suggest it should work in #1834 (comment).

@djc
Copy link
Author

djc commented Nov 14, 2019

@matklad do you have any feedback on what might be going on here? Is there something else I could do to debug this? I'd be potentially down with hacking on this if there is a clear path to get it working again.

@matklad
Copy link
Member

matklad commented Nov 14, 2019

Haven't looked into this yet, but my understanding is that, while in theory we support multi-workspace setups, no plumbing has been done to actually enable this.

Hm, now that I actually look at the code, there's code that tries to handle this use-case

I am not sure if this code actually works (as you can guess from the fact that I don't even remmeber that this code exists :) ), as I am not using multi-workspace myself.

So, the thing to do here would be:

  • add some printfs around that lines, to see if they actually work
  • add a multi-workspace workspace test to heavy_tests.rs (semi-unrelated, but we should refactor heavy-tests such that there's only a single heavy test that check everything, because initint a heavy test is really slow).

@matklad matklad added the E-unknown It's unclear if the issue is E-hard or E-easy without digging in label Nov 14, 2019
@djc
Copy link
Author

djc commented Nov 28, 2019

I've been setting up a new machine where I actually saw this working. My current hypothesis is that it'll fail if one of the workspaces has a compilation bug (or potentially a dependency conflict).

@daern91

This comment was marked as off-topic.

@lnicola

This comment was marked as off-topic.

@lnicola lnicola added the S-actionable Someone could pick this issue up and work on it right now label Jan 27, 2021
@djc
Copy link
Author

djc commented Jan 27, 2021

@daern91 seems to be talking about a Cargo workspace, whereas I was talking about a VS Code workspace that contained many projects, where each project is its own Cargo workspace. Do you have reason to assume this works now? I moved away from working like that because of this bug.

@daern91

This comment was marked as off-topic.

@cheako

This comment was marked as off-topic.

@flodiebold

This comment was marked as off-topic.

@flodiebold

This comment was marked as off-topic.

@flodiebold flodiebold added the C-support Category: support questions label Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-support Category: support questions E-unknown It's unclear if the issue is E-hard or E-easy without digging in S-actionable Someone could pick this issue up and work on it right now
Projects
None yet
Development

No branches or pull requests

7 participants