generated from bazel-contrib/rules-template
-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ci): assert that patches apply exactly (#508)
From `man patch` ``` -F max-fuzz, --fuzz max-fuzz Sets the maximum fuzz factor. This option only applies to context diffs, and causes patch to ignore up to that many lines in looking for places to install a hunk. Note that a larger fuzz factor increases the odds of a faulty patch. The default fuzz factor is 2, and it may not be set to more than the number of lines of context in the context diff, ordinarily 3. ``` The hint was in our CI job which passes but prints ``` Run patch --dry-run -p1 < .bcr/patches/*.patch checking file MODULE.bazel Hunk #1 succeeded at 45 with fuzz 2 (offset 4 lines). Hunk #2 succeeded at 61 with fuzz 2 (offset 3 lines). ``` When Bazel or the Publish to BCR app apply the patches, they don't use the `patch` tool so they don't allow any variation in the patch lines. Our assertion needs to be strict. Fixes #506
- Loading branch information
Showing
3 changed files
with
12 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,36 @@ | ||
diff --git a/MODULE.bazel b/MODULE.bazel | ||
index 841aed7..e1a1d6d 100644 | ||
index 967dad2..5022390 100644 | ||
--- a/MODULE.bazel | ||
+++ b/MODULE.bazel | ||
@@ -41,13 +41,13 @@ register_toolchains( | ||
@@ -45,13 +45,13 @@ register_toolchains( | ||
bazel_dep( | ||
name = "rules_rust", | ||
version = "0.53.0", | ||
- # In released versions: dev_dependency = True | ||
+ dev_dependency = True | ||
+ dev_dependency = True, | ||
) | ||
|
||
rust = use_extension( | ||
"@rules_rust//rust:extensions.bzl", | ||
"rust", | ||
- # In released versions: dev_dependency = True | ||
+ dev_dependency = True | ||
+ dev_dependency = True, | ||
) | ||
|
||
rust.toolchain( | ||
@@ -58,13 +58,13 @@ use_repo(rust, "rust_toolchains") | ||
edition = "2021", | ||
@@ -61,13 +61,13 @@ use_repo(rust, "rust_toolchains") | ||
|
||
register_toolchains( | ||
"@rust_toolchains//:all", | ||
- # In released versions: dev_dependency = True | ||
+ dev_dependency = True | ||
+ dev_dependency = True, | ||
) | ||
|
||
crate = use_extension( | ||
"@rules_rust//crate_universe:extension.bzl", | ||
"crate", | ||
- # In released versions: dev_dependency = True | ||
+ dev_dependency = True | ||
+ dev_dependency = True, | ||
) | ||
|
||
crate.from_cargo( | ||
name = "crate_index", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters