From e8677b46d531f839bdb0339fbfc1ef0a92af13f6 Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Tue, 19 Nov 2024 10:33:53 +0100 Subject: [PATCH] Bazel: rename shortcut to `install` --- .github/workflows/cpp-swift-analysis.yml | 2 +- misc/bazel/pkg.bzl | 6 +++--- rust/README.md | 2 +- swift/README.md | 2 +- swift/actions/build-and-test/action.yml | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cpp-swift-analysis.yml b/.github/workflows/cpp-swift-analysis.yml index ef38cb89393..3af9c3c5e4e 100644 --- a/.github/workflows/cpp-swift-analysis.yml +++ b/.github/workflows/cpp-swift-analysis.yml @@ -48,7 +48,7 @@ jobs: - name: "Build Swift extractor using Bazel" run: | bazel clean --expunge - bazel run //swift:installer --nouse_action_cache --noremote_accept_cached --noremote_upload_local_results --spawn_strategy=local + bazel run //swift:install --nouse_action_cache --noremote_accept_cached --noremote_upload_local_results --spawn_strategy=local bazel shutdown - name: Perform CodeQL Analysis diff --git a/misc/bazel/pkg.bzl b/misc/bazel/pkg.bzl index 10439360541..8b4fcbdbd86 100644 --- a/misc/bazel/pkg.bzl +++ b/misc/bazel/pkg.bzl @@ -451,7 +451,7 @@ def codeql_pack( This rule also provides a convenient installer target named `-installer`, with a path governed by `install_dest`. This installer is used for installing this pack into the source-tree, relative to the directory where the rule is used. See `codeql_pack_install` for more details. The first `codeql_pack` defined in a bazel package also aliases this - installer target with the `installer` name as a shortcut. + installer target with the `install` name as a shortcut. This function does not accept `visibility`, as packs are always public to make it easy to define pack groups. """ @@ -475,8 +475,8 @@ def codeql_pack( visibility = ["//visibility:public"], ) _codeql_pack_install(internal("installer"), [name], install_dest = install_dest, apply_pack_prefix = False) - if not native.existing_rule("installer"): - native.alias(name = "installer", actual = internal("installer")) + if not native.existing_rule("install"): + native.alias(name = "install", actual = internal("installer")) strip_prefix = _strip_prefix diff --git a/rust/README.md b/rust/README.md index 4be6372f266..2f9a7503abb 100644 --- a/rust/README.md +++ b/rust/README.md @@ -13,7 +13,7 @@ If you don't have the `semmle-code` repo you may need to install Bazel manually, This approach uses a released `codeql` version and is simpler to use for QL development. From your `semmle-code` directory run: ```bash -bazel run @codeql//rust:installer +bazel run @codeql//rust:install ``` You now need to create a [per-user CodeQL configuration file](https://docs.github.com/en/code-security/codeql-cli/using-the-advanced-functionality-of-the-codeql-cli/specifying-command-options-in-a-codeql-configuration-file#using-a-codeql-configuration-file) and specify the option: ``` diff --git a/swift/README.md b/swift/README.md index 79970d90d96..b5be374b5e7 100644 --- a/swift/README.md +++ b/swift/README.md @@ -13,7 +13,7 @@ brew install bazelisk then from the `ql` directory run ```bash -bazel run //swift:installer +bazel run //swift:install ``` If you are running on macOS and you encounter errors mentioning `XXX is unavailable: introduced in macOS YY.ZZ`, diff --git a/swift/actions/build-and-test/action.yml b/swift/actions/build-and-test/action.yml index 16a8e02a7a1..4048560640b 100644 --- a/swift/actions/build-and-test/action.yml +++ b/swift/actions/build-and-test/action.yml @@ -48,7 +48,7 @@ runs: - name: Build Swift extractor shell: bash run: | - bazel run //swift:installer + bazel run //swift:install - name: Run codegen tests if : ${{ github.event_name == 'pull_request' }} shell: bash