From cd7e66db315166a696dae9a0b33f95e8b191247a Mon Sep 17 00:00:00 2001 From: Tom Kirchner Date: Fri, 17 Jul 2020 14:18:14 -0700 Subject: [PATCH] Exclude README.md from cargo change tracking In packages using cargo-readme, README.md files are touched by build.rs, which triggers cargo's change tracking in the next build. This means cargo is rebuilding the package every time. This change adds README.md to the exclude list in Cargo.toml files so that cargo doesn't think a README change requires a rebuild. Most of our packages use cargo-readme to generate README.md, and for packages that don't, this still isn't harmful; manual updates to README.md don't need a Rust build. (Special cases can just remove this exclude line.) The downside is that accidental changes to README.md, like removing it, won't be automatically corrected with a rebuild if you haven't touched anything else. This should be rare, and will correct itself upon any other change. (And a developer is unlikely to commit such an accidental change.) --- sources/api/apiclient/Cargo.toml | 2 ++ sources/api/apiserver/Cargo.toml | 2 ++ sources/api/bork/Cargo.toml | 2 ++ sources/api/early-boot-config/Cargo.toml | 2 ++ sources/api/host-containers/Cargo.toml | 2 ++ sources/api/migration/migration-helpers/Cargo.toml | 2 ++ .../migrations/v0.3.2/migrate-admin-container-v0-5-0/Cargo.toml | 2 ++ .../migrations/v0.4.1/add-version-lock-ignore-waves/Cargo.toml | 2 ++ .../migrations/v0.4.1/pivot-repo-2020-07-07/Cargo.toml | 2 ++ sources/api/migration/migrator/Cargo.toml | 2 ++ sources/api/netdog/Cargo.toml | 2 ++ sources/api/pluto/Cargo.toml | 2 ++ sources/api/schnauzer/Cargo.toml | 2 ++ sources/api/servicedog/Cargo.toml | 2 ++ sources/api/settings-committer/Cargo.toml | 2 ++ sources/api/storewolf/Cargo.toml | 2 ++ sources/api/sundog/Cargo.toml | 2 ++ sources/api/thar-be-settings/Cargo.toml | 2 ++ sources/api/thar-be-updates/Cargo.toml | 2 ++ sources/bottlerocket-release/Cargo.toml | 2 ++ sources/growpart/Cargo.toml | 2 ++ sources/logdog/Cargo.toml | 2 ++ sources/models/Cargo.toml | 2 ++ sources/models/model-derive/Cargo.toml | 2 ++ sources/parse-datetime/Cargo.toml | 2 ++ sources/updater/block-party/Cargo.toml | 2 ++ sources/updater/signpost/Cargo.toml | 2 ++ sources/updater/update_metadata/Cargo.toml | 2 ++ sources/updater/updog/Cargo.toml | 2 ++ sources/webpki-roots-shim/Cargo.toml | 2 ++ tools/buildsys/Cargo.toml | 2 ++ variants/aws-dev/Cargo.toml | 2 ++ variants/aws-k8s-1.15/Cargo.toml | 2 ++ variants/aws-k8s-1.16/Cargo.toml | 2 ++ variants/aws-k8s-1.17/Cargo.toml | 2 ++ 35 files changed, 70 insertions(+) diff --git a/sources/api/apiclient/Cargo.toml b/sources/api/apiclient/Cargo.toml index cc572a9ecdb..55e4f04f1d1 100644 --- a/sources/api/apiclient/Cargo.toml +++ b/sources/api/apiclient/Cargo.toml @@ -6,6 +6,8 @@ license = "Apache-2.0 OR MIT" edition = "2018" publish = false build = "build.rs" +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] [dependencies] futures = "0.3" diff --git a/sources/api/apiserver/Cargo.toml b/sources/api/apiserver/Cargo.toml index a02b3deb0c7..ed4f3ad3430 100644 --- a/sources/api/apiserver/Cargo.toml +++ b/sources/api/apiserver/Cargo.toml @@ -6,6 +6,8 @@ license = "Apache-2.0 OR MIT" edition = "2018" publish = false build = "build.rs" +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] [dependencies] actix-rt = "1.0.0" diff --git a/sources/api/bork/Cargo.toml b/sources/api/bork/Cargo.toml index 54993f844c5..f039ca2336e 100644 --- a/sources/api/bork/Cargo.toml +++ b/sources/api/bork/Cargo.toml @@ -5,6 +5,8 @@ authors = ["Samuel Mendoza-Jonas "] license = "Apache-2.0 OR MIT" edition = "2018" publish = false +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] [dependencies] rand = "0.7.0" diff --git a/sources/api/early-boot-config/Cargo.toml b/sources/api/early-boot-config/Cargo.toml index a96870b2063..8a606e854d9 100644 --- a/sources/api/early-boot-config/Cargo.toml +++ b/sources/api/early-boot-config/Cargo.toml @@ -6,6 +6,8 @@ license = "Apache-2.0 OR MIT" edition = "2018" publish = false build = "build.rs" +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] [dependencies] apiclient = { path = "../apiclient" } diff --git a/sources/api/host-containers/Cargo.toml b/sources/api/host-containers/Cargo.toml index b27c5ea4843..a6898fcc848 100644 --- a/sources/api/host-containers/Cargo.toml +++ b/sources/api/host-containers/Cargo.toml @@ -6,6 +6,8 @@ license = "Apache-2.0 OR MIT" edition = "2018" publish = false build = "build.rs" +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] [dependencies] apiclient = { path = "../apiclient" } diff --git a/sources/api/migration/migration-helpers/Cargo.toml b/sources/api/migration/migration-helpers/Cargo.toml index 759f8a23bdf..2df9141e30c 100644 --- a/sources/api/migration/migration-helpers/Cargo.toml +++ b/sources/api/migration/migration-helpers/Cargo.toml @@ -5,6 +5,8 @@ authors = ["Tom Kirchner "] license = "Apache-2.0 OR MIT" edition = "2018" publish = false +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] [dependencies] apiserver = { path = "../../apiserver" } diff --git a/sources/api/migration/migrations/v0.3.2/migrate-admin-container-v0-5-0/Cargo.toml b/sources/api/migration/migrations/v0.3.2/migrate-admin-container-v0-5-0/Cargo.toml index a6253f1cd54..d7fc1156b83 100644 --- a/sources/api/migration/migrations/v0.3.2/migrate-admin-container-v0-5-0/Cargo.toml +++ b/sources/api/migration/migrations/v0.3.2/migrate-admin-container-v0-5-0/Cargo.toml @@ -5,6 +5,8 @@ authors = ["Erikson Tung "] license = "Apache-2.0 OR MIT" edition = "2018" publish = false +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] [dependencies] migration-helpers = { path = "../../../migration-helpers" } diff --git a/sources/api/migration/migrations/v0.4.1/add-version-lock-ignore-waves/Cargo.toml b/sources/api/migration/migrations/v0.4.1/add-version-lock-ignore-waves/Cargo.toml index 4aa9aac2c85..9d01ef46503 100644 --- a/sources/api/migration/migrations/v0.4.1/add-version-lock-ignore-waves/Cargo.toml +++ b/sources/api/migration/migrations/v0.4.1/add-version-lock-ignore-waves/Cargo.toml @@ -5,6 +5,8 @@ authors = ["Erikson Tung "] license = "Apache-2.0 OR MIT" edition = "2018" publish = false +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] [dependencies] migration-helpers = { path = "../../../migration-helpers" } diff --git a/sources/api/migration/migrations/v0.4.1/pivot-repo-2020-07-07/Cargo.toml b/sources/api/migration/migrations/v0.4.1/pivot-repo-2020-07-07/Cargo.toml index af640139f84..429d784d8a5 100644 --- a/sources/api/migration/migrations/v0.4.1/pivot-repo-2020-07-07/Cargo.toml +++ b/sources/api/migration/migrations/v0.4.1/pivot-repo-2020-07-07/Cargo.toml @@ -5,6 +5,8 @@ authors = ["Jamie Anderson "] license = "Apache-2.0 OR MIT" edition = "2018" publish = false +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] [dependencies] dns-lookup = "1.0" diff --git a/sources/api/pluto/Cargo.toml b/sources/api/pluto/Cargo.toml index 2aafc3596fc..0004839f36b 100644 --- a/sources/api/pluto/Cargo.toml +++ b/sources/api/pluto/Cargo.toml @@ -6,6 +6,8 @@ license = "Apache-2.0 OR MIT" edition = "2018" publish = false build = "build.rs" +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] [dependencies] reqwest = { version = "0.10", default-features = false, features = ["blocking"]} diff --git a/sources/api/schnauzer/Cargo.toml b/sources/api/schnauzer/Cargo.toml index 7c4075ae840..8ef42dcfbc2 100644 --- a/sources/api/schnauzer/Cargo.toml +++ b/sources/api/schnauzer/Cargo.toml @@ -6,6 +6,8 @@ license = "Apache-2.0 OR MIT" edition = "2018" publish = false build = "build.rs" +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] [dependencies] apiclient = { path = "../apiclient" } diff --git a/sources/api/servicedog/Cargo.toml b/sources/api/servicedog/Cargo.toml index c0bf76bd43c..02600365323 100644 --- a/sources/api/servicedog/Cargo.toml +++ b/sources/api/servicedog/Cargo.toml @@ -6,6 +6,8 @@ license = "Apache-2.0 OR MIT" edition = "2018" publish = false build = "build.rs" +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] [dependencies] apiclient = { path = "../apiclient" } diff --git a/sources/api/settings-committer/Cargo.toml b/sources/api/settings-committer/Cargo.toml index ef670e45b22..29c9bf9f837 100644 --- a/sources/api/settings-committer/Cargo.toml +++ b/sources/api/settings-committer/Cargo.toml @@ -6,6 +6,8 @@ license = "Apache-2.0 OR MIT" edition = "2018" publish = false build = "build.rs" +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] [dependencies] apiclient = { path = "../apiclient" } diff --git a/sources/api/storewolf/Cargo.toml b/sources/api/storewolf/Cargo.toml index 8df1fc455e6..8c62381cb3c 100644 --- a/sources/api/storewolf/Cargo.toml +++ b/sources/api/storewolf/Cargo.toml @@ -6,6 +6,8 @@ license = "Apache-2.0 OR MIT" edition = "2018" publish = false build = "build.rs" +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] [dependencies] apiserver = { path = "../apiserver" } diff --git a/sources/api/sundog/Cargo.toml b/sources/api/sundog/Cargo.toml index a2d626ff42d..aed8a804575 100644 --- a/sources/api/sundog/Cargo.toml +++ b/sources/api/sundog/Cargo.toml @@ -6,6 +6,8 @@ license = "Apache-2.0 OR MIT" edition = "2018" publish = false build = "build.rs" +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] [dependencies] apiclient = { path = "../apiclient" } diff --git a/sources/api/thar-be-settings/Cargo.toml b/sources/api/thar-be-settings/Cargo.toml index 1de313038ad..10ecbb5b4ac 100644 --- a/sources/api/thar-be-settings/Cargo.toml +++ b/sources/api/thar-be-settings/Cargo.toml @@ -6,6 +6,8 @@ license = "Apache-2.0 OR MIT" edition = "2018" publish = false build = "build.rs" +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] [dependencies] apiclient = { path = "../apiclient" } diff --git a/sources/api/thar-be-updates/Cargo.toml b/sources/api/thar-be-updates/Cargo.toml index b8f4f8a85c5..4a95dfa61a7 100644 --- a/sources/api/thar-be-updates/Cargo.toml +++ b/sources/api/thar-be-updates/Cargo.toml @@ -6,6 +6,8 @@ license = "Apache-2.0 OR MIT" edition = "2018" publish = false build = "build.rs" +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] [dependencies] apiclient = { path = "../apiclient" } diff --git a/sources/bottlerocket-release/Cargo.toml b/sources/bottlerocket-release/Cargo.toml index 3e4cdd8c812..02952c69225 100644 --- a/sources/bottlerocket-release/Cargo.toml +++ b/sources/bottlerocket-release/Cargo.toml @@ -5,6 +5,8 @@ authors = ["Tom Kirchner "] license = "Apache-2.0 OR MIT" edition = "2018" publish = false +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] [dependencies] envy = "0.4" diff --git a/sources/growpart/Cargo.toml b/sources/growpart/Cargo.toml index 09c918f4592..3c9f0aa819f 100644 --- a/sources/growpart/Cargo.toml +++ b/sources/growpart/Cargo.toml @@ -5,6 +5,8 @@ authors = ["Ben Cressey "] license = "Apache-2.0 OR MIT" edition = "2018" publish = false +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] [dependencies] gptman = { version = "0.6.1", default-features = false } diff --git a/sources/logdog/Cargo.toml b/sources/logdog/Cargo.toml index 47ae116af34..2d0eed0a038 100644 --- a/sources/logdog/Cargo.toml +++ b/sources/logdog/Cargo.toml @@ -5,6 +5,8 @@ authors = ["Matt Briggs "] license = "Apache-2.0 OR MIT" edition = "2018" publish = false +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] [dependencies] flate2 = "1.0" diff --git a/sources/models/Cargo.toml b/sources/models/Cargo.toml index 12906eb6d02..d7ea3259202 100644 --- a/sources/models/Cargo.toml +++ b/sources/models/Cargo.toml @@ -6,6 +6,8 @@ license = "Apache-2.0 OR MIT" edition = "2018" publish = false build = "build.rs" +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] [dependencies] base64 = "0.12" diff --git a/sources/models/model-derive/Cargo.toml b/sources/models/model-derive/Cargo.toml index 582ba80a325..c1c2a5321b3 100644 --- a/sources/models/model-derive/Cargo.toml +++ b/sources/models/model-derive/Cargo.toml @@ -6,6 +6,8 @@ license = "Apache-2.0 OR MIT" edition = "2018" publish = false build = "build.rs" +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] [lib] path = "src/lib.rs" diff --git a/sources/parse-datetime/Cargo.toml b/sources/parse-datetime/Cargo.toml index f67620a8f8f..1780e36521d 100644 --- a/sources/parse-datetime/Cargo.toml +++ b/sources/parse-datetime/Cargo.toml @@ -5,6 +5,8 @@ authors = ["Zac Mrowicki "] license = "Apache-2.0 OR MIT" edition = "2018" publish = false +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] [dependencies] chrono = "0.4.11" diff --git a/sources/updater/block-party/Cargo.toml b/sources/updater/block-party/Cargo.toml index 086f1982d2c..e0993bc5f23 100644 --- a/sources/updater/block-party/Cargo.toml +++ b/sources/updater/block-party/Cargo.toml @@ -5,6 +5,8 @@ authors = ["iliana destroyer of worlds "] license = "Apache-2.0 OR MIT" edition = "2018" publish = false +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] [dependencies] snafu = "0.6.0" diff --git a/sources/updater/signpost/Cargo.toml b/sources/updater/signpost/Cargo.toml index 681c8b39c7f..d2896429dfc 100644 --- a/sources/updater/signpost/Cargo.toml +++ b/sources/updater/signpost/Cargo.toml @@ -5,6 +5,8 @@ authors = ["iliana destroyer of worlds "] license = "Apache-2.0 OR MIT" edition = "2018" publish = false +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] [dependencies] bit_field = "0.10.0" diff --git a/sources/updater/update_metadata/Cargo.toml b/sources/updater/update_metadata/Cargo.toml index 3feb4f9b8bf..7787ddb0663 100644 --- a/sources/updater/update_metadata/Cargo.toml +++ b/sources/updater/update_metadata/Cargo.toml @@ -5,6 +5,8 @@ authors = ["Samuel Mendoza-Jonas "] license = "Apache-2.0 OR MIT" edition = "2018" publish = false +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] [dependencies] chrono = { version = "0.4.9", features = ["serde"] } diff --git a/sources/updater/updog/Cargo.toml b/sources/updater/updog/Cargo.toml index 1c517746983..98bcc68c17e 100644 --- a/sources/updater/updog/Cargo.toml +++ b/sources/updater/updog/Cargo.toml @@ -5,6 +5,8 @@ authors = ["iliana destroyer of worlds "] license = "Apache-2.0 OR MIT" edition = "2018" publish = false +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] [dependencies] bottlerocket-release = { path = "../../bottlerocket-release" } diff --git a/sources/webpki-roots-shim/Cargo.toml b/sources/webpki-roots-shim/Cargo.toml index f61b7143ce0..883b5d5bd5a 100644 --- a/sources/webpki-roots-shim/Cargo.toml +++ b/sources/webpki-roots-shim/Cargo.toml @@ -5,6 +5,8 @@ authors = ["iliana destroyer of worlds "] license = "Apache-2.0 OR MIT" edition = "2018" publish = false +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] [dependencies] lazy_static = "1.4.0" diff --git a/tools/buildsys/Cargo.toml b/tools/buildsys/Cargo.toml index d389f24cac2..f658c2b776c 100644 --- a/tools/buildsys/Cargo.toml +++ b/tools/buildsys/Cargo.toml @@ -5,6 +5,8 @@ authors = ["Ben Cressey "] license = "Apache-2.0 OR MIT" edition = "2018" publish = false +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] [dependencies] duct = "0.13.0" diff --git a/variants/aws-dev/Cargo.toml b/variants/aws-dev/Cargo.toml index fa478ba6fb1..127d80a1efd 100644 --- a/variants/aws-dev/Cargo.toml +++ b/variants/aws-dev/Cargo.toml @@ -4,6 +4,8 @@ version = "0.1.0" edition = "2018" publish = false build = "build.rs" +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] [package.metadata.build-variant] included-packages = [ diff --git a/variants/aws-k8s-1.15/Cargo.toml b/variants/aws-k8s-1.15/Cargo.toml index 7d4df35c6c6..304b5c07993 100644 --- a/variants/aws-k8s-1.15/Cargo.toml +++ b/variants/aws-k8s-1.15/Cargo.toml @@ -6,6 +6,8 @@ version = "0.1.0" edition = "2018" publish = false build = "build.rs" +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] [package.metadata.build-variant] included-packages = [ diff --git a/variants/aws-k8s-1.16/Cargo.toml b/variants/aws-k8s-1.16/Cargo.toml index a2d1492e5e3..659be17950c 100644 --- a/variants/aws-k8s-1.16/Cargo.toml +++ b/variants/aws-k8s-1.16/Cargo.toml @@ -6,6 +6,8 @@ version = "0.1.0" edition = "2018" publish = false build = "build.rs" +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] [package.metadata.build-variant] included-packages = [ diff --git a/variants/aws-k8s-1.17/Cargo.toml b/variants/aws-k8s-1.17/Cargo.toml index 9c6af1f30b4..3716075b901 100644 --- a/variants/aws-k8s-1.17/Cargo.toml +++ b/variants/aws-k8s-1.17/Cargo.toml @@ -6,6 +6,8 @@ version = "0.1.0" edition = "2018" publish = false build = "build.rs" +# Don't rebuild crate just because of changes to README. +exclude = ["README.md"] [package.metadata.build-variant] included-packages = [