mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Ruby: Change how we pull in shared/tree-sitter-extractor dependency
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.
This commit is contained in:
@@ -364,5 +364,9 @@
|
||||
"Python model summaries test extension": [
|
||||
"python/ql/test/library-tests/dataflow/model-summaries/InlineTaintTest.ext.yml",
|
||||
"python/ql/test/library-tests/dataflow/model-summaries/NormalDataflowTest.ext.yml"
|
||||
],
|
||||
"shared tree-sitter extractor cargo.toml": [
|
||||
"shared/tree-sitter-extractor/Cargo.toml",
|
||||
"ruby/extractor/codeql-extractor-fake-crate/Cargo.toml"
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user