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

cargo watch Constantly Recompiles #827

Closed
eignnx opened this issue May 28, 2019 · 6 comments
Closed

cargo watch Constantly Recompiles #827

eignnx opened this issue May 28, 2019 · 6 comments

Comments

@eignnx
Copy link
Contributor

eignnx commented May 28, 2019

Technical Bug Report

Your Environment

Software Version(s)
(@eignnx) Ubuntu 16.04
(@madmalik) MacOS 10.14.3 Mojave
cargo-watch 7.2.1
Form Factor Desktop

Is this an issue with Rust, CSS, or HTML (or a combination)?

Issue with cargo watch

Expected Behavior

cargo watch -x run ought to recompile only when actual changes are detected

Current Behavior

cargo watch -x run constantly recompiles the project even when no changes have been made. I have tried running the command when no text editors are open, and the problem persists.

Step to Reproduce

  1. Get on my or @madmalik 's computer,
  2. clone the repo,
  3. run cargo watch -x run.

Screenshots

I ran cargo watch --debug -x run and screenshotted the output on the first recompile:

image

Suggetions

This seems to indicate that the static/styles folder is changing upon compilation, and that is triggering cargo watch to recompile again.

I believe cargo watch checks your .gitignore for files to NOT watch. Is there some ignore pattern we could add that would solve this problem?

Trace

Here's a file with the trace: CargoWatchProblemTrace.txt

@Manishearth
Copy link
Member

Yeah the webapp adds some files to static/styles (these are gitignored already though) when run

@skade
Copy link
Contributor

skade commented May 30, 2019

Hm, updated cargo-watch to 7.2.1, ran a full git clean and it works for me.

I have very different glob patterns, though. Could you please update master and rerun?

@madmalik
Copy link
Contributor

Works flawlessly for me now!

@eignnx
Copy link
Contributor Author

eignnx commented Jun 2, 2019

Works for me too! Not sure what fixed the problem, but I ran cargo install --force --version 7.2.1 -- cargo-watch and everything works fine now. Is this something we could put in the README to make sure new contributors don't run into this problem?

@Zexbe
Copy link
Contributor

Zexbe commented Feb 6, 2020

It works for me too, and I am a new contributor. I think the update has been out long enough that it's no longer an issue.

@XAMPPRocky
Copy link
Member

Okay, I'm going to close this as solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants