Skip to content
This repository has been archived by the owner on Jan 18, 2025. It is now read-only.

Excessive rebuilds on Windows 10 in VS Code #62

Closed
nepp2 opened this issue Apr 4, 2017 · 8 comments
Closed

Excessive rebuilds on Windows 10 in VS Code #62

nepp2 opened this issue Apr 4, 2017 · 8 comments

Comments

@nepp2
Copy link

nepp2 commented Apr 4, 2017

A possible bug to fix, or perhaps just a note for your troubleshooting section:

I experienced excessive rebuilding (or rechecking) of files when I saved changes made in Visual Studio Code. It looks like it was caused by some kind of interaction between cargo-watch and the VS Code git integration.

If you don't need the editor's git integration, you can prevent this behaviour by adding "git.enabled": false to your VS Code settings file. This can be a global setting or a workspace setting.

@passcod
Copy link
Member

passcod commented Apr 4, 2017

Does this still happen with 4.0.3? I fixed something related.

@nepp2
Copy link
Author

nepp2 commented Apr 4, 2017

Yes, just tested, it does.

@passcod
Copy link
Member

passcod commented Apr 4, 2017

Can you run with RUST_LOG=cargo_watch=debug and give the log for a run that exhibits the behaviour? When you have time :)

@dten
Copy link

dten commented Apr 5, 2017

I also get this

error: Could not compile `harvest-thing`.

To learn more, run the command again with --verbose.
[Finished running]
DEBUG:cargo_watch::schedule: path changed: C:\Users\DavidHewson\Documents\Repositories\TeamRocket\harvest-thing\app\src\main\harvest-thing\target\debug\build\backtrace-3d4946c28f21721b\build-script-build.exe
INFO:cargo_watch::filter: Filtering: "C:\\Users\\DavidHewson\\Documents\\Repositories\\TeamRocket\\harvest-thing\\app\\src\\main\\harvest-thing\\target\\debug\\build\\backtrace-3d4946c28f21721b\\build-script-build.exe"
DEBUG:cargo_watch::filter: Match data for file "C:\\Users\\DavidHewson\\Documents\\Repositories\\TeamRocket\\harvest-thing\\app\\src\\main\\harvest-thing\\target\\debug\\build\\backtrace-3d4946c28f21721b\\build-script-build.exe": None
DEBUG:cargo_watch::schedule: Found a duct handle, checking if it's still running

INFO:cargo_watch::schedule: Starting job: Expression(Then(Expression(Io(Unchecked, Expression(Then(Expression(Sh("echo [Running \'cargo check\']")), Expression(Sh("cargo check")))))), Expression(Sh("echo [Finished running]"))))
DEBUG:cargo_watch::schedule: path changed: C:\Users\DavidHewson\Documents\Repositories\TeamRocket\harvest-thing\app\src\main\harvest-thing\target\debug\build\backtrace-3d4946c28f21721b
INFO:cargo_watch::filter: Filtering: "C:\\Users\\DavidHewson\\Documents\\Repositories\\TeamRocket\\harvest-thing\\app\\src\\main\\harvest-thing\\target\\debug\\build\\backtrace-3d4946c28f21721b"
DEBUG:cargo_watch::filter: Decided that "C:\\Users\\DavidHewson\\Documents\\Repositories\\TeamRocket\\harvest-thing\\app\\src\\main\\harvest-thing\\target\\debug\\build\\backtrace-3d4946c28f21721b" was a folder
DEBUG:cargo_watch::filter: Match data for file "C:\\Users\\DavidHewson\\Documents\\Repositories\\TeamRocket\\harvest-thing\\app\\src\\main\\harvest-thing\\target\\debug\\build\\backtrace-3d4946c28f21721b": None
DEBUG:cargo_watch::schedule: Found a duct handle, checking if it's still running
[Killing running command]
INFO:cargo_watch::schedule: Waiting on the kill

INFO:cargo_watch::schedule: Starting job: Expression(Then(Expression(Io(Unchecked, Expression(Then(Expression(Sh("echo [Running \'cargo check\']")), Expression(Sh("cargo check")))))), Expression(Sh("echo [Finished running]"))))
DEBUG:cargo_watch::schedule: path changed: C:\Users\DavidHewson\Documents\Repositories\TeamRocket\harvest-thing\app\src\main\harvest-thing\target\debug\build\hyper-7d9785407b686b5a\build-script-build.exe
INFO:cargo_watch::filter: Filtering: "C:\\Users\\DavidHewson\\Documents\\Repositories\\TeamRocket\\harvest-thing\\app\\src\\main\\harvest-thing\\target\\debug\\build\\hyper-7d9785407b686b5a\\build-script-build.exe"
DEBUG:cargo_watch::filter: Match data for file "C:\\Users\\DavidHewson\\Documents\\Repositories\\TeamRocket\\harvest-thing\\app\\src\\main\\harvest-thing\\target\\debug\\build\\hyper-7d9785407b686b5a\\build-script-build.exe": None
DEBUG:cargo_watch::schedule: Found a duct handle, checking if it's still running
[Killing running command]
[Running 'cargo check']
INFO:cargo_watch::schedule: Waiting on the kill

here's what it says between each rebuild.
edit: actually i think mine is just similar
edit2: cargo watch --ignore target works fine

@passcod
Copy link
Member

passcod commented Apr 5, 2017

@dten Yours is probably the same cause, i.e. the default ignore patterns don't match properly on Windows.

@passcod
Copy link
Member

passcod commented Apr 26, 2017

This will be fixed in the next release.

@passcod
Copy link
Member

passcod commented Apr 27, 2017

Done in 5.0.0.

@passcod passcod closed this as completed Apr 27, 2017
@dten
Copy link

dten commented Apr 27, 2017

Thanks

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

No branches or pull requests

3 participants