mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
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.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
load("@py_deps//:defs.bzl", "aliases", "all_crate_deps")
|
||||
load("//misc/bazel:rust.bzl", "codeql_rust_binary")
|
||||
load("//misc/bazel/3rdparty/py_deps:defs.bzl", "aliases", "all_crate_deps")
|
||||
|
||||
codeql_rust_binary(
|
||||
name = "tsg-python",
|
||||
@@ -14,3 +14,8 @@ codeql_rust_binary(
|
||||
normal = True,
|
||||
) + ["//python/extractor/tsg-python/tsp"],
|
||||
)
|
||||
|
||||
exports_files([
|
||||
"Cargo.toml",
|
||||
"Cargo.lock",
|
||||
])
|
||||
|
||||
@@ -6,6 +6,7 @@ version = "0.1.0"
|
||||
authors = ["Taus Brock-Nannestad <tausbn@github.com>"]
|
||||
edition = "2021"
|
||||
|
||||
# When updating these dependencies, run `misc/bazel/3rdparty/update_cargo_deps.sh`
|
||||
[dependencies]
|
||||
anyhow = "1.0"
|
||||
regex = "1"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
load("@py_deps//:defs.bzl", "aliases", "all_crate_deps")
|
||||
load("@rules_rust//cargo:defs.bzl", "cargo_build_script")
|
||||
load("@rules_rust//rust:defs.bzl", "rust_library")
|
||||
load("//misc/bazel/3rdparty/py_deps:defs.bzl", "aliases", "all_crate_deps")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
@@ -36,3 +36,5 @@ rust_library(
|
||||
normal = True,
|
||||
),
|
||||
)
|
||||
|
||||
exports_files(["Cargo.toml"])
|
||||
|
||||
@@ -24,6 +24,7 @@ include = [
|
||||
[lib]
|
||||
path = "bindings/rust/lib.rs"
|
||||
|
||||
## When updating these dependencies, run `misc/bazel/3rdparty/update_cargo_deps.sh`
|
||||
[dependencies]
|
||||
tree-sitter = ">= 0.20, < 0.21"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user