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

Take local dependencies into account #117

Closed
therustmonk opened this issue Mar 22, 2019 · 5 comments · Fixed by #216
Closed

Take local dependencies into account #117

therustmonk opened this issue Mar 22, 2019 · 5 comments · Fixed by #216

Comments

@therustmonk
Copy link

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" }
@waynr
Copy link
Contributor

waynr commented Oct 24, 2019

@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!

@passcod
Copy link
Member

passcod commented Oct 24, 2019

This would be:

  1. 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.
  2. 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.
  3. Adding a flag (to clap) to disable this behaviour, just in case

@waynr
Copy link
Contributor

waynr commented Oct 25, 2019

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!

@d4h0
Copy link

d4h0 commented Oct 18, 2020

This would be useful.

An easy workaround, in the meantime, is cargo watch -w . -w "../local-dep-1" -w "../local-dep-2" [...].

@passcod
Copy link
Member

passcod commented Dec 29, 2022

This is in 8.2.0

@passcod passcod closed this as completed Dec 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants