mirror of
https://github.com/github/codeql.git
synced 2026-02-18 07:53:43 +01:00
Previously, we pulled in the shared tree-sitter extractor via a `git` dependency in `Cargo.toml` to address a `rules_rust` limitation (no `path` dependencies outside of the cargo workspace)). This was a problem, as that means we're cloning `github/codeql` _again_ for the build, which is quite slow. I found another way that is faster, and still produces correct builds for both `cargo`` and `rules_rust`: * Cargo depends on a fake crate that has the same dependencies as the real crate (thanks to `sync-files.py`). Therefore, cargo pulls in the right dependencies into the lockfile, which bazel targets * For local builds, we override the path to that dependency in a cargo config, so we're pulling in the correct code * rules_rust only uses `path` dependencies for collecting transitive dependencies, it never pulls in the code from there. So far that, we manually provide a `BUILD.bazel` file for the shared extractor, and depend on that.
29 lines
791 B
TOML
29 lines
791 B
TOML
[package]
|
|
name = "codeql-extractor"
|
|
version = "0.2.0"
|
|
edition = "2021"
|
|
authors = ["GitHub"]
|
|
|
|
[dependencies]
|
|
flate2 = "1.0"
|
|
globset = "0.4"
|
|
tree-sitter = ">= 0.22.6"
|
|
tracing = "0.1"
|
|
tracing-subscriber = { version = "0.3.3", features = ["env-filter"] }
|
|
rayon = "1.5.0"
|
|
regex = "1.7.1"
|
|
encoding = "0.2"
|
|
lazy_static = "1.4.0"
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
serde_json = "1.0"
|
|
chrono = { version = "0.4.19", features = ["serde"] }
|
|
num_cpus = "1.14.0"
|
|
|
|
[dev-dependencies]
|
|
tree-sitter-ql = { git = "https://github.com/tree-sitter/tree-sitter-ql" }
|
|
tree-sitter-json = {git = "https://github.com/tree-sitter/tree-sitter-json" }
|
|
rand = "0.8.5"
|
|
|
|
[patch.crates-io]
|
|
tree-sitter = {git = "https://github.com/redsun82/tree-sitter.git", rev = "1f5c1112ceaa8fc6aff61d1852690407670d2a96"}
|