summaryrefslogtreecommitdiff
path: root/bazel/BUILD.base64url
diff options
context:
space:
mode:
authorRin Kuryloski <kuryloskip@vmware.com>2023-01-25 09:41:56 +0100
committerGitHub <noreply@github.com>2023-01-25 09:41:56 +0100
commit2c7b37d7af8c7f5325fd9a40bda067fa710f9af9 (patch)
treea10983de10bc43f311540688dea2792c478ad4aa /bazel/BUILD.base64url
parent8e9f0f76273e36cff4422b850df091a9ce2e931f (diff)
downloadrabbitmq-server-git-2c7b37d7af8c7f5325fd9a40bda067fa710f9af9.tar.gz
Use gazelle for external erlang deps (#6935)
* Add gazelle for use with update-repos command * Use explicit BUILD.app_name files for erlang app deps This allows us to remove the duplicate definitions in workspace_helpers.bzl These files are generated with gazelle. For instance: BUILD.ra is generated with `bazel run gazelle -- update-repos --verbose --build_files_dir=bazel hex.pm/ra@2.4.6` Running gazelle this way will modify the WORKSPACE file, as gazelle does not yet support MODULE.bazel files. Such changes to the WORKSPACE can be dropped, and should not be committed. It may also update the `moduleindex.yaml` file. Changes to `moduleindex.yaml` should be committed. However * skip the explicit bazel/BUILD.osiris file, as osiris already contains the file in its repo * skip the explict BUILD.inet_tcp_proxy_dist file, since the repo already contains a bazel BUILD.bazel file gazelle command: `bazel run gazelle -- update-repos --verbose --build_files_dir=bazel inet_tcp_proxy_dist=github.com/rabbitmq/inet_tcp_proxy@master` * jose is imported with `bazel run gazelle -- update-repos --verbose --build_files_dir=bazel jose=github.com/michaelklishin/erlang-jose@d63c1c5c8f9c1a4f1438e234b886de8607a0034e` * Move the bats dep directly to WORKSPACE, drop workspace_helpers.bzl * Use bzlmod in windows tests
Diffstat (limited to 'bazel/BUILD.base64url')
-rw-r--r--bazel/BUILD.base64url94
1 files changed, 94 insertions, 0 deletions
diff --git a/bazel/BUILD.base64url b/bazel/BUILD.base64url
new file mode 100644
index 0000000000..1acbf6b4dd
--- /dev/null
+++ b/bazel/BUILD.base64url
@@ -0,0 +1,94 @@
+load("@rules_erlang//:erlang_bytecode2.bzl", "erlang_bytecode", "erlc_opts")
+load("@rules_erlang//:erlang_app.bzl", "erlang_app")
+
+erlc_opts(
+ name = "erlc_opts",
+ values = select({
+ "@rules_erlang//:debug_build": [
+ "+debug_info",
+ "+warn_format",
+ "+warn_export_vars",
+ "+warn_obsolete_guard",
+ "+warn_bif_clash",
+ ],
+ "//conditions:default": [
+ "+debug_info",
+ "+warn_format",
+ "+warn_export_vars",
+ "+warn_obsolete_guard",
+ "+warn_bif_clash",
+ "+deterministic",
+ ],
+ }),
+ visibility = [":__subpackages__"],
+)
+
+erlang_bytecode(
+ name = "ebin_base64url_beam",
+ srcs = ["src/base64url.erl"],
+ outs = ["ebin/base64url.beam"],
+ app_name = "base64url",
+ erlc_opts = "//:erlc_opts",
+)
+
+filegroup(
+ name = "beam_files",
+ srcs = ["ebin/base64url.beam"],
+)
+
+filegroup(
+ name = "srcs",
+ srcs = [
+ "src/base64url.app.src",
+ "src/base64url.erl",
+ ],
+)
+
+filegroup(
+ name = "private_hdrs",
+ srcs = [],
+)
+
+filegroup(
+ name = "public_hdrs",
+ srcs = [],
+)
+
+filegroup(
+ name = "priv",
+ srcs = [],
+)
+
+filegroup(
+ name = "licenses",
+ srcs = ["LICENSE.txt"],
+)
+
+filegroup(
+ name = "public_and_private_hdrs",
+ srcs = [
+ ":private_hdrs",
+ ":public_hdrs",
+ ],
+)
+
+filegroup(
+ name = "all_srcs",
+ srcs = [
+ ":public_and_private_hdrs",
+ ":srcs",
+ ],
+)
+
+erlang_app(
+ name = "erlang_app",
+ srcs = [":all_srcs"],
+ app_name = "base64url",
+ beam_files = [":beam_files"],
+)
+
+alias(
+ name = "base64url",
+ actual = ":erlang_app",
+ visibility = ["//visibility:public"],
+)