module( name = "ql", version = "0.0", repo_name = "codeql", ) # this points to our internal repository when `codeql` is checked out as a submodule thereof # when building things from `codeql` independently this is stubbed out in `.bazelrc` bazel_dep(name = "semmle_code", version = "0.0") local_path_override( module_name = "semmle_code", path = "..", ) # see https://registry.bazel.build/ for a list of available packages bazel_dep(name = "platforms", version = "0.0.11") bazel_dep(name = "rules_go", version = "0.50.1") bazel_dep(name = "rules_pkg", version = "1.0.1") bazel_dep(name = "rules_nodejs", version = "6.2.0-codeql.1") bazel_dep(name = "rules_python", version = "0.40.0") bazel_dep(name = "rules_shell", version = "0.3.0") bazel_dep(name = "bazel_skylib", version = "1.7.1") bazel_dep(name = "abseil-cpp", version = "20240116.1", repo_name = "absl") bazel_dep(name = "nlohmann_json", version = "3.11.3", repo_name = "json") bazel_dep(name = "fmt", version = "10.0.0") bazel_dep(name = "rules_kotlin", version = "2.1.3-codeql.1") bazel_dep(name = "gazelle", version = "0.40.0") bazel_dep(name = "rules_dotnet", version = "0.17.4") bazel_dep(name = "googletest", version = "1.14.0.bcr.1") bazel_dep(name = "rules_rust", version = "0.58.0") bazel_dep(name = "zstd", version = "1.5.5.bcr.1") bazel_dep(name = "buildifier_prebuilt", version = "6.4.0", dev_dependency = True) # Keep edition and version approximately in sync with internal repo. # the versions there are canonical, the versions here are used for CI in github/codeql, as well as for the vendoring of dependencies. RUST_EDITION = "2024" # run buildutils-internal/scripts/fill-rust-sha256s.py when updating (internal repo) RUST_VERSION = "1.88.0" rust = use_extension("@rules_rust//rust:extensions.bzl", "rust") rust.toolchain( edition = RUST_EDITION, # We need those extra target triples so that we can build universal binaries on macos extra_target_triples = [ "x86_64-apple-darwin", "aarch64-apple-darwin", ], # generated by buildutils-internal/scripts/fill-rust-sha256s.py (internal repo) sha256s = { "rustc-1.88.0-x86_64-unknown-linux-gnu.tar.xz": "b049fd57fce274d10013e2cf0e05f215f68f6580865abc52178f66ae9bf43fd8", "rustc-1.88.0-x86_64-apple-darwin.tar.xz": "c8f1ea4fc3e507c8e733809bd3ad91a00f5b209d85620be9013bea5f97f31f24", "rustc-1.88.0-aarch64-apple-darwin.tar.xz": "249f4cacd3fac1f718af19373c73e9d3b9a595965972d8b1f3947c578110f520", "rustc-1.88.0-x86_64-pc-windows-msvc.tar.xz": "238616f0a578d6d4c034ffb8897064fa8df68a3823df201df48ab2baf68a639f", "clippy-1.88.0-x86_64-unknown-linux-gnu.tar.xz": "db09c9e4a8a0b486781d87403f74a203a58d9ef0a58ba10c39264916d93ac603", "clippy-1.88.0-x86_64-apple-darwin.tar.xz": "d25711565eccaf1ead038a626f14eddb8e7db114fb73c24e93264dae4d4298d3", "clippy-1.88.0-aarch64-apple-darwin.tar.xz": "9ad90cddc3ebd892c9d69c9ecd45c30d236e1e4af5993312c6f4538af9dcf3e7", "clippy-1.88.0-x86_64-pc-windows-msvc.tar.xz": "0d02a7b3a8eb407c6a62c75a56f365b312f8ec2732cac5ecfc7a062526fddbe3", "cargo-1.88.0-x86_64-unknown-linux-gnu.tar.xz": "856962610ee821648cee32e3d6abac667af7bb7ea6ec6f3d184cc31e66044f6b", "cargo-1.88.0-x86_64-apple-darwin.tar.xz": "e7f672132591df180b58f8e7af875e1971a10fe71243f7d84f9b3f6742f998bc", "cargo-1.88.0-aarch64-apple-darwin.tar.xz": "71c08c8fab9b7a9cd13b6119886d50ce48efa8261d08e1fd328ed3ee1c84e2e0", "cargo-1.88.0-x86_64-pc-windows-msvc.tar.xz": "5e3b21d77733e0dbb5542015f89b15de1844bd6e3270fdc90bb821b2a04b1cda", "llvm-tools-1.88.0-x86_64-unknown-linux-gnu.tar.xz": "16e8d9b4187cc3936feddd9ceccde0157a4a1b2be98ca9c202cda304e0e81853", "llvm-tools-1.88.0-x86_64-apple-darwin.tar.xz": "92780b5be0950c206d998a6f7094d4ee29b992d1d2f46371465e8bdaa4e619a4", "llvm-tools-1.88.0-aarch64-apple-darwin.tar.xz": "c9bf981651b573d2abb619a5b3ae038686772e51e7ec53a8b5e585c51c1431e5", "llvm-tools-1.88.0-x86_64-pc-windows-msvc.tar.xz": "6522371a06d183effaf080c59d2a8c0720088157ae693123386bc7070ba62a73", "rust-std-1.88.0-x86_64-unknown-linux-gnu.tar.xz": "36d7eacf46bd5199cb433e49a9ed9c9b380d82f8a0ebc05e89b43b51c070c955", "rust-std-1.88.0-x86_64-apple-darwin.tar.xz": "2570350a6651e60a2fe0aa438be5cd123ed3543b4b44c916284ff7e7e331d16a", "rust-std-1.88.0-aarch64-apple-darwin.tar.xz": "532be07511af557cb67f33bfc77044a787363ab281b963752542bc837ce90e96", "rust-std-1.88.0-x86_64-pc-windows-msvc.tar.xz": "6b65df769259ad18428271aea110ec1a5027e922f3e36d77923dc69a38ff6318", }, versions = [RUST_VERSION], ) use_repo(rust, "rust_toolchains") register_toolchains("@rust_toolchains//:all") # deps for python extractor # keep in sync by running `misc/bazel/3rdparty/update_cargo_deps.sh` py_deps = use_extension("//misc/bazel/3rdparty:py_deps_extension.bzl", "p") use_repo( py_deps, "vendor_py__anyhow-1.0.95", "vendor_py__cc-1.2.14", "vendor_py__clap-4.5.30", "vendor_py__regex-1.11.1", "vendor_py__tree-sitter-0.20.4", "vendor_py__tree-sitter-graph-0.7.0", ) # deps for ruby+rust # keep in sync by running `misc/bazel/3rdparty/update_cargo_deps.sh` tree_sitter_extractors_deps = use_extension("//misc/bazel/3rdparty:tree_sitter_extractors_extension.bzl", "r") use_repo( tree_sitter_extractors_deps, "vendor_ts__anyhow-1.0.98", "vendor_ts__argfile-0.2.1", "vendor_ts__chalk-ir-0.103.0", "vendor_ts__chrono-0.4.41", "vendor_ts__clap-4.5.41", "vendor_ts__dunce-1.0.5", "vendor_ts__either-1.15.0", "vendor_ts__encoding-0.2.33", "vendor_ts__figment-0.10.19", "vendor_ts__flate2-1.1.0", "vendor_ts__glob-0.3.2", "vendor_ts__globset-0.4.15", "vendor_ts__itertools-0.14.0", "vendor_ts__lazy_static-1.5.0", "vendor_ts__mustache-0.9.0", "vendor_ts__num-traits-0.2.19", "vendor_ts__num_cpus-1.17.0", "vendor_ts__proc-macro2-1.0.95", "vendor_ts__quote-1.0.40", "vendor_ts__ra_ap_base_db-0.0.294", "vendor_ts__ra_ap_cfg-0.0.294", "vendor_ts__ra_ap_hir-0.0.294", "vendor_ts__ra_ap_hir_def-0.0.294", "vendor_ts__ra_ap_hir_expand-0.0.294", "vendor_ts__ra_ap_hir_ty-0.0.294", "vendor_ts__ra_ap_ide_db-0.0.294", "vendor_ts__ra_ap_intern-0.0.294", "vendor_ts__ra_ap_load-cargo-0.0.294", "vendor_ts__ra_ap_parser-0.0.294", "vendor_ts__ra_ap_paths-0.0.294", "vendor_ts__ra_ap_project_model-0.0.294", "vendor_ts__ra_ap_span-0.0.294", "vendor_ts__ra_ap_stdx-0.0.294", "vendor_ts__ra_ap_syntax-0.0.294", "vendor_ts__ra_ap_vfs-0.0.294", "vendor_ts__rand-0.9.1", "vendor_ts__rayon-1.10.0", "vendor_ts__regex-1.11.1", "vendor_ts__serde-1.0.219", "vendor_ts__serde_json-1.0.140", "vendor_ts__serde_with-3.14.0", "vendor_ts__syn-2.0.104", "vendor_ts__toml-0.9.2", "vendor_ts__tracing-0.1.41", "vendor_ts__tracing-flame-0.2.0", "vendor_ts__tracing-subscriber-0.3.19", "vendor_ts__tree-sitter-0.24.6", "vendor_ts__tree-sitter-embedded-template-0.23.2", "vendor_ts__tree-sitter-json-0.24.8", "vendor_ts__tree-sitter-ql-0.23.1", "vendor_ts__tree-sitter-ruby-0.23.1", "vendor_ts__triomphe-0.1.14", "vendor_ts__ungrammar-1.16.1", "vendor_ts__zstd-0.13.3", ) http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") # rust-analyzer sources needed by the rust ast-generator (see `rust/ast-generator/README.md`) RUST_ANALYZER_SRC_TAG = "2025-01-07" http_archive( name = "rust-analyzer-src", build_file = "//rust/ast-generator:BUILD.rust-analyzer-src.bazel", integrity = "sha256-eo8mIaUafZL8LOM65bDIIIXw1rNQ/P/x5RK/XUtgo5g=", patch_args = ["-p1"], patches = [ "//rust/ast-generator:patches/rust-analyzer.patch", ], strip_prefix = "rust-analyzer-%s" % RUST_ANALYZER_SRC_TAG, url = "https://github.com/rust-lang/rust-analyzer/archive/refs/tags/%s.tar.gz" % RUST_ANALYZER_SRC_TAG, ) dotnet = use_extension("@rules_dotnet//dotnet:extensions.bzl", "dotnet") dotnet.toolchain(dotnet_version = "9.0.100") use_repo(dotnet, "dotnet_toolchains") register_toolchains("@dotnet_toolchains//:all") csharp_main_extension = use_extension("//csharp:paket.main_extension.bzl", "main_extension") use_repo(csharp_main_extension, "paket.main") pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip") pip.parse( hub_name = "codegen_deps", python_version = "3.12", requirements_lock = "//misc/codegen:requirements_lock.txt", ) use_repo(pip, "codegen_deps") swift_deps = use_extension("//swift/third_party:load.bzl", "swift_deps") # following list can be kept in sync with `bazel mod tidy` use_repo( swift_deps, "binlog", "picosha2", "swift-prebuilt-linux", "swift-prebuilt-linux-download-only", "swift-prebuilt-macos", "swift-prebuilt-macos-download-only", "swift-resource-dir-linux", "swift-resource-dir-macos", ) node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node") node.toolchain( name = "nodejs", node_urls = [ "https://nodejs.org/dist/v{version}/{filename}", "https://mirrors.dotsrc.org/nodejs/release/v{version}/{filename}", ], node_version = "18.15.0", ) use_repo(node, "nodejs", "nodejs_toolchains") kotlin_extractor_deps = use_extension("//java/kotlin-extractor:deps.bzl", "kotlin_extractor_deps") # following list can be kept in sync by running `bazel mod tidy` in `codeql` use_repo( kotlin_extractor_deps, "codeql_kotlin_defaults", "codeql_kotlin_embeddable", "kotlin-compiler-1.6.0", "kotlin-compiler-1.6.20", "kotlin-compiler-1.7.0", "kotlin-compiler-1.7.20", "kotlin-compiler-1.8.0", "kotlin-compiler-1.9.0-Beta", "kotlin-compiler-1.9.20-Beta", "kotlin-compiler-2.0.0-RC1", "kotlin-compiler-2.0.20-Beta2", "kotlin-compiler-2.1.0-Beta1", "kotlin-compiler-2.1.20-Beta1", "kotlin-compiler-2.2.0-Beta1", "kotlin-compiler-embeddable-1.6.0", "kotlin-compiler-embeddable-1.6.20", "kotlin-compiler-embeddable-1.7.0", "kotlin-compiler-embeddable-1.7.20", "kotlin-compiler-embeddable-1.8.0", "kotlin-compiler-embeddable-1.9.0-Beta", "kotlin-compiler-embeddable-1.9.20-Beta", "kotlin-compiler-embeddable-2.0.0-RC1", "kotlin-compiler-embeddable-2.0.20-Beta2", "kotlin-compiler-embeddable-2.1.0-Beta1", "kotlin-compiler-embeddable-2.1.20-Beta1", "kotlin-compiler-embeddable-2.2.0-Beta1", "kotlin-stdlib-1.6.0", "kotlin-stdlib-1.6.20", "kotlin-stdlib-1.7.0", "kotlin-stdlib-1.7.20", "kotlin-stdlib-1.8.0", "kotlin-stdlib-1.9.0-Beta", "kotlin-stdlib-1.9.20-Beta", "kotlin-stdlib-2.0.0-RC1", "kotlin-stdlib-2.0.20-Beta2", "kotlin-stdlib-2.1.0-Beta1", "kotlin-stdlib-2.1.20-Beta1", "kotlin-stdlib-2.2.0-Beta1", ) go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk") go_sdk.download(version = "1.24.0") go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps") go_deps.from_file(go_mod = "//go/extractor:go.mod") use_repo(go_deps, "org_golang_x_mod", "org_golang_x_tools") lfs_archive = use_repo_rule("//misc/bazel:lfs.bzl", "lfs_archive") lfs_archive( name = "ripunzip-linux", src = "//misc/ripunzip:ripunzip-Linux.zip", build_file = "//misc/ripunzip:BUILD.ripunzip.bazel", ) lfs_archive( name = "ripunzip-windows", src = "//misc/ripunzip:ripunzip-Windows.zip", build_file = "//misc/ripunzip:BUILD.ripunzip.bazel", ) lfs_archive( name = "ripunzip-macos", src = "//misc/ripunzip:ripunzip-macOS.zip", build_file = "//misc/ripunzip:BUILD.ripunzip.bazel", ) register_toolchains( "@nodejs_toolchains//:all", )