Skip to content

Commit 08bf6d7

Browse files
authored
Merge branch 'main' into guarded-free2
2 parents 88be4b8 + 6785b93 commit 08bf6d7

File tree

519 files changed

+39704
-1983
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

519 files changed

+39704
-1983
lines changed

.bazelrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,5 @@ common --registry=file:///%workspace%/misc/bazel/registry
2323
common --registry=https://bcr.bazel.build
2424

2525
common --@rules_dotnet//dotnet/settings:strict_deps=false
26-
common --experimental_isolated_extension_usages
2726

2827
try-import %workspace%/local.bazelrc

.bazelrc.internal

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@ common --registry=https://bcr.bazel.build
88
# its implementation packages without providing any code itself.
99
# We either can depend on internal implementation details, or turn of strict deps.
1010
common --@rules_dotnet//dotnet/settings:strict_deps=false
11-
common --experimental_isolated_extension_usages

BUILD.bazel

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
exports_files(["LICENSE"])
1+
exports_files([
2+
"LICENSE",
3+
"Cargo.lock",
4+
"Cargo.toml",
5+
])

MODULE.bazel

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -31,41 +31,44 @@ bazel_dep(name = "rules_rust", version = "0.52.2")
3131

3232
bazel_dep(name = "buildifier_prebuilt", version = "6.4.0", dev_dependency = True)
3333

34-
# crate_py but shortened due to Windows file path considerations
35-
cp = use_extension(
36-
"@rules_rust//crate_universe:extension.bzl",
37-
"crate",
38-
isolate = True,
39-
)
40-
cp.from_cargo(
41-
name = "py_deps",
42-
cargo_lockfile = "//python/extractor/tsg-python:Cargo.lock",
43-
manifests = [
44-
"//python/extractor/tsg-python:Cargo.toml",
45-
"//python/extractor/tsg-python/tsp:Cargo.toml",
34+
# Keep edition and version approximately in sync with internal repo.
35+
# the versions there are canonical, the versions here are used for CI in github/codeql, as well as for the vendoring of dependencies.
36+
RUST_EDITION = "2021"
37+
38+
RUST_VERSION = "1.81.0"
39+
40+
rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
41+
rust.toolchain(
42+
edition = RUST_EDITION,
43+
# We need those extra target triples so that we can build universal binaries on macos
44+
extra_target_triples = [
45+
"x86_64-apple-darwin",
46+
"aarch64-apple-darwin",
4647
],
48+
versions = [RUST_VERSION],
4749
)
48-
use_repo(cp, "py_deps")
50+
use_repo(rust, "rust_toolchains")
4951

50-
# deps for ruby+rust, but shortened due to windows file paths
51-
r = use_extension(
52-
"@rules_rust//crate_universe:extension.bzl",
53-
"crate",
54-
isolate = True,
55-
)
56-
r.from_cargo(
57-
name = "r",
58-
cargo_lockfile = "//:Cargo.lock",
59-
manifests = [
60-
"//:Cargo.toml",
61-
"//ruby/extractor:Cargo.toml",
62-
"//rust/extractor:Cargo.toml",
63-
"//rust/extractor/macros:Cargo.toml",
64-
"//rust/ast-generator:Cargo.toml",
65-
"//shared/tree-sitter-extractor:Cargo.toml",
66-
],
52+
register_toolchains("@rust_toolchains//:all")
53+
54+
rust_host_tools = use_extension("@rules_rust//rust:extensions.bzl", "rust_host_tools")
55+
56+
# Don't download a second toolchain as host toolchain, make sure this is the same version as above
57+
# The host toolchain is used for vendoring dependencies.
58+
rust_host_tools.host_tools(
59+
edition = RUST_EDITION,
60+
version = RUST_VERSION,
6761
)
68-
use_repo(r, tree_sitter_extractors_deps = "r")
62+
63+
# deps for python extractor
64+
# keep in sync by running `misc/bazel/3rdparty/update_cargo_deps.sh`
65+
py_deps = use_extension("//misc/bazel/3rdparty:py_deps_extension.bzl", "p")
66+
use_repo(py_deps, "vendor__anyhow-1.0.44", "vendor__cc-1.0.70", "vendor__clap-2.33.3", "vendor__regex-1.5.5", "vendor__smallvec-1.6.1", "vendor__string-interner-0.12.2", "vendor__thiserror-1.0.29", "vendor__tree-sitter-0.20.4", "vendor__tree-sitter-graph-0.7.0")
67+
68+
# deps for ruby+rust
69+
# keep in sync by running `misc/bazel/3rdparty/update_cargo_deps.sh`
70+
tree_sitter_extractors_deps = use_extension("//misc/bazel/3rdparty:tree_sitter_extractors_extension.bzl", "r")
71+
use_repo(tree_sitter_extractors_deps, "vendor__anyhow-1.0.93", "vendor__argfile-0.2.1", "vendor__chrono-0.4.38", "vendor__clap-4.5.20", "vendor__encoding-0.2.33", "vendor__figment-0.10.19", "vendor__flate2-1.0.34", "vendor__glob-0.3.1", "vendor__globset-0.4.15", "vendor__itertools-0.10.5", "vendor__itertools-0.13.0", "vendor__lazy_static-1.5.0", "vendor__log-0.4.22", "vendor__num-traits-0.2.19", "vendor__num_cpus-1.16.0", "vendor__proc-macro2-1.0.89", "vendor__quote-1.0.37", "vendor__ra_ap_base_db-0.0.232", "vendor__ra_ap_hir-0.0.232", "vendor__ra_ap_hir_def-0.0.232", "vendor__ra_ap_hir_expand-0.0.232", "vendor__ra_ap_ide_db-0.0.232", "vendor__ra_ap_load-cargo-0.0.232", "vendor__ra_ap_parser-0.0.232", "vendor__ra_ap_paths-0.0.232", "vendor__ra_ap_project_model-0.0.232", "vendor__ra_ap_span-0.0.232", "vendor__ra_ap_syntax-0.0.232", "vendor__ra_ap_vfs-0.0.232", "vendor__rand-0.8.5", "vendor__rayon-1.10.0", "vendor__regex-1.11.1", "vendor__serde-1.0.214", "vendor__serde_json-1.0.132", "vendor__serde_with-3.11.0", "vendor__stderrlog-0.6.0", "vendor__syn-2.0.87", "vendor__tracing-0.1.40", "vendor__tracing-subscriber-0.3.18", "vendor__tree-sitter-0.24.4", "vendor__tree-sitter-embedded-template-0.23.2", "vendor__tree-sitter-json-0.24.8", "vendor__tree-sitter-ql-0.23.1", "vendor__tree-sitter-ruby-0.23.1", "vendor__triomphe-0.1.14", "vendor__ungrammar-1.16.1")
6972

7073
dotnet = use_extension("@rules_dotnet//dotnet:extensions.bzl", "dotnet")
7174
dotnet.toolchain(dotnet_version = "8.0.101")
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
category: minorAnalysis
3+
---
4+
* The `Guards` library (`semmle.code.cpp.controlflow.Guards`) has been improved to recognize more guard conditions. Additionally, the guards library no longer considers guards in static local initializers or global initializers as `GuardCondition`s.

0 commit comments

Comments
 (0)