Skip to content

Commit 664d5ba

Browse files
committed
Swift: moved install to a separate package
When importing the workspace from semmle-code, we do not need nor want to instantiate `@util`, so that must be in a separate bazel package.
1 parent 95dbf2d commit 664d5ba

File tree

4 files changed

+13
-27
lines changed

4 files changed

+13
-27
lines changed

WORKSPACE.bazel

-13
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,6 @@ http_archive(
2727
],
2828
)
2929

30-
http_archive(
31-
name = "bazel_skylib",
32-
sha256 = "c6966ec828da198c5d9adbaa94c05e3a1c7f21bd012a0b29ba8ddbccb2c93b0d",
33-
urls = [
34-
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz",
35-
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.1.1/bazel-skylib-1.1.1.tar.gz",
36-
],
37-
)
38-
39-
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
40-
41-
bazel_skylib_workspace()
42-
4330
load("@ql//:defs.bzl", "ql_utils")
4431

4532
ql_utils(name = "utils")

swift/BUILD.bazel

-12
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
load("@rules_pkg//:mappings.bzl", "pkg_attributes", "pkg_filegroup", "pkg_files")
2-
load("@rules_pkg//:install.bzl", "pkg_install")
32
load("@ql//:defs.bzl", "codeql_platform")
4-
load("@bazel_skylib//rules:native_binary.bzl", "native_binary")
5-
load("@utils//:paths.bzl", "source_dir")
63

74
pkg_files(
85
name = "dbscheme",
@@ -55,12 +52,3 @@ pkg_filegroup(
5552
],
5653
visibility = ["//visibility:public"],
5754
)
58-
59-
pkg_install(
60-
name = "install",
61-
srcs = [":extractor-pack"],
62-
args = [
63-
"--destdir",
64-
source_dir() + "/extractor_pack",
65-
],
66-
)

swift/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ The Swift codeql package is an experimental and unsupported work in progress.
44

55
## Usage
66

7-
Run `bazel run //swift:install-extractor`, which will install `swift/extractor_pack`. Using `--search-path=swift` will
8-
then pick up the Swift extractor.
7+
Run `bazel run //swift/install`, which will install `swift/extractor_pack`. Using `--search-path=swift` will then pick
8+
up the Swift extractor.

swift/install/BUILD.bazel

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
load("@utils//:paths.bzl", "source_dir")
2+
load("@rules_pkg//:install.bzl", "pkg_install")
3+
4+
pkg_install(
5+
name = "install",
6+
srcs = ["//swift:extractor-pack"],
7+
args = [
8+
"--destdir",
9+
source_dir() + "/../extractor_pack",
10+
],
11+
)

0 commit comments

Comments
 (0)