Sometimes I have to add debug code to one of my dependencies during development. But cargo doesn’t autodetect changes in cargo registry and automatically recompile the project when I do that. I’ve tried deleting target/debug/deps/dep-name-* files but it doesn’t work. I know I can temporarily point the project to a local clone of that dependency but I was wondering if anyone else has found an easier way of doing this.
Are these dependencies open source, but hosted in the same repo?
You can specify both a version and a path:
mydep = { version = "1.4", path = "../mydep" }
During development it’ll use the path, but when you publish this to crates.io, anyone using it from the registry will ignore the path and go with the version.
1 Like
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.