Take local dependencies into account
It's useful to have a capability to take local dependencies (with paths) into accounts. It's not the same #52, it's about watching for deps like these:
[dependencies]
dep1 = { path = "../libs/dep1" }
depN = { path = "../libs/depN" }
@passcod I'm interested in taking this on; got any advice for where to start or should I just dive right in?
...as an aside I found this project because I have my own set of inotifywait scripts and was thinking to myself "I wonder if anyone has created cargo watch yet". Thanks for creating a super useful tool!
This would be:
- reading the cargo.toml, which we don't do at all currently. There might be a crate that can help here? maybe cargo has a library nowadays. Otherwise, just reading and parsing the toml.
- Figuring what additional paths we should watch by default, i.e. the local deps as above, but also maybe we should pick up local replacements using the
[replace]and[patch]sections. - Adding a flag (to clap) to disable this behaviour, just in case
Okay, I'm gonna try to get started on this tomorrow night or over the weekend. I wanted to get started tonight but have an early wakeup tomorrow morning. Thanks for the points!
This would be useful.
An easy workaround, in the meantime, is cargo watch -w . -w "../local-dep-1" -w "../local-dep-2" [...].
This is in 8.2.0