6 Star 36 Fork 14

Gitee 极速下载 / Sourcegraph

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/sourcegraph/sourcegraph
克隆/下载
WORKSPACE 18.26 KB
一键复制 编辑 原始数据 按行查看 历史
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "platforms",
sha256 = "5eda539c841265031c2f82d8ae7a3a6490bd62176e0c038fc469eabf91f6149b",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/platforms/releases/download/0.0.9/platforms-0.0.9.tar.gz",
"https://github.com/bazelbuild/platforms/releases/download/0.0.9/platforms-0.0.9.tar.gz",
],
)
load("@platforms//host:extension.bzl", "host_platform_repo")
host_platform_repo(name = "host_platform")
http_archive(
name = "bazel_skylib",
sha256 = "66ffd9315665bfaafc96b52278f57c7e2dd09f5ede279ea6d39b2be471e7e3aa",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.4.2/bazel-skylib-1.4.2.tar.gz",
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.4.2/bazel-skylib-1.4.2.tar.gz",
],
)
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
bazel_skylib_workspace()
http_archive(
name = "aspect_bazel_lib",
sha256 = "d0529773764ac61184eb3ad3c687fb835df5bee01afedf07f0cf1a45515c96bc",
strip_prefix = "bazel-lib-1.42.3",
url = "https://github.com/aspect-build/bazel-lib/releases/download/v1.42.3/bazel-lib-v1.42.3.tar.gz",
)
# rules_js defines an older rules_nodejs, so we override it here
http_archive(
name = "rules_nodejs",
sha256 = "3e8369256ad63197959d2253c473a9dcc57c2841d176190e59b91d25d4fe9e67",
strip_prefix = "rules_nodejs-6.1.1",
url = "https://github.com/bazelbuild/rules_nodejs/releases/download/v6.1.1/rules_nodejs-v6.1.1.tar.gz",
)
http_archive(
name = "aspect_rules_js",
sha256 = "2cfb3875e1231cefd3fada6774f2c0c5a99db0070e0e48ea398acbff7c6c765b",
strip_prefix = "rules_js-1.42.3",
url = "https://github.com/aspect-build/rules_js/releases/download/v1.42.3/rules_js-v1.42.3.tar.gz",
)
http_archive(
name = "aspect_rules_ts",
sha256 = "da6620683ab2c28014e9c82e8a8fdbb724cd67f6a1d27317f42a8ceb14048b9b",
strip_prefix = "rules_ts-2.4.1",
url = "https://github.com/aspect-build/rules_ts/releases/download/v2.4.1/rules_ts-v2.4.1.tar.gz",
)
http_archive(
name = "aspect_rules_swc",
sha256 = "1908691bde56321423c3f3beaf37f5fc21c51614869572e5f626cea058649373",
strip_prefix = "rules_swc-1.2.3",
url = "https://github.com/aspect-build/rules_swc/releases/download/v1.2.3/rules_swc-v1.2.3.tar.gz",
)
http_archive(
name = "io_bazel_rules_go",
sha256 = "af47f30e9cbd70ae34e49866e201b3f77069abb111183f2c0297e7e74ba6bbc0",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.47.0/rules_go-v0.47.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.47.0/rules_go-v0.47.0.zip",
],
)
http_archive(
name = "rules_proto",
sha256 = "dc3fb206a2cb3441b485eb1e423165b231235a1ea9b031b4433cf7bc1fa460dd",
strip_prefix = "rules_proto-5.3.0-21.7",
urls = [
"https://github.com/bazelbuild/rules_proto/archive/refs/tags/5.3.0-21.7.tar.gz",
],
)
http_archive(
name = "rules_proto_grpc",
sha256 = "9ba7299c5eb6ec45b6b9a0ceb9916d0ab96789ac8218269322f0124c0c0d24e2",
strip_prefix = "rules_proto_grpc-4.5.0",
urls = ["https://github.com/rules-proto-grpc/rules_proto_grpc/releases/download/4.5.0/rules_proto_grpc-4.5.0.tar.gz"],
)
http_archive(
name = "rules_buf",
sha256 = "bc2488ee497c3fbf2efee19ce21dceed89310a08b5a9366cc133dd0eb2118498",
strip_prefix = "rules_buf-0.2.0",
urls = [
"https://github.com/bufbuild/rules_buf/archive/refs/tags/v0.2.0.zip",
],
)
http_archive(
name = "bazel_gazelle",
integrity = "sha256-MpOL2hbmcABjA1R5Bj2dJMYO2o15/Uc5Vj9Q0zHLMgk=",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.35.0/bazel-gazelle-v0.35.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.35.0/bazel-gazelle-v0.35.0.tar.gz",
],
)
http_archive(
name = "rules_rust",
integrity = "sha256-ZQGWDD5NoySV0eEAfe0HaaU0yxlcMN6jaqVPnYo/A2E=",
urls = ["https://github.com/bazelbuild/rules_rust/releases/download/0.38.0/rules_rust-v0.38.0.tar.gz"],
)
# Container rules
http_archive(
name = "rules_oci",
patch_args = ["-p1"],
patches = [
"//third_party/rules_oci:no_xattr.patch",
],
sha256 = "d41d0ba7855f029ad0e5ee35025f882cbe45b0d5d570842c52704f7a47ba8668",
strip_prefix = "rules_oci-1.4.3",
url = "https://github.com/bazel-contrib/rules_oci/releases/download/v1.4.3/rules_oci-v1.4.3.tar.gz",
)
http_archive(
name = "rules_pkg",
sha256 = "8c20f74bca25d2d442b327ae26768c02cf3c99e93fad0381f32be9aab1967675",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.8.1/rules_pkg-0.8.1.tar.gz",
"https://github.com/bazelbuild/rules_pkg/releases/download/0.8.1/rules_pkg-0.8.1.tar.gz",
],
)
http_archive(
name = "container_structure_test",
sha256 = "42edb647b51710cb917b5850380cc18a6c925ad195986f16e3b716887267a2d7",
strip_prefix = "container-structure-test-104a53ede5f78fff72172639781ac52df9f5b18f",
urls = ["https://github.com/GoogleContainerTools/container-structure-test/archive/104a53ede5f78fff72172639781ac52df9f5b18f.zip"],
)
http_archive(
name = "buildifier_prebuilt",
sha256 = "8ada9d88e51ebf5a1fdff37d75ed41d51f5e677cdbeafb0a22dda54747d6e07e",
strip_prefix = "buildifier-prebuilt-6.4.0",
urls = ["https://github.com/keith/buildifier-prebuilt/archive/6.4.0.tar.gz"],
)
http_archive(
name = "aspect_cli",
repo_mapping = {
"@com_github_smacker_go_tree_sitter": "@aspectcli-com_github_smacker_go_tree_sitter",
},
sha256 = "045f0186edb25706dfe77d9c4916eec630a2b2736f9abb59e37eaac122d4b771",
strip_prefix = "aspect-cli-5.8.20",
url = "https://github.com/aspect-build/aspect-cli/archive/5.8.20.tar.gz",
)
load("@aspect_bazel_lib//lib:repositories.bzl", "register_expand_template_toolchains", "register_jq_toolchains")
register_jq_toolchains()
register_expand_template_toolchains()
http_archive(
name = "rules_apko",
patch_args = ["-p1"],
patches = [
# required due to https://github.com/chainguard-dev/apko/issues/1052
"//third_party/rules_apko:repository_label_strip.patch",
# required until a release contains https://github.com/chainguard-dev/rules_apko/pull/53
"//third_party/rules_apko:apko_run_runfiles_path.patch",
# symlinking the lockfile appears to be problematic in CI https://github.com/sourcegraph/sourcegraph/pull/61877
"//third_party/rules_apko:copy_dont_symlink_lockfile.patch",
],
sha256 = "f176171f95ee2b6eef1572c6da796d627940a1e898a32d476a2d7a9a99332960",
strip_prefix = "rules_apko-1.2.2",
url = "https://github.com/chainguard-dev/rules_apko/releases/download/v1.2.2/rules_apko-v1.2.2.tar.gz",
)
# hermetic_cc_toolchain setup ================================
HERMETIC_CC_TOOLCHAIN_VERSION = "v2.2.1"
# Please note that we only use hermetic-cc for local development purpose and Nix, at it eases the path to cross-compile
# so we can produce container images locally on Mac laptops.
#
# @jhchabran See https://github.com/sourcegraph/sourcegraph/pull/55969, there is an ongoing issue with UBSAN
# and treesitter, that breaks the compilation of syntax-highlighter. Since we only use
# hermetic_cc for local development purposes, while it's a bit heavy handed for a --copt, it's acceptable
# at this point. Passing --copt=-fno-sanitize=undefined sadly doesn't fix the problem, which is why
# we have to patch to inject the flag.
http_archive(
name = "hermetic_cc_toolchain",
patch_args = ["-p1"],
patches = [
"//third_party/hermetic_cc:disable_ubsan.patch",
],
sha256 = "3b8107de0d017fe32e6434086a9568f97c60a111b49dc34fc7001e139c30fdea",
urls = [
"https://mirror.bazel.build/github.com/uber/hermetic_cc_toolchain/releases/download/{0}/hermetic_cc_toolchain-{0}.tar.gz".format(HERMETIC_CC_TOOLCHAIN_VERSION),
"https://github.com/uber/hermetic_cc_toolchain/releases/download/{0}/hermetic_cc_toolchain-{0}.tar.gz".format(HERMETIC_CC_TOOLCHAIN_VERSION),
],
)
# rules_js setup ================================
load("@aspect_rules_js//js:repositories.bzl", "rules_js_dependencies")
rules_js_dependencies()
# node toolchain setup ==========================
load("@rules_nodejs//nodejs:repositories.bzl", "nodejs_register_toolchains")
nodejs_register_toolchains(
name = "nodejs",
node_version = "20.8.0",
)
# rules_js npm setup ============================
load("@aspect_rules_js//npm:npm_import.bzl", "npm_translate_lock")
npm_translate_lock(
name = "npm",
npm_package_target_name = "{dirname}_pkg",
npmrc = "//:.npmrc",
pnpm_lock = "//:pnpm-lock.yaml",
# Required for ESLint test targets.
# See https://github.com/aspect-build/rules_js/issues/239
# See `public-hoist-pattern[]=*eslint*` in the `.npmrc` of this monorepo.
public_hoist_packages = {
"@typescript-eslint/eslint-plugin": [""],
"@typescript-eslint/parser@5.56.0_qxbo2xm47qt6fxnlmgbosp4hva": [""],
"eslint-config-prettier": [""],
"eslint-plugin-ban": [""],
"eslint-plugin-etc": [""],
"eslint-plugin-import": [""],
"eslint-plugin-jest-dom": [""],
"eslint-plugin-jsdoc": [""],
"eslint-plugin-jsx-a11y": [""],
"eslint-plugin-react@7.32.1_eslint_8.34.0": [""],
"eslint-plugin-react-hooks": [""],
"eslint-plugin-rxjs": [""],
"eslint-plugin-unicorn": [""],
"eslint-plugin-unused-imports": [""],
"eslint-import-resolver-node": [""],
},
verify_node_modules_ignored = "//:.bazelignore",
)
# rules_ts npm setup ============================
load("@npm//:repositories.bzl", "npm_repositories")
npm_repositories()
load("@aspect_rules_ts//ts:repositories.bzl", "rules_ts_dependencies")
rules_ts_dependencies(ts_version = "4.9.5")
# rules_swc setup ==============================
load("@aspect_rules_swc//swc:dependencies.bzl", "rules_swc_dependencies")
rules_swc_dependencies()
load("@aspect_rules_swc//swc:repositories.bzl", "LATEST_SWC_VERSION", "swc_register_toolchains")
swc_register_toolchains(
name = "swc",
swc_version = LATEST_SWC_VERSION,
)
# rules_esbuild setup ===========================
http_archive(
name = "aspect_rules_esbuild",
sha256 = "84419868e43c714c0d909dca73039e2f25427fc04f352d2f4f7343ca33f60deb",
strip_prefix = "rules_esbuild-0.15.3",
url = "https://github.com/aspect-build/rules_esbuild/releases/download/v0.15.3/rules_esbuild-v0.15.3.tar.gz",
)
load("@aspect_rules_esbuild//esbuild:dependencies.bzl", "rules_esbuild_dependencies")
rules_esbuild_dependencies()
# Register a toolchain containing esbuild npm package and native bindings
load("@aspect_rules_esbuild//esbuild:repositories.bzl", "LATEST_ESBUILD_VERSION", "esbuild_register_toolchains")
esbuild_register_toolchains(
name = "esbuild",
esbuild_version = LATEST_ESBUILD_VERSION,
)
# Go toolchain setup
load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies", "go_repository")
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
load("//:deps.bzl", "go_dependencies")
load("//:linter_deps.bzl", "linter_dependencies")
go_repository(
name = "com_github_aws_aws_sdk_go_v2_service_ssooidc",
build_file_proto_mode = "disable_global",
importpath = "github.com/aws/aws-sdk-go-v2/service/ssooidc",
sum = "h1:xLPZMyuZ4GuqRCIec/zWuIhRFPXh2UOJdLXBSi64ZWQ=",
version = "v1.14.5",
)
# Overrides the default provided protobuf dep from rules_go by a more
# recent one.
go_repository(
name = "org_golang_google_protobuf",
build_file_proto_mode = "disable_global",
importpath = "google.golang.org/protobuf",
sum = "h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=",
version = "v1.33.0",
)
# Pin protoc-gen-go-grpc to 1.3.0
# See also //:gen-go-grpc
go_repository(
name = "org_golang_google_grpc_cmd_protoc_gen_go_grpc",
build_file_proto_mode = "disable_global",
importpath = "google.golang.org/grpc/cmd/protoc-gen-go-grpc",
sum = "h1:rNBFJjBCOgVr9pWD7rs/knKL4FRTKgpZmsRfV214zcA=",
version = "v1.3.0",
) # keep
# Pin specific version for aspect-cli's gazelle rules, with versions
# that it requires but that our codebase doesnt support.
go_repository(
name = "aspectcli-com_github_smacker_go_tree_sitter",
build_file_proto_mode = "disable_global",
importpath = "github.com/smacker/go-tree-sitter",
sum = "h1:DxgjlvWYsb80WEN2Zv3WqJFAg2DKjUQJO6URGdf1x6Y=",
version = "v0.0.0-20230720070738-0d0a9f78d8f8",
) # keep
load("@aspect_cli//:go.bzl", aspect_cli_deps = "deps")
aspect_cli_deps()
# gazelle:repository_macro deps.bzl%go_dependencies
go_dependencies()
go_rules_dependencies()
go_register_toolchains(
nogo = "@//:sg_nogo",
version = "1.22.1",
)
linter_dependencies()
gazelle_dependencies()
# rust toolchain setup
load("@rules_rust//rust:repositories.bzl", "rules_rust_dependencies", "rust_register_toolchains", "rust_repository_set")
rules_rust_dependencies()
rust_version = "1.73.0"
rust_register_toolchains(
edition = "2021",
# Keep in sync with docker-images/syntax-highlighter/Dockerfile
# and docker-images/syntax-highlighter/rust-toolchain.toml
versions = [
rust_version,
],
)
# Needed for locally cross-compiling rust binaries to linux/amd64 on a Mac laptop, when seeking to
# create container images in local for testing purposes.
rust_repository_set(
name = "macos_arm_64",
edition = "2021",
exec_triple = "aarch64-apple-darwin",
extra_target_triples = ["x86_64-unknown-linux-gnu"],
versions = [rust_version],
)
load("@rules_rust//crate_universe:defs.bzl", "crates_repository")
crates_repository(
name = "crate_index",
cargo_config = "//docker-images/syntax-highlighter:.cargo/config.toml",
cargo_lockfile = "//docker-images/syntax-highlighter:Cargo.lock",
# this file has to be manually created and it will be filled when
# the target is ran.
# To regenerate this file run: CARGO_BAZEL_REPIN=1 bazel sync --only=crate_index
lockfile = "//docker-images/syntax-highlighter:Cargo.Bazel.lock",
# glob doesn't work in WORKSPACE files: https://github.com/bazelbuild/bazel/issues/11935
manifests = [
"//docker-images/syntax-highlighter:Cargo.toml",
"//docker-images/syntax-highlighter:crates/syntax-analysis/Cargo.toml",
"//docker-images/syntax-highlighter:crates/tree-sitter-all-languages/Cargo.toml",
"//docker-images/syntax-highlighter:crates/scip-syntax/Cargo.toml",
],
)
load("@crate_index//:defs.bzl", "crate_repositories")
crate_repositories()
load("@hermetic_cc_toolchain//toolchain:defs.bzl", zig_toolchains = "toolchains")
zig_toolchains()
# containers steup ===============================
load("@rules_oci//oci:dependencies.bzl", "rules_oci_dependencies")
rules_oci_dependencies()
load("@rules_oci//oci:repositories.bzl", "LATEST_CRANE_VERSION", "oci_register_toolchains")
oci_register_toolchains(
name = "oci",
crane_version = LATEST_CRANE_VERSION,
# Uncommenting the zot toolchain will cause it to be used instead of crane for some tasks.
# Note that it does not support docker-format images.
# zot_version = LATEST_ZOT_VERSION,
)
# Optional, for oci_tarball rule
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")
rules_pkg_dependencies()
load("//dev:oci_deps.bzl", "oci_deps")
oci_deps()
load("@container_structure_test//:repositories.bzl", "container_structure_test_register_toolchain")
container_structure_test_register_toolchain(name = "cst")
load("//dev:tool_deps.bzl", "tool_deps")
tool_deps()
# Buildifier
load("@buildifier_prebuilt//:deps.bzl", "buildifier_prebuilt_deps")
buildifier_prebuilt_deps()
load("@buildifier_prebuilt//:defs.bzl", "buildifier_prebuilt_register_toolchains")
buildifier_prebuilt_register_toolchains()
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
rules_proto_dependencies()
rules_proto_toolchains()
load("@rules_proto_grpc//:repositories.bzl", "rules_proto_grpc_repos", "rules_proto_grpc_toolchains")
load("@rules_proto_grpc//doc:repositories.bzl", rules_proto_grpc_doc_repos = "doc_repos")
load("@rules_proto_grpc//go:repositories.bzl", rules_proto_grpc_go_repos = "go_repos")
rules_proto_grpc_toolchains()
rules_proto_grpc_repos()
rules_proto_grpc_go_repos()
rules_proto_grpc_doc_repos()
load("@rules_buf//buf:repositories.bzl", "rules_buf_dependencies", "rules_buf_toolchains")
rules_buf_dependencies()
rules_buf_toolchains(
sha256 = "f227f04f3f910a7611e8841d50172e3c0e9a94ad21760e6f8abbe3666d682ab5",
version = "v1.31.0",
)
load("@rules_buf//gazelle/buf:repositories.bzl", "gazelle_buf_dependencies")
gazelle_buf_dependencies()
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
protobuf_deps()
# keep revision up-to-date with client/browser/scripts/build-inline-extensions.js
http_archive(
name = "sourcegraph_extensions_bundle",
add_prefix = "bundle",
build_file_content = """
package(default_visibility = ["//visibility:public"])
exports_files(["bundle"])
filegroup(
name = "srcs",
srcs = glob(["**"]),
)
""",
integrity = "sha256-Spx8LyM7k+dsGOlZ4TdAq+CNk5EzvYB/oxnY4zGpqPg=",
strip_prefix = "sourcegraph-extensions-bundles-5.0.1",
url = "https://github.com/sourcegraph/sourcegraph-extensions-bundles/archive/v5.0.1.zip",
)
load("//dev:schema_migrations.bzl", "schema_migrations")
schema_migrations(
name = "schemas_migrations",
updated_at = "2024-05-07 14:39",
)
# wolfi images setup ================================
load("@rules_apko//apko:repositories.bzl", "apko_register_toolchains", "rules_apko_dependencies")
rules_apko_dependencies()
# We don't register the default toolchains, and regsiter our own from a patched go_repository sourced
# go_binary target that contains some fixes that are not yet merged upstream.
# https://github.com/chainguard-dev/go-apk/pull/216
apko_register_toolchains(
name = "apko",
register = False,
)
register_toolchains("//:apko_linux_toolchain")
register_toolchains("//:apko_darwin_arm64_toolchain")
register_toolchains("//:apko_darwin_amd64_toolchain")
load("//wolfi-images:repo.bzl", "wolfi_lockfiles")
wolfi_lockfiles(name = "apko_lockfiles")
load("@apko_lockfiles//:translates.bzl", "apko_translate_locks")
apko_translate_locks()
load("@apko_lockfiles//:repositories.bzl", "apko_repositories")
apko_repositories()
HTML/CSS
1
https://gitee.com/mirrors/Sourcegraph.git
git@gitee.com:mirrors/Sourcegraph.git
mirrors
Sourcegraph
Sourcegraph
main

搜索帮助