mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Rust: aggregate projects into workspaces
This commit is contained in:
53
Cargo.lock
generated
53
Cargo.lock
generated
@@ -436,6 +436,7 @@ dependencies = [
|
|||||||
"serde_json",
|
"serde_json",
|
||||||
"serde_with",
|
"serde_with",
|
||||||
"stderrlog",
|
"stderrlog",
|
||||||
|
"toml",
|
||||||
"triomphe",
|
"triomphe",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -2094,6 +2095,15 @@ dependencies = [
|
|||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "serde_spanned"
|
||||||
|
version = "0.6.8"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1"
|
||||||
|
dependencies = [
|
||||||
|
"serde",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_with"
|
name = "serde_with"
|
||||||
version = "3.12.0"
|
version = "3.12.0"
|
||||||
@@ -2303,6 +2313,40 @@ dependencies = [
|
|||||||
"time-core",
|
"time-core",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "toml"
|
||||||
|
version = "0.8.19"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e"
|
||||||
|
dependencies = [
|
||||||
|
"serde",
|
||||||
|
"serde_spanned",
|
||||||
|
"toml_datetime",
|
||||||
|
"toml_edit",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "toml_datetime"
|
||||||
|
version = "0.6.8"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41"
|
||||||
|
dependencies = [
|
||||||
|
"serde",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "toml_edit"
|
||||||
|
version = "0.22.22"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5"
|
||||||
|
dependencies = [
|
||||||
|
"indexmap 2.7.0",
|
||||||
|
"serde",
|
||||||
|
"serde_spanned",
|
||||||
|
"toml_datetime",
|
||||||
|
"winnow",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tracing"
|
name = "tracing"
|
||||||
version = "0.1.41"
|
version = "0.1.41"
|
||||||
@@ -2754,6 +2798,15 @@ version = "0.52.6"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
|
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "winnow"
|
||||||
|
version = "0.6.24"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "c8d71a593cc5c42ad7876e2c1fda56f314f3754c084128833e64f1345ff8a03a"
|
||||||
|
dependencies = [
|
||||||
|
"memchr",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "yansi"
|
name = "yansi"
|
||||||
version = "1.0.1"
|
version = "1.0.1"
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ use_repo(
|
|||||||
"vendor__serde_with-3.12.0",
|
"vendor__serde_with-3.12.0",
|
||||||
"vendor__stderrlog-0.6.0",
|
"vendor__stderrlog-0.6.0",
|
||||||
"vendor__syn-2.0.96",
|
"vendor__syn-2.0.96",
|
||||||
|
"vendor__toml-0.8.19",
|
||||||
"vendor__tracing-0.1.41",
|
"vendor__tracing-0.1.41",
|
||||||
"vendor__tracing-subscriber-0.3.19",
|
"vendor__tracing-subscriber-0.3.19",
|
||||||
"vendor__tree-sitter-0.24.6",
|
"vendor__tree-sitter-0.24.6",
|
||||||
|
|||||||
6
misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.bazel
generated
vendored
6
misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.bazel
generated
vendored
@@ -283,6 +283,12 @@ alias(
|
|||||||
tags = ["manual"],
|
tags = ["manual"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
alias(
|
||||||
|
name = "toml",
|
||||||
|
actual = "@vendor__toml-0.8.19//:toml",
|
||||||
|
tags = ["manual"],
|
||||||
|
)
|
||||||
|
|
||||||
alias(
|
alias(
|
||||||
name = "tracing",
|
name = "tracing",
|
||||||
actual = "@vendor__tracing-0.1.41//:tracing",
|
actual = "@vendor__tracing-0.1.41//:tracing",
|
||||||
|
|||||||
87
misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.serde_spanned-0.6.8.bazel
generated
vendored
Normal file
87
misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.serde_spanned-0.6.8.bazel
generated
vendored
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
###############################################################################
|
||||||
|
# @generated
|
||||||
|
# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
|
||||||
|
# regenerate this file, run the following:
|
||||||
|
#
|
||||||
|
# bazel run @@//misc/bazel/3rdparty:vendor_tree_sitter_extractors
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
load("@rules_rust//rust:defs.bzl", "rust_library")
|
||||||
|
|
||||||
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
|
rust_library(
|
||||||
|
name = "serde_spanned",
|
||||||
|
srcs = glob(
|
||||||
|
include = ["**/*.rs"],
|
||||||
|
allow_empty = True,
|
||||||
|
),
|
||||||
|
compile_data = glob(
|
||||||
|
include = ["**"],
|
||||||
|
allow_empty = True,
|
||||||
|
exclude = [
|
||||||
|
"**/* *",
|
||||||
|
".tmp_git_root/**/*",
|
||||||
|
"BUILD",
|
||||||
|
"BUILD.bazel",
|
||||||
|
"WORKSPACE",
|
||||||
|
"WORKSPACE.bazel",
|
||||||
|
],
|
||||||
|
),
|
||||||
|
crate_features = [
|
||||||
|
"serde",
|
||||||
|
],
|
||||||
|
crate_root = "src/lib.rs",
|
||||||
|
edition = "2021",
|
||||||
|
rustc_flags = [
|
||||||
|
"--cap-lints=allow",
|
||||||
|
],
|
||||||
|
tags = [
|
||||||
|
"cargo-bazel",
|
||||||
|
"crate-name=serde_spanned",
|
||||||
|
"manual",
|
||||||
|
"noclippy",
|
||||||
|
"norustfmt",
|
||||||
|
],
|
||||||
|
target_compatible_with = select({
|
||||||
|
"@rules_rust//rust/platform:aarch64-apple-darwin": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-apple-ios": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-fuchsia": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-linux-android": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
|
||||||
|
"@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
|
||||||
|
"@rules_rust//rust/platform:armv7-linux-androideabi": [],
|
||||||
|
"@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
|
||||||
|
"@rules_rust//rust/platform:i686-apple-darwin": [],
|
||||||
|
"@rules_rust//rust/platform:i686-linux-android": [],
|
||||||
|
"@rules_rust//rust/platform:i686-pc-windows-msvc": [],
|
||||||
|
"@rules_rust//rust/platform:i686-unknown-freebsd": [],
|
||||||
|
"@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
|
||||||
|
"@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
|
||||||
|
"@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
|
||||||
|
"@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
|
||||||
|
"@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
|
||||||
|
"@rules_rust//rust/platform:thumbv7em-none-eabi": [],
|
||||||
|
"@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
|
||||||
|
"@rules_rust//rust/platform:wasm32-unknown-unknown": [],
|
||||||
|
"@rules_rust//rust/platform:wasm32-wasi": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-apple-darwin": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-apple-ios": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-fuchsia": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-linux-android": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-unknown-none": [],
|
||||||
|
"//conditions:default": ["@platforms//:incompatible"],
|
||||||
|
}),
|
||||||
|
version = "0.6.8",
|
||||||
|
deps = [
|
||||||
|
"@vendor__serde-1.0.217//:serde",
|
||||||
|
],
|
||||||
|
)
|
||||||
92
misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.toml-0.8.19.bazel
generated
vendored
Normal file
92
misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.toml-0.8.19.bazel
generated
vendored
Normal file
@@ -0,0 +1,92 @@
|
|||||||
|
###############################################################################
|
||||||
|
# @generated
|
||||||
|
# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
|
||||||
|
# regenerate this file, run the following:
|
||||||
|
#
|
||||||
|
# bazel run @@//misc/bazel/3rdparty:vendor_tree_sitter_extractors
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
load("@rules_rust//rust:defs.bzl", "rust_library")
|
||||||
|
|
||||||
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
|
rust_library(
|
||||||
|
name = "toml",
|
||||||
|
srcs = glob(
|
||||||
|
include = ["**/*.rs"],
|
||||||
|
allow_empty = True,
|
||||||
|
),
|
||||||
|
compile_data = glob(
|
||||||
|
include = ["**"],
|
||||||
|
allow_empty = True,
|
||||||
|
exclude = [
|
||||||
|
"**/* *",
|
||||||
|
".tmp_git_root/**/*",
|
||||||
|
"BUILD",
|
||||||
|
"BUILD.bazel",
|
||||||
|
"WORKSPACE",
|
||||||
|
"WORKSPACE.bazel",
|
||||||
|
],
|
||||||
|
),
|
||||||
|
crate_features = [
|
||||||
|
"default",
|
||||||
|
"display",
|
||||||
|
"parse",
|
||||||
|
],
|
||||||
|
crate_root = "src/lib.rs",
|
||||||
|
edition = "2021",
|
||||||
|
rustc_flags = [
|
||||||
|
"--cap-lints=allow",
|
||||||
|
],
|
||||||
|
tags = [
|
||||||
|
"cargo-bazel",
|
||||||
|
"crate-name=toml",
|
||||||
|
"manual",
|
||||||
|
"noclippy",
|
||||||
|
"norustfmt",
|
||||||
|
],
|
||||||
|
target_compatible_with = select({
|
||||||
|
"@rules_rust//rust/platform:aarch64-apple-darwin": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-apple-ios": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-fuchsia": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-linux-android": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
|
||||||
|
"@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
|
||||||
|
"@rules_rust//rust/platform:armv7-linux-androideabi": [],
|
||||||
|
"@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
|
||||||
|
"@rules_rust//rust/platform:i686-apple-darwin": [],
|
||||||
|
"@rules_rust//rust/platform:i686-linux-android": [],
|
||||||
|
"@rules_rust//rust/platform:i686-pc-windows-msvc": [],
|
||||||
|
"@rules_rust//rust/platform:i686-unknown-freebsd": [],
|
||||||
|
"@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
|
||||||
|
"@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
|
||||||
|
"@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
|
||||||
|
"@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
|
||||||
|
"@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
|
||||||
|
"@rules_rust//rust/platform:thumbv7em-none-eabi": [],
|
||||||
|
"@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
|
||||||
|
"@rules_rust//rust/platform:wasm32-unknown-unknown": [],
|
||||||
|
"@rules_rust//rust/platform:wasm32-wasi": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-apple-darwin": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-apple-ios": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-fuchsia": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-linux-android": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-unknown-none": [],
|
||||||
|
"//conditions:default": ["@platforms//:incompatible"],
|
||||||
|
}),
|
||||||
|
version = "0.8.19",
|
||||||
|
deps = [
|
||||||
|
"@vendor__serde-1.0.217//:serde",
|
||||||
|
"@vendor__serde_spanned-0.6.8//:serde_spanned",
|
||||||
|
"@vendor__toml_datetime-0.6.8//:toml_datetime",
|
||||||
|
"@vendor__toml_edit-0.22.22//:toml_edit",
|
||||||
|
],
|
||||||
|
)
|
||||||
87
misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.toml_datetime-0.6.8.bazel
generated
vendored
Normal file
87
misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.toml_datetime-0.6.8.bazel
generated
vendored
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
###############################################################################
|
||||||
|
# @generated
|
||||||
|
# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
|
||||||
|
# regenerate this file, run the following:
|
||||||
|
#
|
||||||
|
# bazel run @@//misc/bazel/3rdparty:vendor_tree_sitter_extractors
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
load("@rules_rust//rust:defs.bzl", "rust_library")
|
||||||
|
|
||||||
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
|
rust_library(
|
||||||
|
name = "toml_datetime",
|
||||||
|
srcs = glob(
|
||||||
|
include = ["**/*.rs"],
|
||||||
|
allow_empty = True,
|
||||||
|
),
|
||||||
|
compile_data = glob(
|
||||||
|
include = ["**"],
|
||||||
|
allow_empty = True,
|
||||||
|
exclude = [
|
||||||
|
"**/* *",
|
||||||
|
".tmp_git_root/**/*",
|
||||||
|
"BUILD",
|
||||||
|
"BUILD.bazel",
|
||||||
|
"WORKSPACE",
|
||||||
|
"WORKSPACE.bazel",
|
||||||
|
],
|
||||||
|
),
|
||||||
|
crate_features = [
|
||||||
|
"serde",
|
||||||
|
],
|
||||||
|
crate_root = "src/lib.rs",
|
||||||
|
edition = "2021",
|
||||||
|
rustc_flags = [
|
||||||
|
"--cap-lints=allow",
|
||||||
|
],
|
||||||
|
tags = [
|
||||||
|
"cargo-bazel",
|
||||||
|
"crate-name=toml_datetime",
|
||||||
|
"manual",
|
||||||
|
"noclippy",
|
||||||
|
"norustfmt",
|
||||||
|
],
|
||||||
|
target_compatible_with = select({
|
||||||
|
"@rules_rust//rust/platform:aarch64-apple-darwin": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-apple-ios": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-fuchsia": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-linux-android": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
|
||||||
|
"@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
|
||||||
|
"@rules_rust//rust/platform:armv7-linux-androideabi": [],
|
||||||
|
"@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
|
||||||
|
"@rules_rust//rust/platform:i686-apple-darwin": [],
|
||||||
|
"@rules_rust//rust/platform:i686-linux-android": [],
|
||||||
|
"@rules_rust//rust/platform:i686-pc-windows-msvc": [],
|
||||||
|
"@rules_rust//rust/platform:i686-unknown-freebsd": [],
|
||||||
|
"@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
|
||||||
|
"@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
|
||||||
|
"@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
|
||||||
|
"@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
|
||||||
|
"@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
|
||||||
|
"@rules_rust//rust/platform:thumbv7em-none-eabi": [],
|
||||||
|
"@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
|
||||||
|
"@rules_rust//rust/platform:wasm32-unknown-unknown": [],
|
||||||
|
"@rules_rust//rust/platform:wasm32-wasi": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-apple-darwin": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-apple-ios": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-fuchsia": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-linux-android": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-unknown-none": [],
|
||||||
|
"//conditions:default": ["@platforms//:incompatible"],
|
||||||
|
}),
|
||||||
|
version = "0.6.8",
|
||||||
|
deps = [
|
||||||
|
"@vendor__serde-1.0.217//:serde",
|
||||||
|
],
|
||||||
|
)
|
||||||
93
misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.toml_edit-0.22.22.bazel
generated
vendored
Normal file
93
misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.toml_edit-0.22.22.bazel
generated
vendored
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
###############################################################################
|
||||||
|
# @generated
|
||||||
|
# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
|
||||||
|
# regenerate this file, run the following:
|
||||||
|
#
|
||||||
|
# bazel run @@//misc/bazel/3rdparty:vendor_tree_sitter_extractors
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
load("@rules_rust//rust:defs.bzl", "rust_library")
|
||||||
|
|
||||||
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
|
rust_library(
|
||||||
|
name = "toml_edit",
|
||||||
|
srcs = glob(
|
||||||
|
include = ["**/*.rs"],
|
||||||
|
allow_empty = True,
|
||||||
|
),
|
||||||
|
compile_data = glob(
|
||||||
|
include = ["**"],
|
||||||
|
allow_empty = True,
|
||||||
|
exclude = [
|
||||||
|
"**/* *",
|
||||||
|
".tmp_git_root/**/*",
|
||||||
|
"BUILD",
|
||||||
|
"BUILD.bazel",
|
||||||
|
"WORKSPACE",
|
||||||
|
"WORKSPACE.bazel",
|
||||||
|
],
|
||||||
|
),
|
||||||
|
crate_features = [
|
||||||
|
"display",
|
||||||
|
"parse",
|
||||||
|
"serde",
|
||||||
|
],
|
||||||
|
crate_root = "src/lib.rs",
|
||||||
|
edition = "2021",
|
||||||
|
rustc_flags = [
|
||||||
|
"--cap-lints=allow",
|
||||||
|
],
|
||||||
|
tags = [
|
||||||
|
"cargo-bazel",
|
||||||
|
"crate-name=toml_edit",
|
||||||
|
"manual",
|
||||||
|
"noclippy",
|
||||||
|
"norustfmt",
|
||||||
|
],
|
||||||
|
target_compatible_with = select({
|
||||||
|
"@rules_rust//rust/platform:aarch64-apple-darwin": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-apple-ios": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-fuchsia": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-linux-android": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
|
||||||
|
"@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
|
||||||
|
"@rules_rust//rust/platform:armv7-linux-androideabi": [],
|
||||||
|
"@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
|
||||||
|
"@rules_rust//rust/platform:i686-apple-darwin": [],
|
||||||
|
"@rules_rust//rust/platform:i686-linux-android": [],
|
||||||
|
"@rules_rust//rust/platform:i686-pc-windows-msvc": [],
|
||||||
|
"@rules_rust//rust/platform:i686-unknown-freebsd": [],
|
||||||
|
"@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
|
||||||
|
"@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
|
||||||
|
"@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
|
||||||
|
"@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
|
||||||
|
"@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
|
||||||
|
"@rules_rust//rust/platform:thumbv7em-none-eabi": [],
|
||||||
|
"@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
|
||||||
|
"@rules_rust//rust/platform:wasm32-unknown-unknown": [],
|
||||||
|
"@rules_rust//rust/platform:wasm32-wasi": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-apple-darwin": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-apple-ios": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-fuchsia": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-linux-android": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-unknown-none": [],
|
||||||
|
"//conditions:default": ["@platforms//:incompatible"],
|
||||||
|
}),
|
||||||
|
version = "0.22.22",
|
||||||
|
deps = [
|
||||||
|
"@vendor__indexmap-2.7.0//:indexmap",
|
||||||
|
"@vendor__serde-1.0.217//:serde",
|
||||||
|
"@vendor__serde_spanned-0.6.8//:serde_spanned",
|
||||||
|
"@vendor__toml_datetime-0.6.8//:toml_datetime",
|
||||||
|
"@vendor__winnow-0.6.24//:winnow",
|
||||||
|
],
|
||||||
|
)
|
||||||
86
misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.winnow-0.6.24.bazel
generated
vendored
Normal file
86
misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.winnow-0.6.24.bazel
generated
vendored
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
###############################################################################
|
||||||
|
# @generated
|
||||||
|
# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
|
||||||
|
# regenerate this file, run the following:
|
||||||
|
#
|
||||||
|
# bazel run @@//misc/bazel/3rdparty:vendor_tree_sitter_extractors
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
load("@rules_rust//rust:defs.bzl", "rust_library")
|
||||||
|
|
||||||
|
package(default_visibility = ["//visibility:public"])
|
||||||
|
|
||||||
|
rust_library(
|
||||||
|
name = "winnow",
|
||||||
|
srcs = glob(
|
||||||
|
include = ["**/*.rs"],
|
||||||
|
allow_empty = True,
|
||||||
|
),
|
||||||
|
compile_data = glob(
|
||||||
|
include = ["**"],
|
||||||
|
allow_empty = True,
|
||||||
|
exclude = [
|
||||||
|
"**/* *",
|
||||||
|
".tmp_git_root/**/*",
|
||||||
|
"BUILD",
|
||||||
|
"BUILD.bazel",
|
||||||
|
"WORKSPACE",
|
||||||
|
"WORKSPACE.bazel",
|
||||||
|
],
|
||||||
|
),
|
||||||
|
crate_features = [
|
||||||
|
"alloc",
|
||||||
|
"default",
|
||||||
|
"std",
|
||||||
|
],
|
||||||
|
crate_root = "src/lib.rs",
|
||||||
|
edition = "2021",
|
||||||
|
rustc_flags = [
|
||||||
|
"--cap-lints=allow",
|
||||||
|
],
|
||||||
|
tags = [
|
||||||
|
"cargo-bazel",
|
||||||
|
"crate-name=winnow",
|
||||||
|
"manual",
|
||||||
|
"noclippy",
|
||||||
|
"norustfmt",
|
||||||
|
],
|
||||||
|
target_compatible_with = select({
|
||||||
|
"@rules_rust//rust/platform:aarch64-apple-darwin": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-apple-ios": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-apple-ios-sim": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-fuchsia": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-linux-android": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-pc-windows-msvc": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [],
|
||||||
|
"@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [],
|
||||||
|
"@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [],
|
||||||
|
"@rules_rust//rust/platform:armv7-linux-androideabi": [],
|
||||||
|
"@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [],
|
||||||
|
"@rules_rust//rust/platform:i686-apple-darwin": [],
|
||||||
|
"@rules_rust//rust/platform:i686-linux-android": [],
|
||||||
|
"@rules_rust//rust/platform:i686-pc-windows-msvc": [],
|
||||||
|
"@rules_rust//rust/platform:i686-unknown-freebsd": [],
|
||||||
|
"@rules_rust//rust/platform:i686-unknown-linux-gnu": [],
|
||||||
|
"@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [],
|
||||||
|
"@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [],
|
||||||
|
"@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [],
|
||||||
|
"@rules_rust//rust/platform:s390x-unknown-linux-gnu": [],
|
||||||
|
"@rules_rust//rust/platform:thumbv7em-none-eabi": [],
|
||||||
|
"@rules_rust//rust/platform:thumbv8m.main-none-eabi": [],
|
||||||
|
"@rules_rust//rust/platform:wasm32-unknown-unknown": [],
|
||||||
|
"@rules_rust//rust/platform:wasm32-wasi": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-apple-darwin": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-apple-ios": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-fuchsia": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-linux-android": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-pc-windows-msvc": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-unknown-freebsd": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [],
|
||||||
|
"@rules_rust//rust/platform:x86_64-unknown-none": [],
|
||||||
|
"//conditions:default": ["@platforms//:incompatible"],
|
||||||
|
}),
|
||||||
|
version = "0.6.24",
|
||||||
|
)
|
||||||
52
misc/bazel/3rdparty/tree_sitter_extractors_deps/defs.bzl
generated
vendored
52
misc/bazel/3rdparty/tree_sitter_extractors_deps/defs.bzl
generated
vendored
@@ -353,6 +353,7 @@ _NORMAL_DEPENDENCIES = {
|
|||||||
"serde_json": Label("@vendor__serde_json-1.0.135//:serde_json"),
|
"serde_json": Label("@vendor__serde_json-1.0.135//:serde_json"),
|
||||||
"serde_with": Label("@vendor__serde_with-3.12.0//:serde_with"),
|
"serde_with": Label("@vendor__serde_with-3.12.0//:serde_with"),
|
||||||
"stderrlog": Label("@vendor__stderrlog-0.6.0//:stderrlog"),
|
"stderrlog": Label("@vendor__stderrlog-0.6.0//:stderrlog"),
|
||||||
|
"toml": Label("@vendor__toml-0.8.19//:toml"),
|
||||||
"triomphe": Label("@vendor__triomphe-0.1.14//:triomphe"),
|
"triomphe": Label("@vendor__triomphe-0.1.14//:triomphe"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -2599,6 +2600,16 @@ def crate_repositories():
|
|||||||
build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.serde_json-1.0.135.bazel"),
|
build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.serde_json-1.0.135.bazel"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
maybe(
|
||||||
|
http_archive,
|
||||||
|
name = "vendor__serde_spanned-0.6.8",
|
||||||
|
sha256 = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1",
|
||||||
|
type = "tar.gz",
|
||||||
|
urls = ["https://static.crates.io/crates/serde_spanned/0.6.8/download"],
|
||||||
|
strip_prefix = "serde_spanned-0.6.8",
|
||||||
|
build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.serde_spanned-0.6.8.bazel"),
|
||||||
|
)
|
||||||
|
|
||||||
maybe(
|
maybe(
|
||||||
http_archive,
|
http_archive,
|
||||||
name = "vendor__serde_with-3.12.0",
|
name = "vendor__serde_with-3.12.0",
|
||||||
@@ -2819,6 +2830,36 @@ def crate_repositories():
|
|||||||
build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.time-macros-0.2.19.bazel"),
|
build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.time-macros-0.2.19.bazel"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
maybe(
|
||||||
|
http_archive,
|
||||||
|
name = "vendor__toml-0.8.19",
|
||||||
|
sha256 = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e",
|
||||||
|
type = "tar.gz",
|
||||||
|
urls = ["https://static.crates.io/crates/toml/0.8.19/download"],
|
||||||
|
strip_prefix = "toml-0.8.19",
|
||||||
|
build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.toml-0.8.19.bazel"),
|
||||||
|
)
|
||||||
|
|
||||||
|
maybe(
|
||||||
|
http_archive,
|
||||||
|
name = "vendor__toml_datetime-0.6.8",
|
||||||
|
sha256 = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41",
|
||||||
|
type = "tar.gz",
|
||||||
|
urls = ["https://static.crates.io/crates/toml_datetime/0.6.8/download"],
|
||||||
|
strip_prefix = "toml_datetime-0.6.8",
|
||||||
|
build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.toml_datetime-0.6.8.bazel"),
|
||||||
|
)
|
||||||
|
|
||||||
|
maybe(
|
||||||
|
http_archive,
|
||||||
|
name = "vendor__toml_edit-0.22.22",
|
||||||
|
sha256 = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5",
|
||||||
|
type = "tar.gz",
|
||||||
|
urls = ["https://static.crates.io/crates/toml_edit/0.22.22/download"],
|
||||||
|
strip_prefix = "toml_edit-0.22.22",
|
||||||
|
build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.toml_edit-0.22.22.bazel"),
|
||||||
|
)
|
||||||
|
|
||||||
maybe(
|
maybe(
|
||||||
http_archive,
|
http_archive,
|
||||||
name = "vendor__tracing-0.1.41",
|
name = "vendor__tracing-0.1.41",
|
||||||
@@ -3359,6 +3400,16 @@ def crate_repositories():
|
|||||||
build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.windows_x86_64_msvc-0.52.6.bazel"),
|
build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.windows_x86_64_msvc-0.52.6.bazel"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
maybe(
|
||||||
|
http_archive,
|
||||||
|
name = "vendor__winnow-0.6.24",
|
||||||
|
sha256 = "c8d71a593cc5c42ad7876e2c1fda56f314f3754c084128833e64f1345ff8a03a",
|
||||||
|
type = "tar.gz",
|
||||||
|
urls = ["https://static.crates.io/crates/winnow/0.6.24/download"],
|
||||||
|
strip_prefix = "winnow-0.6.24",
|
||||||
|
build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.winnow-0.6.24.bazel"),
|
||||||
|
)
|
||||||
|
|
||||||
maybe(
|
maybe(
|
||||||
http_archive,
|
http_archive,
|
||||||
name = "vendor__yansi-1.0.1",
|
name = "vendor__yansi-1.0.1",
|
||||||
@@ -3431,6 +3482,7 @@ def crate_repositories():
|
|||||||
struct(repo = "vendor__serde_with-3.12.0", is_dev_dep = False),
|
struct(repo = "vendor__serde_with-3.12.0", is_dev_dep = False),
|
||||||
struct(repo = "vendor__stderrlog-0.6.0", is_dev_dep = False),
|
struct(repo = "vendor__stderrlog-0.6.0", is_dev_dep = False),
|
||||||
struct(repo = "vendor__syn-2.0.96", is_dev_dep = False),
|
struct(repo = "vendor__syn-2.0.96", is_dev_dep = False),
|
||||||
|
struct(repo = "vendor__toml-0.8.19", is_dev_dep = False),
|
||||||
struct(repo = "vendor__tracing-0.1.41", is_dev_dep = False),
|
struct(repo = "vendor__tracing-0.1.41", is_dev_dep = False),
|
||||||
struct(repo = "vendor__tracing-subscriber-0.3.19", is_dev_dep = False),
|
struct(repo = "vendor__tracing-subscriber-0.3.19", is_dev_dep = False),
|
||||||
struct(repo = "vendor__tree-sitter-0.24.6", is_dev_dep = False),
|
struct(repo = "vendor__tree-sitter-0.24.6", is_dev_dep = False),
|
||||||
|
|||||||
@@ -36,3 +36,4 @@ glob = "0.3.2"
|
|||||||
chrono = { version = "0.4.39", features = ["serde"] }
|
chrono = { version = "0.4.39", features = ["serde"] }
|
||||||
serde_json = "1.0.135"
|
serde_json = "1.0.135"
|
||||||
dunce = "1.0.5"
|
dunce = "1.0.5"
|
||||||
|
toml = "0.8.19"
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ pub struct Diagnostics<T> {
|
|||||||
pub enum ExtractionStepKind {
|
pub enum ExtractionStepKind {
|
||||||
#[default]
|
#[default]
|
||||||
LoadManifest,
|
LoadManifest,
|
||||||
|
FindManifests,
|
||||||
LoadSource,
|
LoadSource,
|
||||||
Parse,
|
Parse,
|
||||||
Extract,
|
Extract,
|
||||||
@@ -88,12 +89,12 @@ pub enum ExtractionStepKind {
|
|||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct ExtractionStep {
|
pub struct ExtractionStep {
|
||||||
pub action: ExtractionStepKind,
|
pub action: ExtractionStepKind,
|
||||||
pub file: PathBuf,
|
pub file: Option<PathBuf>,
|
||||||
pub ms: u128,
|
pub ms: u128,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ExtractionStep {
|
impl ExtractionStep {
|
||||||
fn new(start: Instant, action: ExtractionStepKind, file: PathBuf) -> Self {
|
fn new(start: Instant, action: ExtractionStepKind, file: Option<PathBuf>) -> Self {
|
||||||
let ret = ExtractionStep {
|
let ret = ExtractionStep {
|
||||||
action,
|
action,
|
||||||
file,
|
file,
|
||||||
@@ -107,20 +108,36 @@ impl ExtractionStep {
|
|||||||
Self::new(
|
Self::new(
|
||||||
start,
|
start,
|
||||||
ExtractionStepKind::LoadManifest,
|
ExtractionStepKind::LoadManifest,
|
||||||
PathBuf::from(target.manifest_path()),
|
Some(PathBuf::from(target.manifest_path())),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn parse(start: Instant, target: &Path) -> Self {
|
pub fn parse(start: Instant, target: &Path) -> Self {
|
||||||
Self::new(start, ExtractionStepKind::Parse, PathBuf::from(target))
|
Self::new(
|
||||||
|
start,
|
||||||
|
ExtractionStepKind::Parse,
|
||||||
|
Some(PathBuf::from(target)),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn extract(start: Instant, target: &Path) -> Self {
|
pub fn extract(start: Instant, target: &Path) -> Self {
|
||||||
Self::new(start, ExtractionStepKind::Extract, PathBuf::from(target))
|
Self::new(
|
||||||
|
start,
|
||||||
|
ExtractionStepKind::Extract,
|
||||||
|
Some(PathBuf::from(target)),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn load_source(start: Instant, target: &Path) -> Self {
|
pub fn load_source(start: Instant, target: &Path) -> Self {
|
||||||
Self::new(start, ExtractionStepKind::LoadSource, PathBuf::from(target))
|
Self::new(
|
||||||
|
start,
|
||||||
|
ExtractionStepKind::LoadSource,
|
||||||
|
Some(PathBuf::from(target)),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn find_manifests(start: Instant) -> Self {
|
||||||
|
Self::new(start, ExtractionStepKind::FindManifests, None)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
2
rust/extractor/src/generated/.generated.list
generated
2
rust/extractor/src/generated/.generated.list
generated
@@ -1,2 +1,2 @@
|
|||||||
mod.rs 4bcb9def847469aae9d8649461546b7c21ec97cf6e63d3cf394e339915ce65d7 4bcb9def847469aae9d8649461546b7c21ec97cf6e63d3cf394e339915ce65d7
|
mod.rs 4bcb9def847469aae9d8649461546b7c21ec97cf6e63d3cf394e339915ce65d7 4bcb9def847469aae9d8649461546b7c21ec97cf6e63d3cf394e339915ce65d7
|
||||||
top.rs f042175b9f2dc4092ed04dde2073735560a9c3050a2f07ee79193c492e91cabc f042175b9f2dc4092ed04dde2073735560a9c3050a2f07ee79193c492e91cabc
|
top.rs 97b9c3c5485196cc7949ec1b67c5844b7ff7af67bc2339276adbdafb03789ac0 97b9c3c5485196cc7949ec1b67c5844b7ff7af67bc2339276adbdafb03789ac0
|
||||||
|
|||||||
7
rust/extractor/src/generated/top.rs
generated
7
rust/extractor/src/generated/top.rs
generated
@@ -26,7 +26,7 @@ impl trap::TrapClass for Element {
|
|||||||
pub struct ExtractorStep {
|
pub struct ExtractorStep {
|
||||||
pub id: trap::TrapId<ExtractorStep>,
|
pub id: trap::TrapId<ExtractorStep>,
|
||||||
pub action: String,
|
pub action: String,
|
||||||
pub file: trap::Label<File>,
|
pub file: Option<trap::Label<File>>,
|
||||||
pub duration_ms: usize,
|
pub duration_ms: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -36,7 +36,10 @@ impl trap::TrapEntry for ExtractorStep {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn emit(self, id: trap::Label<Self>, out: &mut trap::Writer) {
|
fn emit(self, id: trap::Label<Self>, out: &mut trap::Writer) {
|
||||||
out.add_tuple("extractor_steps", vec![id.into(), self.action.into(), self.file.into(), self.duration_ms.into()]);
|
out.add_tuple("extractor_steps", vec![id.into(), self.action.into(), self.duration_ms.into()]);
|
||||||
|
if let Some(v) = self.file {
|
||||||
|
out.add_tuple("extractor_step_files", vec![id.into(), v.into()]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ impl<'a> Extractor<'a> {
|
|||||||
emit_extraction_diagnostics(start, cfg, &self.steps)?;
|
emit_extraction_diagnostics(start, cfg, &self.steps)?;
|
||||||
let mut trap = self.traps.create("diagnostics", "extraction");
|
let mut trap = self.traps.create("diagnostics", "extraction");
|
||||||
for step in self.steps {
|
for step in self.steps {
|
||||||
let file = trap.emit_file(&step.file);
|
let file = step.file.as_ref().map(|f| trap.emit_file(f));
|
||||||
let duration_ms = usize::try_from(step.ms).unwrap_or_else(|_e| {
|
let duration_ms = usize::try_from(step.ms).unwrap_or_else(|_e| {
|
||||||
warn!("extraction step duration overflowed ({step:?})");
|
warn!("extraction step duration overflowed ({step:?})");
|
||||||
i32::MAX as usize
|
i32::MAX as usize
|
||||||
@@ -160,6 +160,13 @@ impl<'a> Extractor<'a> {
|
|||||||
trap.commit()?;
|
trap.commit()?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn find_manifests(&mut self, files: &[PathBuf]) -> anyhow::Result<Vec<ProjectManifest>> {
|
||||||
|
let before = Instant::now();
|
||||||
|
let ret = rust_analyzer::find_project_manifests(files);
|
||||||
|
self.steps.push(ExtractionStep::find_manifests(before));
|
||||||
|
ret
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn cwd() -> anyhow::Result<AbsPathBuf> {
|
fn cwd() -> anyhow::Result<AbsPathBuf> {
|
||||||
@@ -199,7 +206,7 @@ fn main() -> anyhow::Result<()> {
|
|||||||
dunce::canonicalize(&file).unwrap_or(file)
|
dunce::canonicalize(&file).unwrap_or(file)
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
let manifests = rust_analyzer::find_project_manifests(&files)?;
|
let manifests = extractor.find_manifests(&files)?;
|
||||||
let mut map: HashMap<&Path, (&ProjectManifest, Vec<&Path>)> = manifests
|
let mut map: HashMap<&Path, (&ProjectManifest, Vec<&Path>)> = manifests
|
||||||
.iter()
|
.iter()
|
||||||
.map(|x| (x.manifest_path().parent().as_ref(), (x, Vec::new())))
|
.map(|x| (x.manifest_path().parent().as_ref(), (x, Vec::new())))
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
use log::{debug, info};
|
use log::{debug, error, info};
|
||||||
use ra_ap_base_db::SourceDatabase;
|
use ra_ap_base_db::SourceDatabase;
|
||||||
use ra_ap_hir::Semantics;
|
use ra_ap_hir::Semantics;
|
||||||
use ra_ap_ide_db::RootDatabase;
|
use ra_ap_ide_db::RootDatabase;
|
||||||
use ra_ap_load_cargo::{load_workspace_at, LoadCargoConfig, ProcMacroServerChoice};
|
use ra_ap_load_cargo::{load_workspace_at, LoadCargoConfig, ProcMacroServerChoice};
|
||||||
use ra_ap_paths::Utf8PathBuf;
|
use ra_ap_paths::Utf8PathBuf;
|
||||||
use ra_ap_project_model::CargoConfig;
|
|
||||||
use ra_ap_project_model::ProjectManifest;
|
use ra_ap_project_model::ProjectManifest;
|
||||||
|
use ra_ap_project_model::{CargoConfig, ManifestPath};
|
||||||
use ra_ap_span::Edition;
|
use ra_ap_span::Edition;
|
||||||
use ra_ap_span::EditionedFileId;
|
use ra_ap_span::EditionedFileId;
|
||||||
use ra_ap_span::TextRange;
|
use ra_ap_span::TextRange;
|
||||||
@@ -17,7 +17,10 @@ use ra_ap_vfs::Vfs;
|
|||||||
use ra_ap_vfs::VfsPath;
|
use ra_ap_vfs::VfsPath;
|
||||||
use ra_ap_vfs::{AbsPathBuf, FileId};
|
use ra_ap_vfs::{AbsPathBuf, FileId};
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
|
use std::collections::{HashMap, HashSet};
|
||||||
|
use std::fs;
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
|
use std::rc::Rc;
|
||||||
use triomphe::Arc;
|
use triomphe::Arc;
|
||||||
|
|
||||||
pub enum RustAnalyzer<'a> {
|
pub enum RustAnalyzer<'a> {
|
||||||
@@ -128,6 +131,76 @@ impl<'a> RustAnalyzer<'a> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct ToMlReader {
|
||||||
|
cache: HashMap<ManifestPath, Rc<toml::Table>>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ToMlReader {
|
||||||
|
fn new() -> Self {
|
||||||
|
Self {
|
||||||
|
cache: HashMap::new(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn read(&mut self, manifest: &ManifestPath) -> anyhow::Result<Rc<toml::Table>> {
|
||||||
|
if let Some(table) = self.cache.get(manifest) {
|
||||||
|
return Ok(table.clone());
|
||||||
|
}
|
||||||
|
let content = fs::read_to_string(manifest).map_err(|e| {
|
||||||
|
error!("failed to read {} ({e})", manifest.as_str());
|
||||||
|
e
|
||||||
|
})?;
|
||||||
|
let table = Rc::<toml::Table>::new(content.parse().map_err(|e| {
|
||||||
|
error!("failed to parse {} ({e})", manifest.as_str());
|
||||||
|
e
|
||||||
|
})?);
|
||||||
|
self.cache.insert(manifest.clone(), table.clone());
|
||||||
|
Ok(table)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn find_workspace(
|
||||||
|
reader: &mut ToMlReader,
|
||||||
|
manifest: &ProjectManifest,
|
||||||
|
) -> anyhow::Result<ProjectManifest> {
|
||||||
|
let ProjectManifest::CargoToml(cargo) = manifest else {
|
||||||
|
return Err(anyhow::anyhow!("{manifest} not a cargo manifest"));
|
||||||
|
};
|
||||||
|
let toml = reader.read(cargo)?;
|
||||||
|
if toml.contains_key("workspace") {
|
||||||
|
return Ok(manifest.clone());
|
||||||
|
}
|
||||||
|
let Some(parent_dir) = cargo.parent().parent() else {
|
||||||
|
return Err(anyhow::anyhow!("no parent dir for {cargo}"));
|
||||||
|
};
|
||||||
|
let discovered = ProjectManifest::discover(parent_dir)?;
|
||||||
|
discovered
|
||||||
|
.iter()
|
||||||
|
.filter_map(|it| match it {
|
||||||
|
ProjectManifest::CargoToml(other)
|
||||||
|
if cargo.starts_with(other.parent())
|
||||||
|
&& reader.read(other).is_ok_and(|it| {
|
||||||
|
it.get("workspace")
|
||||||
|
.and_then(|w| w.as_table())
|
||||||
|
.and_then(|t| t.get("members"))
|
||||||
|
.and_then(|ms| ms.as_array())
|
||||||
|
.is_some_and(|ms| {
|
||||||
|
ms.iter().any(|m| {
|
||||||
|
m.as_str()
|
||||||
|
.is_some_and(|s| other.parent().join(s) == cargo.parent())
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}) =>
|
||||||
|
{
|
||||||
|
debug!("found workspace {other} containing {cargo}");
|
||||||
|
Some(it.clone())
|
||||||
|
}
|
||||||
|
_ => None,
|
||||||
|
})
|
||||||
|
.next()
|
||||||
|
.ok_or(anyhow::anyhow!("no workspace found for {manifest}"))
|
||||||
|
}
|
||||||
|
|
||||||
pub fn find_project_manifests(
|
pub fn find_project_manifests(
|
||||||
files: &[PathBuf],
|
files: &[PathBuf],
|
||||||
) -> anyhow::Result<Vec<ra_ap_project_model::ProjectManifest>> {
|
) -> anyhow::Result<Vec<ra_ap_project_model::ProjectManifest>> {
|
||||||
@@ -136,7 +209,13 @@ pub fn find_project_manifests(
|
|||||||
.iter()
|
.iter()
|
||||||
.map(|path| AbsPathBuf::assert_utf8(current.join(path)))
|
.map(|path| AbsPathBuf::assert_utf8(current.join(path)))
|
||||||
.collect();
|
.collect();
|
||||||
let ret = ra_ap_project_model::ProjectManifest::discover_all(&abs_files);
|
let discovered = ra_ap_project_model::ProjectManifest::discover_all(&abs_files);
|
||||||
|
let mut ret = HashSet::new();
|
||||||
|
let mut reader = ToMlReader::new();
|
||||||
|
for manifest in discovered {
|
||||||
|
let workspace = find_workspace(&mut reader, &manifest).unwrap_or(manifest);
|
||||||
|
ret.insert(workspace);
|
||||||
|
}
|
||||||
let iter = || ret.iter().map(|m| format!(" {m}"));
|
let iter = || ret.iter().map(|m| format!(" {m}"));
|
||||||
const LOG_LIMIT: usize = 10;
|
const LOG_LIMIT: usize = 10;
|
||||||
if ret.len() <= LOG_LIMIT {
|
if ret.len() <= LOG_LIMIT {
|
||||||
@@ -152,8 +231,9 @@ pub fn find_project_manifests(
|
|||||||
iter().dropping(LOG_LIMIT).join("\n")
|
iter().dropping(LOG_LIMIT).join("\n")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Ok(ret)
|
Ok(ret.into_iter().collect())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn from_utf8_lossy(v: &[u8]) -> (Cow<'_, str>, Option<SyntaxError>) {
|
fn from_utf8_lossy(v: &[u8]) -> (Cow<'_, str>, Option<SyntaxError>) {
|
||||||
let mut iter = v.utf8_chunks();
|
let mut iter = v.utf8_chunks();
|
||||||
let (first_valid, first_invalid) = if let Some(chunk) = iter.next() {
|
let (first_valid, first_invalid) = if let Some(chunk) = iter.next() {
|
||||||
|
|||||||
4
rust/ql/.generated.list
generated
4
rust/ql/.generated.list
generated
@@ -515,7 +515,7 @@ lib/codeql/rust/elements/internal/generated/ExternBlock.qll c292d804a1f8d2cf6a44
|
|||||||
lib/codeql/rust/elements/internal/generated/ExternCrate.qll 35fea4e810a896c1656adb4682c4c3bc20283768073e26ae064189ce310433c8 fc504dff79ba758d89b10cd5049539fbc766ee9862ff495066cea26abf0b5e0b
|
lib/codeql/rust/elements/internal/generated/ExternCrate.qll 35fea4e810a896c1656adb4682c4c3bc20283768073e26ae064189ce310433c8 fc504dff79ba758d89b10cd5049539fbc766ee9862ff495066cea26abf0b5e0b
|
||||||
lib/codeql/rust/elements/internal/generated/ExternItem.qll 749b064ad60f32197d5b85e25929afe18e56e12f567b73e21e43e2fdf4c447e3 e2c2d423876675cf2dae399ca442aef7b2860319da9bfadeff29f2c6946f8de7
|
lib/codeql/rust/elements/internal/generated/ExternItem.qll 749b064ad60f32197d5b85e25929afe18e56e12f567b73e21e43e2fdf4c447e3 e2c2d423876675cf2dae399ca442aef7b2860319da9bfadeff29f2c6946f8de7
|
||||||
lib/codeql/rust/elements/internal/generated/ExternItemList.qll 6bc97fdae6c411cab5c501129c1d6c2321c1011cccb119515d75d07dc55c253b 6b5aa808025c0a4270cac540c07ba6faede1b3c70b8db5fd89ec5d46df9041b2
|
lib/codeql/rust/elements/internal/generated/ExternItemList.qll 6bc97fdae6c411cab5c501129c1d6c2321c1011cccb119515d75d07dc55c253b 6b5aa808025c0a4270cac540c07ba6faede1b3c70b8db5fd89ec5d46df9041b2
|
||||||
lib/codeql/rust/elements/internal/generated/ExtractorStep.qll b83ce7f18009bdd36374260652c2a8a5cd5a9b5404a1c147bbec49ad251e43f3 e6e55595300126f9c5a6fd7bde5321b2a0026b491326114d16fcc2395a1fc483
|
lib/codeql/rust/elements/internal/generated/ExtractorStep.qll 61cd504a1aab98b1c977ee8cff661258351d11ca1fec77038c0a17d359f5810e 5e57b50f3e8e3114a55159fb11a524c6944363f5f8a380abccc8b220dedc70ca
|
||||||
lib/codeql/rust/elements/internal/generated/FieldExpr.qll 3e506b5cb93793ec30f56bb637a600db869fcba6181b068516a671d55c362739 7bbf953696d763ad6b210f378f487ba85b875fa115b22c0c0508599a63633502
|
lib/codeql/rust/elements/internal/generated/FieldExpr.qll 3e506b5cb93793ec30f56bb637a600db869fcba6181b068516a671d55c362739 7bbf953696d763ad6b210f378f487ba85b875fa115b22c0c0508599a63633502
|
||||||
lib/codeql/rust/elements/internal/generated/FieldList.qll 43c13c6e3c9ba75a7a4cb870fc4f18752001584d48b9df0734055a6ebb789331 7c51b0b13eb02f1286d3365e53a976ba2655c4dbd8e735bc11c8b205c829e1ee
|
lib/codeql/rust/elements/internal/generated/FieldList.qll 43c13c6e3c9ba75a7a4cb870fc4f18752001584d48b9df0734055a6ebb789331 7c51b0b13eb02f1286d3365e53a976ba2655c4dbd8e735bc11c8b205c829e1ee
|
||||||
lib/codeql/rust/elements/internal/generated/FnPtrTypeRepr.qll d490ab9f2e3654d9abde18a06e534abd99ca62f518ca08670b696a97e9d5c592 01500319820f66cb4bbda6fe7c26270f76ea934efff4bb3cbf88e9b1e07e8be2
|
lib/codeql/rust/elements/internal/generated/FnPtrTypeRepr.qll d490ab9f2e3654d9abde18a06e534abd99ca62f518ca08670b696a97e9d5c592 01500319820f66cb4bbda6fe7c26270f76ea934efff4bb3cbf88e9b1e07e8be2
|
||||||
@@ -594,7 +594,7 @@ lib/codeql/rust/elements/internal/generated/PtrTypeRepr.qll 51d1e9e683fc79dddbff
|
|||||||
lib/codeql/rust/elements/internal/generated/PureSynthConstructors.qll e5b8e69519012bbaae29dcb82d53f7f7ecce368c0358ec27ef6180b228a0057f e5b8e69519012bbaae29dcb82d53f7f7ecce368c0358ec27ef6180b228a0057f
|
lib/codeql/rust/elements/internal/generated/PureSynthConstructors.qll e5b8e69519012bbaae29dcb82d53f7f7ecce368c0358ec27ef6180b228a0057f e5b8e69519012bbaae29dcb82d53f7f7ecce368c0358ec27ef6180b228a0057f
|
||||||
lib/codeql/rust/elements/internal/generated/RangeExpr.qll 23cca03bf43535f33b22a38894f70d669787be4e4f5b8fe5c8f7b964d30e9027 18624cef6c6b679eeace2a98737e472432e0ead354cca02192b4d45330f047c9
|
lib/codeql/rust/elements/internal/generated/RangeExpr.qll 23cca03bf43535f33b22a38894f70d669787be4e4f5b8fe5c8f7b964d30e9027 18624cef6c6b679eeace2a98737e472432e0ead354cca02192b4d45330f047c9
|
||||||
lib/codeql/rust/elements/internal/generated/RangePat.qll 80826a6a6868a803aa2372e31c52a03e1811a3f1f2abdb469f91ca0bfdd9ecb6 34ee1e208c1690cba505dff2c588837c0cd91e185e2a87d1fe673191962276a9
|
lib/codeql/rust/elements/internal/generated/RangePat.qll 80826a6a6868a803aa2372e31c52a03e1811a3f1f2abdb469f91ca0bfdd9ecb6 34ee1e208c1690cba505dff2c588837c0cd91e185e2a87d1fe673191962276a9
|
||||||
lib/codeql/rust/elements/internal/generated/Raw.qll db71278eea846cffd8748f1650493822d95108609a5c055bfaed7af4f42011c1 fabbf440a40ff5b1e9da26a95d20db89fbe7d33717bbc4f02ef518fc9dfd1e54
|
lib/codeql/rust/elements/internal/generated/Raw.qll c75c7811d041897c2d6aae1e0e55b46af6182565e1d0dd624062c5ca499e9325 79e6ded808f14dd622076b75d8e4985c7b90f2d5e964d0750519b510463b47ba
|
||||||
lib/codeql/rust/elements/internal/generated/RecordExpr.qll 2131b2cb336caa76170082e69776011bf02576bbfdd34ba68ca84af24209250a 39a2e3ec32352b594c43cc1295e0e8b3f9808173322d3d73cb7d48ef969d5565
|
lib/codeql/rust/elements/internal/generated/RecordExpr.qll 2131b2cb336caa76170082e69776011bf02576bbfdd34ba68ca84af24209250a 39a2e3ec32352b594c43cc1295e0e8b3f9808173322d3d73cb7d48ef969d5565
|
||||||
lib/codeql/rust/elements/internal/generated/RecordExprField.qll 7e9f8663d3b74ebbc9603b10c9912f082febba6bd73d344b100bbd3edf837802 fbe6b578e7fd5d5a6f21bbb8c388957ab7210a6a249ec71510a50fb35b319ea1
|
lib/codeql/rust/elements/internal/generated/RecordExprField.qll 7e9f8663d3b74ebbc9603b10c9912f082febba6bd73d344b100bbd3edf837802 fbe6b578e7fd5d5a6f21bbb8c388957ab7210a6a249ec71510a50fb35b319ea1
|
||||||
lib/codeql/rust/elements/internal/generated/RecordExprFieldList.qll 179a97211fe7aa6265085d4d54115cdbc0e1cd7c9b2135591e8f36d6432f13d3 dd44bbbc1e83a1ed3a587afb729d7debf7aeb7b63245de181726af13090e50c0
|
lib/codeql/rust/elements/internal/generated/RecordExprFieldList.qll 179a97211fe7aa6265085d4d54115cdbc0e1cd7c9b2135591e8f36d6432f13d3 dd44bbbc1e83a1ed3a587afb729d7debf7aeb7b63245de181726af13090e50c0
|
||||||
|
|||||||
@@ -5,6 +5,10 @@
|
|||||||
"ms": "__REDACTED__",
|
"ms": "__REDACTED__",
|
||||||
"pretty": "__REDACTED__"
|
"pretty": "__REDACTED__"
|
||||||
},
|
},
|
||||||
|
"findManifests": {
|
||||||
|
"ms": "__REDACTED__",
|
||||||
|
"pretty": "__REDACTED__"
|
||||||
|
},
|
||||||
"loadManifest": {
|
"loadManifest": {
|
||||||
"ms": "__REDACTED__",
|
"ms": "__REDACTED__",
|
||||||
"pretty": "__REDACTED__"
|
"pretty": "__REDACTED__"
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
| Cargo.toml:0:0:0:0 | LoadManifest(Cargo.toml) |
|
| Cargo.toml:0:0:0:0 | LoadManifest(Cargo.toml) |
|
||||||
|
| file://:0:0:0:0 | FindManifests |
|
||||||
| src/directory_module/mod.rs:0:0:0:0 | Extract(src/directory_module/mod.rs) |
|
| src/directory_module/mod.rs:0:0:0:0 | Extract(src/directory_module/mod.rs) |
|
||||||
| src/directory_module/mod.rs:0:0:0:0 | LoadSource(src/directory_module/mod.rs) |
|
| src/directory_module/mod.rs:0:0:0:0 | LoadSource(src/directory_module/mod.rs) |
|
||||||
| src/directory_module/mod.rs:0:0:0:0 | Parse(src/directory_module/mod.rs) |
|
| src/directory_module/mod.rs:0:0:0:0 | Parse(src/directory_module/mod.rs) |
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
| file://:0:0:0:0 | FindManifests |
|
||||||
| rust-project.json:0:0:0:0 | LoadManifest(rust-project.json) |
|
| rust-project.json:0:0:0:0 | LoadManifest(rust-project.json) |
|
||||||
| src/directory_module/mod.rs:0:0:0:0 | Extract(src/directory_module/mod.rs) |
|
| src/directory_module/mod.rs:0:0:0:0 | Extract(src/directory_module/mod.rs) |
|
||||||
| src/directory_module/mod.rs:0:0:0:0 | LoadSource(src/directory_module/mod.rs) |
|
| src/directory_module/mod.rs:0:0:0:0 | LoadSource(src/directory_module/mod.rs) |
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
| Elements extracted | 65 |
|
| Elements extracted | 66 |
|
||||||
| Elements unextracted | 0 |
|
| Elements unextracted | 0 |
|
||||||
| Extraction errors | 0 |
|
| Extraction errors | 0 |
|
||||||
| Extraction warnings | 1 |
|
| Extraction warnings | 1 |
|
||||||
|
|||||||
@@ -5,6 +5,10 @@
|
|||||||
"ms": "__REDACTED__",
|
"ms": "__REDACTED__",
|
||||||
"pretty": "__REDACTED__"
|
"pretty": "__REDACTED__"
|
||||||
},
|
},
|
||||||
|
"findManifests": {
|
||||||
|
"ms": "__REDACTED__",
|
||||||
|
"pretty": "__REDACTED__"
|
||||||
|
},
|
||||||
"loadManifest": {
|
"loadManifest": {
|
||||||
"ms": "__REDACTED__",
|
"ms": "__REDACTED__",
|
||||||
"pretty": "__REDACTED__"
|
"pretty": "__REDACTED__"
|
||||||
@@ -23,7 +27,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"numberOfFiles": 4,
|
"numberOfFiles": 4,
|
||||||
"numberOfManifests": 2
|
"numberOfManifests": 1
|
||||||
},
|
},
|
||||||
"severity": "note",
|
"severity": "note",
|
||||||
"source": {
|
"source": {
|
||||||
|
|||||||
@@ -5,6 +5,10 @@
|
|||||||
"ms": "__REDACTED__",
|
"ms": "__REDACTED__",
|
||||||
"pretty": "__REDACTED__"
|
"pretty": "__REDACTED__"
|
||||||
},
|
},
|
||||||
|
"findManifests": {
|
||||||
|
"ms": "__REDACTED__",
|
||||||
|
"pretty": "__REDACTED__"
|
||||||
|
},
|
||||||
"loadManifest": {
|
"loadManifest": {
|
||||||
"ms": "__REDACTED__",
|
"ms": "__REDACTED__",
|
||||||
"pretty": "__REDACTED__"
|
"pretty": "__REDACTED__"
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
| exe/Cargo.toml:0:0:0:0 | LoadManifest(exe/Cargo.toml) |
|
| Cargo.toml:0:0:0:0 | LoadManifest(Cargo.toml) |
|
||||||
| exe/src/a_module.rs:0:0:0:0 | Extract(exe/src/a_module.rs) |
|
| exe/src/a_module.rs:0:0:0:0 | Extract(exe/src/a_module.rs) |
|
||||||
| exe/src/a_module.rs:0:0:0:0 | LoadSource(exe/src/a_module.rs) |
|
| exe/src/a_module.rs:0:0:0:0 | LoadSource(exe/src/a_module.rs) |
|
||||||
| exe/src/a_module.rs:0:0:0:0 | Parse(exe/src/a_module.rs) |
|
| exe/src/a_module.rs:0:0:0:0 | Parse(exe/src/a_module.rs) |
|
||||||
| exe/src/main.rs:0:0:0:0 | Extract(exe/src/main.rs) |
|
| exe/src/main.rs:0:0:0:0 | Extract(exe/src/main.rs) |
|
||||||
| exe/src/main.rs:0:0:0:0 | LoadSource(exe/src/main.rs) |
|
| exe/src/main.rs:0:0:0:0 | LoadSource(exe/src/main.rs) |
|
||||||
| exe/src/main.rs:0:0:0:0 | Parse(exe/src/main.rs) |
|
| exe/src/main.rs:0:0:0:0 | Parse(exe/src/main.rs) |
|
||||||
| lib/Cargo.toml:0:0:0:0 | LoadManifest(lib/Cargo.toml) |
|
| file://:0:0:0:0 | FindManifests |
|
||||||
| lib/src/a_module/mod.rs:0:0:0:0 | Extract(lib/src/a_module/mod.rs) |
|
| lib/src/a_module/mod.rs:0:0:0:0 | Extract(lib/src/a_module/mod.rs) |
|
||||||
| lib/src/a_module/mod.rs:0:0:0:0 | LoadSource(lib/src/a_module/mod.rs) |
|
| lib/src/a_module/mod.rs:0:0:0:0 | LoadSource(lib/src/a_module/mod.rs) |
|
||||||
| lib/src/a_module/mod.rs:0:0:0:0 | Parse(lib/src/a_module/mod.rs) |
|
| lib/src/a_module/mod.rs:0:0:0:0 | Parse(lib/src/a_module/mod.rs) |
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
| exe/src/main.rs:0:0:0:0 | Extract(exe/src/main.rs) |
|
| exe/src/main.rs:0:0:0:0 | Extract(exe/src/main.rs) |
|
||||||
| exe/src/main.rs:0:0:0:0 | LoadSource(exe/src/main.rs) |
|
| exe/src/main.rs:0:0:0:0 | LoadSource(exe/src/main.rs) |
|
||||||
| exe/src/main.rs:0:0:0:0 | Parse(exe/src/main.rs) |
|
| exe/src/main.rs:0:0:0:0 | Parse(exe/src/main.rs) |
|
||||||
|
| file://:0:0:0:0 | FindManifests |
|
||||||
| lib/src/a_module/mod.rs:0:0:0:0 | Extract(lib/src/a_module/mod.rs) |
|
| lib/src/a_module/mod.rs:0:0:0:0 | Extract(lib/src/a_module/mod.rs) |
|
||||||
| lib/src/a_module/mod.rs:0:0:0:0 | LoadSource(lib/src/a_module/mod.rs) |
|
| lib/src/a_module/mod.rs:0:0:0:0 | LoadSource(lib/src/a_module/mod.rs) |
|
||||||
| lib/src/a_module/mod.rs:0:0:0:0 | Parse(lib/src/a_module/mod.rs) |
|
| lib/src/a_module/mod.rs:0:0:0:0 | Parse(lib/src/a_module/mod.rs) |
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
| Elements extracted | 85 |
|
| Elements extracted | 86 |
|
||||||
| Elements unextracted | 0 |
|
| Elements unextracted | 0 |
|
||||||
| Extraction errors | 0 |
|
| Extraction errors | 0 |
|
||||||
| Extraction warnings | 0 |
|
| Extraction warnings | 0 |
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ module Impl {
|
|||||||
class ExtractorStep extends Generated::ExtractorStep {
|
class ExtractorStep extends Generated::ExtractorStep {
|
||||||
override string toString() {
|
override string toString() {
|
||||||
result = this.getAction() + "(" + this.getFile().getAbsolutePath() + ")"
|
result = this.getAction() + "(" + this.getFile().getAbsolutePath() + ")"
|
||||||
|
or
|
||||||
|
not this.hasFile() and result = this.getAction()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -29,12 +29,17 @@ module Generated {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the file of this extractor step.
|
* Gets the file of this extractor step, if it exists.
|
||||||
*/
|
*/
|
||||||
File getFile() {
|
File getFile() {
|
||||||
result = Synth::convertExtractorStepToRaw(this).(Raw::ExtractorStep).getFile()
|
result = Synth::convertExtractorStepToRaw(this).(Raw::ExtractorStep).getFile()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Holds if `getFile()` exists.
|
||||||
|
*/
|
||||||
|
final predicate hasFile() { exists(this.getFile()) }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the duration ms of this extractor step.
|
* Gets the duration ms of this extractor step.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -21,17 +21,17 @@ module Raw {
|
|||||||
/**
|
/**
|
||||||
* Gets the action of this extractor step.
|
* Gets the action of this extractor step.
|
||||||
*/
|
*/
|
||||||
string getAction() { extractor_steps(this, result, _, _) }
|
string getAction() { extractor_steps(this, result, _) }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the file of this extractor step.
|
* Gets the file of this extractor step, if it exists.
|
||||||
*/
|
*/
|
||||||
File getFile() { extractor_steps(this, _, result, _) }
|
File getFile() { extractor_step_files(this, result) }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the duration ms of this extractor step.
|
* Gets the duration ms of this extractor step.
|
||||||
*/
|
*/
|
||||||
int getDurationMs() { extractor_steps(this, _, _, result) }
|
int getDurationMs() { extractor_steps(this, _, result) }
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -128,10 +128,15 @@ locatable_locations(
|
|||||||
extractor_steps(
|
extractor_steps(
|
||||||
unique int id: @extractor_step,
|
unique int id: @extractor_step,
|
||||||
string action: string ref,
|
string action: string ref,
|
||||||
int file: @file ref,
|
|
||||||
int duration_ms: int ref
|
int duration_ms: int ref
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#keyset[id]
|
||||||
|
extractor_step_files(
|
||||||
|
int id: @extractor_step ref,
|
||||||
|
int file: @file ref
|
||||||
|
);
|
||||||
|
|
||||||
@locatable =
|
@locatable =
|
||||||
@ast_node
|
@ast_node
|
||||||
;
|
;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
| Elements extracted | 404 |
|
| Elements extracted | 405 |
|
||||||
| Elements unextracted | 0 |
|
| Elements unextracted | 0 |
|
||||||
| Extraction errors | 0 |
|
| Extraction errors | 0 |
|
||||||
| Extraction warnings | 7 |
|
| Extraction warnings | 7 |
|
||||||
|
|||||||
@@ -107,5 +107,5 @@ class PathAstNode(Resolvable):
|
|||||||
@ql.internal
|
@ql.internal
|
||||||
class ExtractorStep(Element):
|
class ExtractorStep(Element):
|
||||||
action: string
|
action: string
|
||||||
file: File
|
file: optional[File]
|
||||||
duration_ms: int
|
duration_ms: int
|
||||||
|
|||||||
Reference in New Issue
Block a user