Skip to content

Commit

Permalink
Remove shallow_since argument in git_repository()
Browse files Browse the repository at this point in the history
Based on bazelbuild/bazel#12857 shallow_since
may actually slow down the build. As of version 6.1.0, bazel no longer
prints a warning if shallow_since is absent.
  • Loading branch information
fhanau committed Jan 19, 2024
1 parent b98192f commit fc1eb4c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 23 deletions.
7 changes: 4 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ git_repository(
name = "com_google_absl",
remote = "https://chromium.googlesource.com/chromium/src/third_party/abseil-cpp.git",
commit = "0764ad493e54a79c7e3e02fc3412ef55b4835b9e",
shallow_since = "1701253303 -0800"
)
bind(
name = "absl_flat_hash_set",
Expand Down Expand Up @@ -399,9 +398,12 @@ npm_repositories()
# Note that googlesource does not generate tarballs deterministically, so we cannot use
# http_archive: https://github.com/google/gitiles/issues/84
#
# It would seem that googlesource would rather we use git protocol (ideally with shallow clones).
# It would seem that googlesource would rather we use git protocol.
# Fine, we can do that.
#
# We previously used shallow_since for our git-based dependencies, but this may actually be
# harmful: https://github.com/bazelbuild/bazel/issues/12857
#
# There is an official mirror for V8 itself on GitHub, but not for dependencies like zlib (Chromium
# fork), icu (Chromium fork), and trace_event, so we still have to use git for them.

Expand Down Expand Up @@ -474,7 +476,6 @@ git_repository(
build_file = "@v8//:bazel/BUILD.trace_event_common",
commit = "29ac73db520575590c3aceb0a6f1f58dda8934f6",
remote = "https://chromium.googlesource.com/chromium/src/base/trace_event/common.git",
shallow_since = "1695357423 -0700",
)

# This sets up a hermetic python3, rather than depending on what is installed.
Expand Down
10 changes: 0 additions & 10 deletions docs/v8-updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,4 @@ To update the version of V8 used by workerd, the steps are:
bazel test //...
```

You may see advice in the build output about shallow-since dates for the V8 related
git repositories:

```sh
DEBUG: Rule 'v8' indicated that a canonical reproducible form can be obtained by modifying arguments shallow_since = "1683898886 +0000"
```

You can follow the advice in these messages and update the shallow-since dates for
the V8 related git repositories in the WORKSPACE file.

12. Commit your workerd changes and push them for review.
8 changes: 0 additions & 8 deletions rust-deps/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,6 @@ CARGO_BAZEL = select({
# To repin crates: bazel run //rust-deps:crates_vendor -- --repin
crates_vendor(
name = "crates_vendor",
annotations = {
"lolhtml": [crate.annotation(
shallow_since = "1690827348 +0100",
)],
"lol_html": [crate.annotation(
shallow_since = "1690827348 +0100",
)],
},
cargo_bazel = CARGO_BAZEL,
mode = "remote",
packages = PACKAGES,
Expand Down
2 changes: 0 additions & 2 deletions rust-deps/crates/defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,6 @@ def crate_repositories():
name = "crates_vendor__lol_html-1.1.1",
commit = "7967765ff8db27000845ba0a0a9a025ac908a043",
init_submodules = True,
shallow_since = "1690827348 +0100",
remote = "https://github.com/cloudflare/lol-html.git",
build_file = Label("@workerd//rust-deps/crates:BUILD.lol_html-1.1.1.bazel"),
)
Expand All @@ -670,7 +669,6 @@ def crate_repositories():
name = "crates_vendor__lolhtml-1.1.1",
commit = "7967765ff8db27000845ba0a0a9a025ac908a043",
init_submodules = True,
shallow_since = "1690827348 +0100",
remote = "https://github.com/cloudflare/lol-html.git",
build_file = Label("@workerd//rust-deps/crates:BUILD.lolhtml-1.1.1.bazel"),
strip_prefix = "c-api",
Expand Down

0 comments on commit fc1eb4c

Please sign in to comment.