A new phenomenon is driving me crazy. I have a program that reads a config file containing JSON. Until recently, I could edit the config file and rerun my program without it building. Now it builds on every edit. That's not much of a problem, but the 20 seconds or so it takes to build seems like an eternity compared to the earlier behavior.
The problem occurs with "cargo run" from the command line on a Mac running cargo 1.37.0. The only change I can think of was adding the config file to my github repository.
Shot in the dark here, but are you using any GUI git frontend or virtual git filesystem or anything that could be making the modification dates change unexpectedly?
Huh. What's the config file being used for? If it's consumed by a build.rs file, for example, it would trigger a rebuild. If it's just a file your program is loading at runtime, this is surprising behavior.
Do you have a build.rs at all? If you do, then cargo defaults to rebuilding if any file in your project changes (because it doesn't know which ones the build script might read). The build.rs can output cargo:rerun-if-changed lines to override this default.