mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Rust: log detected manifests
This commit is contained in:
34
Cargo.lock
generated
34
Cargo.lock
generated
@@ -265,7 +265,7 @@ dependencies = [
|
|||||||
"chalk-ir",
|
"chalk-ir",
|
||||||
"ena",
|
"ena",
|
||||||
"indexmap 2.5.0",
|
"indexmap 2.5.0",
|
||||||
"itertools",
|
"itertools 0.12.1",
|
||||||
"petgraph",
|
"petgraph",
|
||||||
"rustc-hash",
|
"rustc-hash",
|
||||||
"tracing",
|
"tracing",
|
||||||
@@ -374,6 +374,7 @@ dependencies = [
|
|||||||
"clap",
|
"clap",
|
||||||
"codeql-extractor",
|
"codeql-extractor",
|
||||||
"figment",
|
"figment",
|
||||||
|
"itertools 0.13.0",
|
||||||
"log",
|
"log",
|
||||||
"num-traits",
|
"num-traits",
|
||||||
"ra_ap_base_db",
|
"ra_ap_base_db",
|
||||||
@@ -857,6 +858,15 @@ dependencies = [
|
|||||||
"either",
|
"either",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "itertools"
|
||||||
|
version = "0.13.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"
|
||||||
|
dependencies = [
|
||||||
|
"either",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "itoa"
|
name = "itoa"
|
||||||
version = "1.0.11"
|
version = "1.0.11"
|
||||||
@@ -1333,7 +1343,7 @@ checksum = "c7c38520eb4770af561c34b908431f4e548c3282093cf3daf3c6e566d99a2937"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"arrayvec",
|
"arrayvec",
|
||||||
"either",
|
"either",
|
||||||
"itertools",
|
"itertools 0.12.1",
|
||||||
"ra_ap_base_db",
|
"ra_ap_base_db",
|
||||||
"ra_ap_cfg",
|
"ra_ap_cfg",
|
||||||
"ra_ap_hir_def",
|
"ra_ap_hir_def",
|
||||||
@@ -1365,7 +1375,7 @@ dependencies = [
|
|||||||
"fst",
|
"fst",
|
||||||
"hashbrown 0.14.5",
|
"hashbrown 0.14.5",
|
||||||
"indexmap 2.5.0",
|
"indexmap 2.5.0",
|
||||||
"itertools",
|
"itertools 0.12.1",
|
||||||
"la-arena",
|
"la-arena",
|
||||||
"ra-ap-rustc_abi",
|
"ra-ap-rustc_abi",
|
||||||
"ra-ap-rustc_parse_format",
|
"ra-ap-rustc_parse_format",
|
||||||
@@ -1395,7 +1405,7 @@ dependencies = [
|
|||||||
"cov-mark",
|
"cov-mark",
|
||||||
"either",
|
"either",
|
||||||
"hashbrown 0.14.5",
|
"hashbrown 0.14.5",
|
||||||
"itertools",
|
"itertools 0.12.1",
|
||||||
"la-arena",
|
"la-arena",
|
||||||
"ra_ap_base_db",
|
"ra_ap_base_db",
|
||||||
"ra_ap_cfg",
|
"ra_ap_cfg",
|
||||||
@@ -1430,7 +1440,7 @@ dependencies = [
|
|||||||
"either",
|
"either",
|
||||||
"ena",
|
"ena",
|
||||||
"indexmap 2.5.0",
|
"indexmap 2.5.0",
|
||||||
"itertools",
|
"itertools 0.12.1",
|
||||||
"la-arena",
|
"la-arena",
|
||||||
"nohash-hasher",
|
"nohash-hasher",
|
||||||
"oorandom",
|
"oorandom",
|
||||||
@@ -1467,7 +1477,7 @@ dependencies = [
|
|||||||
"either",
|
"either",
|
||||||
"fst",
|
"fst",
|
||||||
"indexmap 2.5.0",
|
"indexmap 2.5.0",
|
||||||
"itertools",
|
"itertools 0.12.1",
|
||||||
"line-index",
|
"line-index",
|
||||||
"memchr",
|
"memchr",
|
||||||
"nohash-hasher",
|
"nohash-hasher",
|
||||||
@@ -1513,7 +1523,7 @@ checksum = "82e6f24b61f1ef1f3a756493d1fb7e711b69b2e4d5f4746fcb959313dfd41471"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"crossbeam-channel",
|
"crossbeam-channel",
|
||||||
"itertools",
|
"itertools 0.12.1",
|
||||||
"ra_ap_hir_expand",
|
"ra_ap_hir_expand",
|
||||||
"ra_ap_ide_db",
|
"ra_ap_ide_db",
|
||||||
"ra_ap_intern",
|
"ra_ap_intern",
|
||||||
@@ -1608,7 +1618,7 @@ checksum = "db83d1844c74b22c110c4b8e8f2519be2b1723964008527281a11c3398749756"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"cargo_metadata",
|
"cargo_metadata",
|
||||||
"itertools",
|
"itertools 0.12.1",
|
||||||
"la-arena",
|
"la-arena",
|
||||||
"ra_ap_base_db",
|
"ra_ap_base_db",
|
||||||
"ra_ap_cfg",
|
"ra_ap_cfg",
|
||||||
@@ -1632,7 +1642,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "370b302873eeafd07ccc6a714fc9395cae11e385955ccb78081093ee3b86f94e"
|
checksum = "370b302873eeafd07ccc6a714fc9395cae11e385955ccb78081093ee3b86f94e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"indexmap 2.5.0",
|
"indexmap 2.5.0",
|
||||||
"itertools",
|
"itertools 0.12.1",
|
||||||
"lock_api",
|
"lock_api",
|
||||||
"oorandom",
|
"oorandom",
|
||||||
"parking_lot",
|
"parking_lot",
|
||||||
@@ -1679,7 +1689,7 @@ checksum = "bb63ff9d6b11b4553fc0835f16705975258905e3b1230fcf1ddbf24c46aff69d"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"always-assert",
|
"always-assert",
|
||||||
"crossbeam-channel",
|
"crossbeam-channel",
|
||||||
"itertools",
|
"itertools 0.12.1",
|
||||||
"jod-thread",
|
"jod-thread",
|
||||||
"libc",
|
"libc",
|
||||||
"miow",
|
"miow",
|
||||||
@@ -1695,7 +1705,7 @@ dependencies = [
|
|||||||
"cov-mark",
|
"cov-mark",
|
||||||
"either",
|
"either",
|
||||||
"indexmap 2.5.0",
|
"indexmap 2.5.0",
|
||||||
"itertools",
|
"itertools 0.12.1",
|
||||||
"ra-ap-rustc_lexer",
|
"ra-ap-rustc_lexer",
|
||||||
"ra_ap_parser",
|
"ra_ap_parser",
|
||||||
"ra_ap_stdx",
|
"ra_ap_stdx",
|
||||||
@@ -1729,7 +1739,7 @@ version = "0.0.232"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7cb72ee1901baec556f4f2ef77e287d749ac0e973f063990672d6207b076aeac"
|
checksum = "7cb72ee1901baec556f4f2ef77e287d749ac0e973f063990672d6207b076aeac"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"itertools",
|
"itertools 0.12.1",
|
||||||
"text-size",
|
"text-size",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -25,3 +25,4 @@ triomphe = "0.1.13"
|
|||||||
argfile = "0.2.1"
|
argfile = "0.2.1"
|
||||||
codeql-extractor = { path = "../../shared/tree-sitter-extractor" }
|
codeql-extractor = { path = "../../shared/tree-sitter-extractor" }
|
||||||
rust-extractor-macros = { path = "macros" }
|
rust-extractor-macros = { path = "macros" }
|
||||||
|
itertools = "0.13.0"
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
use crate::trap::TrapId;
|
use crate::trap::TrapId;
|
||||||
use anyhow::Context;
|
use anyhow::Context;
|
||||||
|
use itertools::Itertools;
|
||||||
|
use log::info;
|
||||||
use ra_ap_hir::db::DefDatabase;
|
use ra_ap_hir::db::DefDatabase;
|
||||||
use ra_ap_hir::Crate;
|
use ra_ap_hir::Crate;
|
||||||
use ra_ap_load_cargo::{load_workspace_at, LoadCargoConfig, ProcMacroServerChoice};
|
use ra_ap_load_cargo::{load_workspace_at, LoadCargoConfig, ProcMacroServerChoice};
|
||||||
@@ -22,9 +24,12 @@ fn find_project_manifests(
|
|||||||
.iter()
|
.iter()
|
||||||
.map(|path| AbsPathBuf::assert_utf8(current.join(path)))
|
.map(|path| AbsPathBuf::assert_utf8(current.join(path)))
|
||||||
.collect();
|
.collect();
|
||||||
Ok(ra_ap_project_model::ProjectManifest::discover_all(
|
let ret = ra_ap_project_model::ProjectManifest::discover_all(&abs_files);
|
||||||
&abs_files,
|
info!(
|
||||||
))
|
"found manifests: {}",
|
||||||
|
ret.iter().map(|m| format!("{m}")).join(", ")
|
||||||
|
);
|
||||||
|
Ok(ret)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn main() -> anyhow::Result<()> {
|
fn main() -> anyhow::Result<()> {
|
||||||
|
|||||||
Reference in New Issue
Block a user