Comments (4)
Thanks for the report! Yes, the caching behaviour is not perfect atm. Actually, the info is still stored on disk it just doesn't have the list of relevant file names. I've tried to improve it by doing a "dry run" before the actual build but sadly it doesn't really work because it re-runs build.rs which invalidates caches further down, yielding in a partial full rebuild of the entire crate graph. This is basically a limitation/bug of the Executor
trait as it isn't called for build.rs script execution. @ehuss is this behaviour intended or should I file a bug?
I don't think that cargo-udeps should rebuild the entire chain each time it runs. Maybe one can only invalidate "local" crates, but the invalidation check function doesn't give you information that would directly tell you whether the crate is local or not. Or one can use the new build plan feature of cargo and determine the save analysis file names from that (build plans would be proper "dry run"'s).
from cargo-udeps.
is this the same fault that I hade when first running cargo +nightly udeps
and then cargo +nightly udeps --lib
? was a bit confused when I got the result All deps seem to have been used.
for both times when testing on pulldown-cmark that I know from before hade unused dependency in lib but not in bin
from cargo-udeps.
@andjo403 yes it should be the same problem. A possible cleanup command is rm target/debug/deps/libpulldown*.rmeta
.
from cargo-udeps.
There are more (well-known) methods to force rebuilding.
-
cargo clean --package <SPEC>...
cargo clean -p $PACKAGE_NAMES && cargo +nightly udeps
touch
ing source files
$ cargo metadata --format-version 1 |
jq -r '.workspace_members[] as $members | .packages[] | select(.id == $members) | .targets[].src_path' |
xargs touch &&
cargo +nightly udeps
or
#!/bin/bash
cargo metadata --format-version 1 |
jq -r '.workspace_members[] as $members | .packages[] | select(.id == $members) | .targets[].src_path' |
xargs touch
$ exa -l ~/.cargo/bin/cargo-touch-workspace
.rwxr-xr-x 170 me 1 Jan 00:00 /home/me/.cargo/bin/cargo-touch-workspace
$ cargo touch-workspace && cargo +nightly udeps
from cargo-udeps.
Related Issues (20)
- False positives from derive macro HOT 5
- Is there a --check flag or something similar? HOT 2
- Install fails at OpenSSL
- possibly surprising behavior for `--expect`? HOT 2
- Strange behavior in CI and in interaction with cargo build HOT 10
- tests/normal-dev-build.rs test failures since update of cargo HOT 3
- recognize .cargo/config.toml
- How to add `-Zbuild-std` option? HOT 3
- `cargo-udeps` 1.0.36 crashes when given a `manifest-path` HOT 1
- v0.1.36 release does not contain pre-built binaries in the assets section HOT 3
- Failed to install on Mac M1 chip HOT 3
- [email protected] is broken on latest version of Rust nightly HOT 2
- error: failed to compile cargo-udeps v0.1.41 HOT 2
- Fails to build HOT 1
- Doesn't support `debug = "line-tables-only"` HOT 2
- False positive warning on duplicate dependency
- unknown unstable option: `save-analysis` HOT 1
- regression test failure on macOS sonoma HOT 9
- Adds feature enabling Rustls rather than OpenSSL HOT 2
- Getting this uncought exception when attempting to test on [arbiter](https://github.com/primitivefinance/arbiter/issues/608) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cargo-udeps.