Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): assert that patches apply exactly #508

Merged
merged 3 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .bcr/patches/rust_dev_dep.patch
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",
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: patch --dry-run -p1 < .bcr/patches/*.patch
- run: patch --dry-run -p1 --fuzz 0 < .bcr/patches/*.patch

test-release:
runs-on: ubuntu-latest
Expand Down
3 changes: 2 additions & 1 deletion e2e/use_release/minimal_download_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ fi
# Test bzlmod
(
cd ../..
patch -p1 < .bcr/patches/*.patch
# Create the .orig file, whether there's a mismatch or not
patch -p1 --backup < .bcr/patches/*.patch
)
OUTPUT_BASE=$(mktemp -d)
output=$(bazel "--output_base=$OUTPUT_BASE" run --enable_bzlmod //src:main)
Expand Down
Loading