Git Product home page Git Product logo

Comments (4)

est31 avatar est31 commented on July 17, 2024

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.

andjo403 avatar andjo403 commented on July 17, 2024

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.

est31 avatar est31 commented on July 17, 2024

@andjo403 yes it should be the same problem. A possible cleanup command is rm target/debug/deps/libpulldown*.rmeta.

from cargo-udeps.

qryxip avatar qryxip commented on July 17, 2024

There are more (well-known) methods to force rebuilding.

cargo clean -p $PACKAGE_NAMES && cargo +nightly udeps
  • touching 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.