Skip to content

Commit 9401eda

Browse files
committed
Swift: use http_archive instead of new_git_repository since it's faster
1 parent 3c12644 commit 9401eda

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

misc/bazel/workspace.bzl

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
22
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
3-
load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository")
43

54
_swift_prebuilt_version = "swift-5.6-RELEASE.42271.54"
65
_swift_sha_map = {
@@ -27,6 +26,14 @@ def codeql_workspace(repository_name = "codeql"):
2726
sha256 = sha256,
2827
)
2928

29+
http_archive(
30+
name = "fishhook",
31+
url = "https://github.com/facebook/fishhook/archive/aadc161ac3b80db07a9908851839a17ba63a9eb1.zip",
32+
build_file = "@%s//swift/tools/fishhook:BUILD.fishhook.bazel" % repository_name,
33+
strip_prefix = "fishhook-aadc161ac3b80db07a9908851839a17ba63a9eb1",
34+
sha256 = "9f2cdee6dcc2039d4c47d25ab5141fe0678ce6ed27ef482cab17fe9fa38a30ce",
35+
)
36+
3037
maybe(
3138
repo_rule = http_archive,
3239
name = "rules_pkg",
@@ -56,11 +63,3 @@ def codeql_workspace(repository_name = "codeql"):
5663
"https://github.com/bazelbuild/rules_python/archive/refs/tags/0.8.1.tar.gz",
5764
],
5865
)
59-
60-
new_git_repository(
61-
name = "fishhook",
62-
commit = "aadc161ac3b80db07a9908851839a17ba63a9eb1",
63-
shallow_since = "1634071885 -0400",
64-
build_file = "@%s//swift/tools/fishhook:BUILD.fishhook.bazel" % repository_name,
65-
remote = "https://github.com/facebook/fishhook",
66-
)

0 commit comments

Comments
 (0)