-
Notifications
You must be signed in to change notification settings - Fork 1.7k
failed inference on complex nested, generic closures #6338
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
Comments
I think we're hitting the (arbitrary, maybe too small) goal size limit here. We should probably increase it when other Chalk performance problems (i.e. primarily #6432) have been solved. (To debug this, I mostly ran |
@flodiebold I am a colleague of @elindsey and also involved with a project that heavily uses timely-dataflow. This issue is a big pain point for me, so I'm willing to tolerate rust-analyzer being slow or using a lot of memory if it solves the issue. I'll try compiling r-a from source myself and bumping up that 30 number; do you have any suggestions on what to set it to? (If not, I can just try something huge and report my findings) |
You'll be able to set it by env variable once #6597 is merged. I'd suggest just doubling it and seeing whether that helps. |
Is there an easy way to set env vars for rust-analyzer in vscode? (Other than setting |
@umanwizard You could just set the env variable in the environment for VSCode. |
There's also |
@lnicola I don't think that existed when I posted that message :) anyway, thanks. |
This is a somewhat complex case. On this line: https://github.com/TimelyDataflow/timely-dataflow/blob/master/timely/examples/wordcount.rs#L32
rust-analyzer fails to infer the types for input/output (showing "unknown"), and thus fails to infer most of the types in the rest of that closure as well. RLS handles this case correctly.
That example has nested closures and a multitude of generics in that call; I've tried coming up with a more minimal repro but have so far failed. Enabling server-side logging didn't turn up any errors, so I'm not entirely sure where to go from here.
Does that pattern look like something that's a currently known failure? If not, do you have any tips on other logging or methods of looking into rust-analyzer's processing to try to determine what exactly is tripping it up?
The text was updated successfully, but these errors were encountered: