Skip to content

Commit 3da6cee

Browse files
author
Paolo Tranquilli
committed
Merge branch 'main' into rust-experiment
2 parents 04753b2 + 89c387c commit 3da6cee

1,448 files changed

Lines changed: 120845 additions & 19225 deletions

File tree

Some content is hidden

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

.bazelrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@ common --registry=file:///%workspace%/misc/bazel/registry
2424
common --registry=https://bcr.bazel.build
2525

2626
common --@rules_dotnet//dotnet/settings:strict_deps=false
27+
common --experimental_isolated_extension_usages
2728

2829
try-import %workspace%/local.bazelrc

.bazelrc.internal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ 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

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.2.1
1+
5f5d70b6c4d2fb1a889479569107f1692239e8a7

.github/workflows/buildifier.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ jobs:
2424
extra_args: >
2525
buildifier --all-files 2>&1 ||
2626
(
27-
echo -e "In order to format all bazel files, please run:\n bazel run //misc/bazel:buildifier"; exit 1
27+
echo -e "In order to format all bazel files, please run:\n bazel run //misc/bazel/buildifier"; exit 1
2828
)

.github/workflows/cpp-swift-analysis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
with:
3838
languages: cpp
3939
config-file: ./.github/codeql/codeql-config.yml
40-
40+
4141
- name: "[Ubuntu] Remove GCC 13 from runner image"
4242
shell: bash
4343
run: |
@@ -48,7 +48,7 @@ jobs:
4848
- name: "Build Swift extractor using Bazel"
4949
run: |
5050
bazel clean --expunge
51-
bazel run //swift:create-extractor-pack --nouse_action_cache --noremote_accept_cached --noremote_upload_local_results --spawn_strategy=local --features=-layering_check
51+
bazel run //swift:create-extractor-pack --nouse_action_cache --noremote_accept_cached --noremote_upload_local_results --spawn_strategy=local
5252
bazel shutdown
5353
5454
- name: Perform CodeQL Analysis

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
.cache
88

99
# qltest projects and artifacts
10+
*.actual
1011
*/ql/test/**/*.testproj
11-
*/ql/test/**/*.actual
1212
*/ql/test/**/go.sum
1313

1414
# Visual studio temporaries, except a file used by QL4VS

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ repos:
2626
name: Format bazel files
2727
files: \.(bazel|bzl)
2828
language: system
29-
entry: bazel run //misc/bazel:buildifier
29+
entry: bazel run //misc/bazel/buildifier
3030
pass_filenames: false
3131

3232
# DISABLED: can be enabled by copying this config and installing `pre-commit` with `--config` on the copy

MODULE.bazel

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
module(
2-
name = "codeql",
2+
name = "ql",
33
version = "0.0",
4+
repo_name = "codeql",
45
)
56

67
# this points to our internal repository when `codeql` is checked out as a submodule thereof
@@ -30,27 +31,37 @@ bazel_dep(name = "rules_rust", version = "0.49.1")
3031

3132
bazel_dep(name = "buildifier_prebuilt", version = "6.4.0", dev_dependency = True)
3233

33-
crate = use_extension(
34+
# crate_py but shortened due to Windows file path considerations
35+
cp = use_extension(
3436
"@rules_rust//crate_universe:extension.bzl",
3537
"crate",
38+
isolate = True,
3639
)
37-
crate.from_cargo(
40+
cp.from_cargo(
3841
name = "py_deps",
3942
cargo_lockfile = "//python/extractor/tsg-python:Cargo.lock",
4043
manifests = [
4144
"//python/extractor/tsg-python:Cargo.toml",
4245
"//python/extractor/tsg-python/tsp:Cargo.toml",
4346
],
4447
)
45-
crate.from_cargo(
46-
name = "ruby_deps",
48+
use_repo(cp, "py_deps")
49+
50+
# crate_ruby, 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 = "rd",
4758
cargo_lockfile = "//ruby/extractor:Cargo.lock",
4859
manifests = [
4960
"//ruby/extractor:Cargo.toml",
5061
"//ruby/extractor/codeql-extractor-fake-crate:Cargo.toml",
5162
],
5263
)
53-
use_repo(crate, "py_deps", "ruby_deps")
64+
use_repo(r, ruby_deps = "rd")
5465

5566
dotnet = use_extension("@rules_dotnet//dotnet:extensions.bzl", "dotnet")
5667
dotnet.toolchain(dotnet_version = "8.0.101")
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
class Expr extends @expr {
2+
string toString() { none() }
3+
}
4+
5+
class Location extends @location_expr {
6+
string toString() { none() }
7+
}
8+
9+
predicate isExprWithNewBuiltin(Expr expr) {
10+
exists(int kind | exprs(expr, kind, _) | 385 <= kind and kind <= 388)
11+
}
12+
13+
from Expr expr, int kind, int kind_new, Location location
14+
where
15+
exprs(expr, kind, location) and
16+
if isExprWithNewBuiltin(expr) then kind_new = 1 else kind_new = kind
17+
select expr, kind_new, location

0 commit comments

Comments
 (0)