-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
Description
There seems to be a problem in our incremental build system. I discovered this when comparing uutils against GNU coreutils in a semi-automated way, and my script wrote to some new, unrelated files, because surely that won't impact uutils, right?
Turns out, cargo re-links the coreutils binary whenever a new file pops up:
$ cargo +stable build --all-features
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.14s
$ cargo +stable build --all-features
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.14s
$ cargo +stable build --all-features
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.17s
$ cargo +stable build --all-features
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.14s
$ touch completely_unrelated
$ cargo +stable build --all-features # ?!
Compiling coreutils v0.0.27 (/home/user/workspace/coreutils-rs)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.74s
$ cargo +stable build --all-features
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.14s
$ cargo +stable build --all-features
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.14s
$ cargo +stable build --all-features
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.17sNotice the extra 2.6 seconds in the middle? that makes everything quite slow. I'm not sure where the bug lives, or even whether it's uutil's fault at all (and perhaps a missed optimization in cargo?), but let's start here.
Reactions are currently unavailable