Skip to content
Open
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
40 changes: 36 additions & 4 deletions build/patches/com_github_cockroachdb_pebble.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/internal/buildtags/BUILD.bazel b/internal/buildtags/BUILD.bazel
index b842a31e..d5674712 100644
index a556ba522..db4fbfc14 100644
--- a/internal/buildtags/BUILD.bazel
+++ b/internal/buildtags/BUILD.bazel
@@ -5,15 +5,27 @@ go_library(
@@ -5,17 +5,29 @@ go_library(
srcs = [
"cgo_off.go",
"cgo_on.go",
Expand Down Expand Up @@ -35,7 +35,7 @@ index b842a31e..d5674712 100644
name = "go_default_library",
actual = ":buildtags",
diff --git a/internal/invariants/BUILD.bazel b/internal/invariants/BUILD.bazel
index 3dd80d65..36dae2b7 100644
index 3dd80d650..36dae2b77 100644
--- a/internal/invariants/BUILD.bazel
+++ b/internal/invariants/BUILD.bazel
@@ -4,14 +4,25 @@ go_library(
Expand Down Expand Up @@ -67,8 +67,40 @@ index 3dd80d65..36dae2b7 100644
alias(
name = "go_default_library",
actual = ":invariants",
diff --git a/internal/treesteps/BUILD.bazel b/internal/treesteps/BUILD.bazel
index e4fbbab69..e1cccbe79 100644
--- a/internal/treesteps/BUILD.bazel
+++ b/internal/treesteps/BUILD.bazel
@@ -5,13 +5,25 @@ go_library(
srcs = [
"data.go",
"doc.go",
- "tree_steps_off.go",
- ],
+ ] + select({
+ "@com_github_cockroachdb_cockroach//build/toolchains:crdb_test": [":gen-crdb-test-on"],
+ "//conditions:default": ["tree_steps_off.go", "tree_steps_on.go"],
+ }),
importpath = "github.com/cockroachdb/pebble/internal/treesteps",
visibility = ["//:__subpackages__"],
deps = ["//internal/treeprinter"],
)

+REMOVE_GO_BUILD_CONSTRAINTS = "cat $< | grep -v '//go:build' | grep -v '// +build' > $@"
+
+# In crdb-test mode, we unconditionally enable invariants.
+genrule(
+ name = "gen-crdb-test-on",
+ srcs = ["tree_steps_on.go"],
+ outs = ["gen-crdb_test_on.go"],
+ cmd = REMOVE_GO_BUILD_CONSTRAINTS,
+)
+
alias(
name = "go_default_library",
actual = ":treesteps",
diff --git a/objstorage/objstorageprovider/objiotracing/BUILD.bazel b/objstorage/objstorageprovider/objiotracing/BUILD.bazel
index 21534041..d73ac30a 100644
index 171354745..198824703 100644
--- a/objstorage/objstorageprovider/objiotracing/BUILD.bazel
+++ b/objstorage/objstorageprovider/objiotracing/BUILD.bazel
@@ -5,6 +5,7 @@ go_library(
Expand Down