Files
codeql/misc/bazel/3rdparty/tree_sitter_extractors_deps/crates.bzl
Cornelius Riemenschneider a66f8209f9 Rust: Vendor 3rdparty dependencies.
We've been observing some performance issues using crate_universe on CI.
Therefore, we're moving to vendor the auto-generated BUILD files
in our repository. This should provide a nice speed boost, while
getting rid of the complexity of the "rust cache" job we've been using
when we had a lot of git dependencies.

This PR includes a vendor script, and I'll put up a CI job internally
that runs that vendor script on Cargo.toml and Cargo.lock changes, to check
that the vendored files are in sync.
2024-11-13 13:22:14 +01:00

33 lines
1.3 KiB
Python
Generated

###############################################################################
# @generated
# This file is auto-generated by the cargo-bazel tool.
#
# DO NOT MODIFY: Local changes may be replaced in future executions.
###############################################################################
"""Rules for defining repositories for remote `crates_vendor` repositories"""
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
# buildifier: disable=bzl-visibility
load("@rules_rust//crate_universe/private:crates_vendor.bzl", "crates_vendor_remote_repository")
# buildifier: disable=bzl-visibility
load("//misc/bazel/3rdparty/tree_sitter_extractors_deps:defs.bzl", _crate_repositories = "crate_repositories")
def crate_repositories():
"""Generates repositories for vendored crates.
Returns:
A list of repos visible to the module through the module extension.
"""
maybe(
crates_vendor_remote_repository,
name = "vendor",
build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.bazel"),
defs_module = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:defs.bzl"),
)
direct_deps = [struct(repo = "vendor", is_dev_dep = False)]
direct_deps.extend(_crate_repositories())
return direct_deps