Skip to content

Causes projects to always rebuild #21

@FauxFaux

Description

@FauxFaux

When lz4 is listed anywhere in the dependencies of a project, the project must always rebuild/relink; it is never clean. I would expect the second cargo build here to report Finished, without any Compiling.

% cargo build
   Compiling lz4 v1.21.0
   Compiling lz4rebuild v0.1.0 (file:///home/faux/code/testcases/lz4rebuild)
    Finished dev [unoptimized + debuginfo] target(s) in 0.43 secs
% cargo build
   Compiling lz4 v1.21.0
   Compiling lz4rebuild v0.1.0 (file:///home/faux/code/testcases/lz4rebuild)
    Finished dev [unoptimized + debuginfo] target(s) in 0.43 secs

This is especially annoying when repeatedly re-running tests in a project that takes a while to link.

I don't know what's causing the problem

The above project is just a cargo init --bin with the dependency added. Using an explicit version makes no difference:

% cat Cargo.toml 
[package]
name = "lz4rebuild"
version = "0.1.0"
authors = ["Chris West (Faux) <[email protected]>"]

[dependencies]
lz4 = "*"


% cat src/main.rs 
fn main() {
    println!("Hello, world!");
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions