Rename the sha256 attributes (and matching canonical_ids) to a single
scheme across all platforms: <os>_x64 / <os>_arm64. This replaces the
inconsistent sha256_linux (no suffix), sha256_macos_intel and
sha256_macos_arm.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c6404a7a-35d7-4294-b3b6-9231ca15ef25
repository_ctx.os.arch reports the lower-cased Java os.arch property,
which is "aarch64" on Linux arm64 — same as the macOS branch below.
Drop the redundant "arm64" alternative.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c6404a7a-35d7-4294-b3b6-9231ca15ef25
The `ripunzip_archive` repository rule downloaded a prebuilt ripunzip for
the host platform, but the Linux branch was hardcoded to the amd64 deb,
so on an arm64 Linux host it would fetch an x86 binary. Switch on
`repository_ctx.os.arch` (mirroring the macOS branch) to select the
arm64 deb, which ripunzip publishes for the pinned version.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c6404a7a-35d7-4294-b3b6-9231ca15ef25
When `codeql_platform_select` builds its `select` from a macro invoked in
another workspace (e.g. semmle-code consuming this repo as `@codeql`), a bare
`//misc/bazel:linux_arm64` string key resolves against the consuming repo and
fails with "no such package 'misc/bazel'". Use `Label(...)`, which resolves
relative to this file's own repo, so the key always binds to
`@codeql//misc/bazel:linux_arm64` regardless of the calling workspace.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c5c5b0bf-4afa-468c-b2dd-197d80932b4b
`posix` sets the shared value for both `linux` and `macos`. It is mutually
exclusive with either of them and fails if supplied together with `linux`
or `macos`.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c5c5b0bf-4afa-468c-b2dd-197d80932b4b
- codeql_pack docstring: include `linux-arm64` in the exhaustive list of
values the `{CODEQL_PLATFORM}` placeholder expands to (both mentions).
- codeql_platform_select: only fall back to `otherwise` on `None`, not on
any falsey value, via a small `_or_otherwise` helper, matching the
documented `None` defaults.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c5c5b0bf-4afa-468c-b2dd-197d80932b4b
CODEQL_PLATFORM is OS-only today (linux->linux64, macos->osx64,
windows->win64). ELF has no fat-binary equivalent, so Linux arm64 needs
its own string. Add `linux-arm64` for os:linux AND cpu:arm64 while
keeping every existing string byte-identical.
- Add a public `//misc/bazel:linux_arm64` config_setting (os:linux +
cpu:arm64).
- Turn `os_select` into `codeql_platform_select`, a full selector over
the four CodeQL platforms (`linux64`, `linux_arm64`, `osx64`, `win64`,
plus `otherwise`), working in both macro (select) and rule
(target_platform_has_constraint) contexts. There is deliberately no
fallback between the two Linux slots.
- Re-express `os_select` as a thin OS-only wrapper around it (Linux maps
to both `linux64` and `linux_arm64`), so its existing swift/xcode
callers keep working unchanged.
- Add an `_arm64_constraint` entry to OS_DETECTION_ATTRS.
- Drive the platform string from `codeql_platform_select` in pkg.bzl's
`_detect_platform` and defs.bzl's `codeql_platform`.
macOS keeps osx64 for both arch slices (universal binary): the
linux_arm64 key requires both constraints, so the OS discriminator
dominates. The new branch is dormant on existing CI (no job builds
linux-on-arm64), so all current configs produce byte-identical outputs.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c5c5b0bf-4afa-468c-b2dd-197d80932b4b
Pure deletion of the generated `BUILD.<crate>.bazel` files for the
crates the previous commit removed from `defs.bzl` and `MODULE.bazel` —
`cc`, `tree-sitter-generate`, `tree-sitter-language` and their
transitive closure (bindgen, clang-sys, phf, rquickjs, …). Nothing
instantiates the corresponding repositories any more, so the files are
dead.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Dropping the tree-sitter-swift crate removed the last consumer of the
tree-sitter grammar-generation dependencies, but the vendored Bazel deps
still listed them, so `defs.bzl` disagreed with the Cargo manifests:
`unified/extractor` was still given `tree-sitter` and
`tree-sitter-embedded-template`, and
`unified/extractor/tree-sitter-swift` remained as a package entry.
Regenerated with
`misc/bazel/3rdparty/update_tree_sitter_extractors_deps.sh`,
which drops `cc`, `tree-sitter-generate` and `tree-sitter-language`
along with their transitive closure. `tree-sitter` itself stays, as the
Ruby and QL extractors still use it.
This commit carries the regenerated `defs.bzl` and `MODULE.bazel`; the
vendored BUILD files for the dropped crates are deleted in the following
commit.
This was drift rather than breakage — the extra entries were simply
unused, so the build worked either way.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Registers the `unified/swift-syntax-rs` workspace member (added in
"unified:
Add swift-syntax-rs") in the tree-sitter extractors crate universe. It
has no
external Rust dependencies, so its dependency entries are empty.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
For type checking rules, we need to be able to load schemas (so we know
what to check against). However, since we can't have yeast-macros
depending on yeast (where the schema-handling code currently lives) as
this would introduce a circular dependency, we instead split the
schema-related code into its own yeast-schema crate.
Add BUILD.bazel files for the yeast and yeast-macros crates, register
them as dependencies of the shared tree-sitter extractor, and refresh
the vendored crate dependencies via update_tree_sitter_extractors_deps.sh.