dtolnay/cargo-expand

cargo expand forces to recompile all the dependencies

UltraMachine opened this issue · 1 comments

Rust version: 1.76.0 stable
cargo-expand version: 1.0.79
Reproducing:

cargo clippy
cargo clippy # Uses artifacts in target dir to rebuild quickly
cargo expand
cargo clippy # Forced to rebuild all the deps again
cargo expand # And again...

Hm, I'm not able to reproduce that issue. Can you show a complete, minimal reproduction with the output you are seeing? For example:

~/Temp/foo> cargo init
     Created binary (application) package
~/Temp/foo> cargo add regex -q
~/Temp/foo> cargo clippy
    Checking memchr v2.7.2
    Checking regex-syntax v0.8.3
    Checking aho-corasick v1.1.3
    Checking regex-automata v0.4.6
    Checking regex v1.10.4
    Checking foo v0.1.0 (/Users/eric/Temp/foo)
    Finished dev [unoptimized + debuginfo] target(s) in 4.01s
~/Temp/foo> cargo clippy
    Finished dev [unoptimized + debuginfo] target(s) in 0.01s
~/Temp/foo> cargo expand
    Checking foo v0.1.0 (/Users/eric/Temp/foo)
    Finished dev [unoptimized + debuginfo] target(s) in 0.06s

#![feature(prelude_import)]
#[prelude_import]
use std::prelude::rust_2021::*;
#[macro_use]
extern crate std;
fn main() {
    {
        ::std::io::_print(format_args!("Hello, world!\n"));
    };
}
~/Temp/foo> cargo clippy
    Finished dev [unoptimized + debuginfo] target(s) in 0.08s
~/Temp/foo> cargo expand
    Checking foo v0.1.0 (/Users/eric/Temp/foo)
    Finished dev [unoptimized + debuginfo] target(s) in 0.07s

#![feature(prelude_import)]
#[prelude_import]
use std::prelude::rust_2021::*;
#[macro_use]
extern crate std;
fn main() {
    {
        ::std::io::_print(format_args!("Hello, world!\n"));
    };
}