#777·shuttle

[Bug]: cargo shuttle run in combination with rust-analyzer causes recompile pingpong

Author: pogopauleCreated Apr 1, 2023Updated Mar 12, 2025
LabelsS-Not Planned

What happened?

First of all, there is already an issue describing the same problem, but it has been closed. For me the problem is still present and the solution described there does not work since I don't use VSCode, but Neovim.

The Problem

  1. Launch Neovim (with lsp configured for rust-analyzer)
  2. Open one of the example shuttle projects and let rust-analyzer finish
  3. Run cargo shuttle run in another terminal -> triggers a partial rebuild
  4. Go back to Neovim and make a tiny change, e.g. change a string -> triggers a partial rebuild by rust-analyzer
  5. Goto 3.

If I do a cargo build in step 3 the partial rebuild does not occur. Only a cargo shuttle run does so.

I assume that cargo shuttle run and rust-analyzer launched by neovim somehow partially invalidate each others caches (see Links section below). I don't understand both tools well enough to debug the issue on my own.

My setup

  • NixOS 22.11
  • Neovim 0.8.3 with rust-analyzer version 2023-03-27

Links

Here are a few links to resources pointing into a similar direction, but didn't help me:

Version

0.13.0

Which operating systems are you seeing the problem on?

Linux

Which CPU architectures are you seeing the problem on?

x86_64

Relevant log output

No response

Duplicate declaration

  • I have searched the issues and there are none like this.