From 60d6429b5d880d5bf22d652742f3b4747f56c161 Mon Sep 17 00:00:00 2001 From: Taus Date: Fri, 8 May 2026 13:41:45 +0000 Subject: [PATCH] unified: update build dependencies --- Cargo.lock | 2 - Cargo.toml | 1 + MODULE.bazel | 3 +- .../tree_sitter_extractors_deps/BUILD.bazel | 24 +++ .../BUILD.tree-sitter-swift-0.7.2.bazel | 166 ------------------ .../tree_sitter_extractors_deps/defs.bzl | 48 +++-- unified/extractor/BUILD.bazel | 1 + unified/extractor/Cargo.toml | 2 +- 8 files changed, 65 insertions(+), 182 deletions(-) delete mode 100644 misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.tree-sitter-swift-0.7.2.bazel diff --git a/Cargo.lock b/Cargo.lock index 856e6fb42e6..5070bfb7c04 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2944,8 +2944,6 @@ dependencies = [ [[package]] name = "tree-sitter-swift" version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3b98fb6bc8e6a6a10023f401aa6a1858115e849dfaf7de57dd8b8ea0f257bd9" dependencies = [ "cc", "tree-sitter-language", diff --git a/Cargo.toml b/Cargo.toml index 4054c3a50be..62eb2e7e920 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,7 @@ members = [ "shared/yeast-macros", "ruby/extractor", "unified/extractor", + "unified/extractor/tree-sitter-swift", "rust/extractor", "rust/extractor/macros", "rust/ast-generator", diff --git a/MODULE.bazel b/MODULE.bazel index ee40f7789e4..b0667e120aa 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -102,6 +102,7 @@ use_repo( tree_sitter_extractors_deps, "vendor_ts__anyhow-1.0.100", "vendor_ts__argfile-0.2.1", + "vendor_ts__cc-1.2.61", "vendor_ts__chalk-ir-0.104.0", "vendor_ts__chrono-0.4.42", "vendor_ts__clap-4.5.48", @@ -150,10 +151,10 @@ use_repo( "vendor_ts__tree-sitter-0.26.8", "vendor_ts__tree-sitter-embedded-template-0.25.0", "vendor_ts__tree-sitter-json-0.24.8", + "vendor_ts__tree-sitter-language-0.1.5", "vendor_ts__tree-sitter-python-0.23.6", "vendor_ts__tree-sitter-ql-0.23.1", "vendor_ts__tree-sitter-ruby-0.23.1", - "vendor_ts__tree-sitter-swift-0.7.2", "vendor_ts__triomphe-0.1.14", "vendor_ts__ungrammar-1.16.1", "vendor_ts__zstd-0.13.3", diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.bazel index 1d1b47192a2..e296288f189 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.bazel +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.bazel @@ -55,6 +55,18 @@ alias( tags = ["manual"], ) +alias( + name = "cc-1.2.61", + actual = "@vendor_ts__cc-1.2.61//:cc", + tags = ["manual"], +) + +alias( + name = "cc", + actual = "@vendor_ts__cc-1.2.61//:cc", + tags = ["manual"], +) + alias( name = "chalk-ir-0.104.0", actual = "@vendor_ts__chalk-ir-0.104.0//:chalk_ir", @@ -637,6 +649,18 @@ alias( tags = ["manual"], ) +alias( + name = "tree-sitter-language-0.1.5", + actual = "@vendor_ts__tree-sitter-language-0.1.5//:tree_sitter_language", + tags = ["manual"], +) + +alias( + name = "tree-sitter-language", + actual = "@vendor_ts__tree-sitter-language-0.1.5//:tree_sitter_language", + tags = ["manual"], +) + alias( name = "tree-sitter-python-0.23.6", actual = "@vendor_ts__tree-sitter-python-0.23.6//:tree_sitter_python", diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.tree-sitter-swift-0.7.2.bazel b/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.tree-sitter-swift-0.7.2.bazel deleted file mode 100644 index f9bb6fa50c3..00000000000 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/BUILD.tree-sitter-swift-0.7.2.bazel +++ /dev/null @@ -1,166 +0,0 @@ -############################################################################### -# @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//cargo:defs.bzl", - "cargo_build_script", - "cargo_toml_env_vars", -) -load("@rules_rust//rust:defs.bzl", "rust_library") - -package(default_visibility = ["//visibility:public"]) - -cargo_toml_env_vars( - name = "cargo_toml_env_vars", - src = "Cargo.toml", -) - -rust_library( - name = "tree_sitter_swift", - 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_root = "bindings/rust/lib.rs", - edition = "2018", - rustc_env_files = [ - ":cargo_toml_env_vars", - ], - rustc_flags = [ - "--cap-lints=allow", - ], - tags = [ - "cargo-bazel", - "crate-name=tree-sitter-swift", - "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-linux-android": [], - "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], - "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [], - "@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:aarch64-unknown-uefi": [], - "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], - "@rules_rust//rust/platform:arm-unknown-linux-musleabi": [], - "@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-linux-gnu": [], - "@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-emscripten": [], - "@rules_rust//rust/platform:wasm32-unknown-unknown": [], - "@rules_rust//rust/platform:wasm32-wasip1": [], - "@rules_rust//rust/platform:wasm32-wasip1-threads": [], - "@rules_rust//rust/platform:wasm32-wasip2": [], - "@rules_rust//rust/platform:x86_64-apple-darwin": [], - "@rules_rust//rust/platform:x86_64-apple-ios": [], - "@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-fuchsia": [], - "@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": [], - "@rules_rust//rust/platform:x86_64-unknown-uefi": [], - "//conditions:default": ["@platforms//:incompatible"], - }), - version = "0.7.2", - deps = [ - "@vendor_ts__tree-sitter-language-0.1.5//:tree_sitter_language", - "@vendor_ts__tree-sitter-swift-0.7.2//:build_script_build", - ], -) - -cargo_build_script( - name = "_bs", - srcs = glob( - include = ["**/*.rs"], - allow_empty = True, - ), - compile_data = glob( - include = ["**"], - allow_empty = True, - exclude = [ - "**/* *", - "**/*.rs", - ".tmp_git_root/**/*", - "BUILD", - "BUILD.bazel", - "WORKSPACE", - "WORKSPACE.bazel", - ], - ), - crate_name = "build_script_build", - crate_root = "bindings/rust/build.rs", - data = glob( - include = ["**"], - allow_empty = True, - exclude = [ - "**/* *", - ".tmp_git_root/**/*", - "BUILD", - "BUILD.bazel", - "WORKSPACE", - "WORKSPACE.bazel", - ], - ), - edition = "2018", - pkg_name = "tree-sitter-swift", - rustc_env_files = [ - ":cargo_toml_env_vars", - ], - rustc_flags = [ - "--cap-lints=allow", - ], - tags = [ - "cargo-bazel", - "crate-name=tree-sitter-swift", - "manual", - "noclippy", - "norustfmt", - ], - version = "0.7.2", - visibility = ["//visibility:private"], - deps = [ - "@vendor_ts__cc-1.2.61//:cc", - ], -) - -alias( - name = "build_script_build", - actual = ":_bs", - tags = ["manual"], -) diff --git a/misc/bazel/3rdparty/tree_sitter_extractors_deps/defs.bzl b/misc/bazel/3rdparty/tree_sitter_extractors_deps/defs.bzl index 4f70edd6ab3..aa4755432f2 100644 --- a/misc/bazel/3rdparty/tree_sitter_extractors_deps/defs.bzl +++ b/misc/bazel/3rdparty/tree_sitter_extractors_deps/defs.bzl @@ -415,7 +415,11 @@ _NORMAL_DEPENDENCIES = { "tracing-subscriber": Label("@vendor_ts__tracing-subscriber-0.3.20//:tracing_subscriber"), "tree-sitter": Label("@vendor_ts__tree-sitter-0.26.8//:tree_sitter"), "tree-sitter-embedded-template": Label("@vendor_ts__tree-sitter-embedded-template-0.25.0//:tree_sitter_embedded_template"), - "tree-sitter-swift": Label("@vendor_ts__tree-sitter-swift-0.7.2//:tree_sitter_swift"), + }, + }, + "unified/extractor/tree-sitter-swift": { + _COMMON_CONDITION: { + "tree-sitter-language": Label("@vendor_ts__tree-sitter-language-0.1.5//:tree_sitter_language"), }, }, } @@ -456,6 +460,10 @@ _NORMAL_ALIASES = { _COMMON_CONDITION: { }, }, + "unified/extractor/tree-sitter-swift": { + _COMMON_CONDITION: { + }, + }, } _NORMAL_DEV_DEPENDENCIES = { @@ -482,6 +490,8 @@ _NORMAL_DEV_DEPENDENCIES = { }, "unified/extractor": { }, + "unified/extractor/tree-sitter-swift": { + }, } _NORMAL_DEV_ALIASES = { @@ -505,6 +515,8 @@ _NORMAL_DEV_ALIASES = { }, "unified/extractor": { }, + "unified/extractor/tree-sitter-swift": { + }, } _PROC_MACRO_DEPENDENCIES = { @@ -526,6 +538,8 @@ _PROC_MACRO_DEPENDENCIES = { }, "unified/extractor": { }, + "unified/extractor/tree-sitter-swift": { + }, } _PROC_MACRO_ALIASES = { @@ -547,6 +561,8 @@ _PROC_MACRO_ALIASES = { }, "unified/extractor": { }, + "unified/extractor/tree-sitter-swift": { + }, } _PROC_MACRO_DEV_DEPENDENCIES = { @@ -568,6 +584,8 @@ _PROC_MACRO_DEV_DEPENDENCIES = { }, "unified/extractor": { }, + "unified/extractor/tree-sitter-swift": { + }, } _PROC_MACRO_DEV_ALIASES = { @@ -591,6 +609,8 @@ _PROC_MACRO_DEV_ALIASES = { }, "unified/extractor": { }, + "unified/extractor/tree-sitter-swift": { + }, } _BUILD_DEPENDENCIES = { @@ -612,6 +632,11 @@ _BUILD_DEPENDENCIES = { }, "unified/extractor": { }, + "unified/extractor/tree-sitter-swift": { + _COMMON_CONDITION: { + "cc": Label("@vendor_ts__cc-1.2.61//:cc"), + }, + }, } _BUILD_ALIASES = { @@ -633,6 +658,10 @@ _BUILD_ALIASES = { }, "unified/extractor": { }, + "unified/extractor/tree-sitter-swift": { + _COMMON_CONDITION: { + }, + }, } _BUILD_PROC_MACRO_DEPENDENCIES = { @@ -654,6 +683,8 @@ _BUILD_PROC_MACRO_DEPENDENCIES = { }, "unified/extractor": { }, + "unified/extractor/tree-sitter-swift": { + }, } _BUILD_PROC_MACRO_ALIASES = { @@ -675,6 +706,8 @@ _BUILD_PROC_MACRO_ALIASES = { }, "unified/extractor": { }, + "unified/extractor/tree-sitter-swift": { + }, } _CONDITIONS = { @@ -3536,16 +3569,6 @@ def crate_repositories(): build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.tree-sitter-ruby-0.23.1.bazel"), ) - maybe( - http_archive, - name = "vendor_ts__tree-sitter-swift-0.7.2", - sha256 = "f3b98fb6bc8e6a6a10023f401aa6a1858115e849dfaf7de57dd8b8ea0f257bd9", - type = "tar.gz", - urls = ["https://static.crates.io/crates/tree-sitter-swift/0.7.2/download"], - strip_prefix = "tree-sitter-swift-0.7.2", - build_file = Label("//misc/bazel/3rdparty/tree_sitter_extractors_deps:BUILD.tree-sitter-swift-0.7.2.bazel"), - ) - maybe( http_archive, name = "vendor_ts__triomphe-0.1.14", @@ -4239,6 +4262,7 @@ def crate_repositories(): return [ struct(repo = "vendor_ts__anyhow-1.0.100", is_dev_dep = False), struct(repo = "vendor_ts__argfile-0.2.1", is_dev_dep = False), + struct(repo = "vendor_ts__cc-1.2.61", is_dev_dep = False), struct(repo = "vendor_ts__chalk-ir-0.104.0", is_dev_dep = False), struct(repo = "vendor_ts__chrono-0.4.42", is_dev_dep = False), struct(repo = "vendor_ts__clap-4.5.48", is_dev_dep = False), @@ -4285,9 +4309,9 @@ def crate_repositories(): struct(repo = "vendor_ts__tracing-subscriber-0.3.20", is_dev_dep = False), struct(repo = "vendor_ts__tree-sitter-0.26.8", is_dev_dep = False), struct(repo = "vendor_ts__tree-sitter-embedded-template-0.25.0", is_dev_dep = False), + struct(repo = "vendor_ts__tree-sitter-language-0.1.5", is_dev_dep = False), struct(repo = "vendor_ts__tree-sitter-python-0.23.6", is_dev_dep = False), struct(repo = "vendor_ts__tree-sitter-ruby-0.23.1", is_dev_dep = False), - struct(repo = "vendor_ts__tree-sitter-swift-0.7.2", is_dev_dep = False), struct(repo = "vendor_ts__triomphe-0.1.14", is_dev_dep = False), struct(repo = "vendor_ts__ungrammar-1.16.1", is_dev_dep = False), struct(repo = "vendor_ts__zstd-0.13.3", is_dev_dep = False), diff --git a/unified/extractor/BUILD.bazel b/unified/extractor/BUILD.bazel index 5a53d7cc3e0..80ca1c0057b 100644 --- a/unified/extractor/BUILD.bazel +++ b/unified/extractor/BUILD.bazel @@ -16,5 +16,6 @@ codeql_rust_binary( ) + [ "//shared/tree-sitter-extractor", "//shared/yeast", + "//unified/extractor/tree-sitter-swift", ], ) diff --git a/unified/extractor/Cargo.toml b/unified/extractor/Cargo.toml index 3877ec2e106..39c20598b1f 100644 --- a/unified/extractor/Cargo.toml +++ b/unified/extractor/Cargo.toml @@ -9,7 +9,7 @@ edition = "2024" [dependencies] tree-sitter = ">= 0.23.0" tree-sitter-embedded-template = "0.25.0" -tree-sitter-swift = "0.7.2" +tree-sitter-swift = { path = "tree-sitter-swift" } clap = { version = "4.5", features = ["derive"] } tracing = "0.1" tracing-subscriber = { version = "0.3.20", features = ["env-filter"] }