diff options
author | Philip Kuryloski <kuryloskip@vmware.com> | 2022-05-17 14:07:16 +0200 |
---|---|---|
committer | Philip Kuryloski <kuryloskip@vmware.com> | 2022-06-08 14:04:53 +0200 |
commit | 327f075d57d5184187e4bd9edba9ae9835d162c9 (patch) | |
tree | 839e90f7259ef43d64129c2b534050b762a90211 /deps/amqp10_common | |
parent | f0b0a4f90870d8d54190580094345484ca019532 (diff) | |
download | rabbitmq-server-git-327f075d57d5184187e4bd9edba9ae9835d162c9.tar.gz |
Make rabbitmq-server work with rules_erlang 3
Also rework elixir dependency handling, so we no longer rely on mix to
fetch the rabbitmq_cli deps
Also:
- Specify ra version with a commit rather than a branch
- Fixup compilation options for erlang 23
- Add missing ra reference in MODULE.bazel
- Add missing flag in oci.yaml
- Reduce bazel rbe jobs to try to save memory
- Use bazel built erlang for erlang git master tests
- Use the same cache for all the workflows but windows
- Avoid using `mix local.hex --force` in elixir rules
- Fetching seems blocked in CI, and this should reduce hex api usage in
all builds, which is always nice
- Remove xref and dialyze tags since rules_erlang 3 includes them in
the defaults
Diffstat (limited to 'deps/amqp10_common')
-rw-r--r-- | deps/amqp10_common/BUILD.bazel | 92 |
1 files changed, 26 insertions, 66 deletions
diff --git a/deps/amqp10_common/BUILD.bazel b/deps/amqp10_common/BUILD.bazel index 4a3cdeda1d..4fe84a7947 100644 --- a/deps/amqp10_common/BUILD.bazel +++ b/deps/amqp10_common/BUILD.bazel @@ -1,14 +1,9 @@ -load("@rules_erlang//:app_file.bzl", "app_file") -load("@rules_erlang//:erlang_app_info.bzl", "erlang_app_info") -load("@rules_erlang//:erlc.bzl", "erlc") load("@rules_erlang//:xref.bzl", "xref") load("@rules_erlang//:dialyze.bzl", "dialyze") load( "//:rabbitmq.bzl", - "APP_VERSION", - "RABBITMQ_ERLC_OPTS", - "RABBITMQ_TEST_ERLC_OPTS", "assert_suites", + "rabbitmq_app", "rabbitmq_suite", ) @@ -46,73 +41,38 @@ genrule( tools = [":codegen"], ) -app_file( - name = "app_file", - app_description = "Modules shared by rabbitmq-amqp1.0 and rabbitmq-amqp1.0-client", - app_extra = """%% Hex.pm package informations. - {licenses, ["MPL-2.0"]}, - {links, [ - {"Website", "https://www.rabbitmq.com/"}, - {"GitHub", "https://github.com/rabbitmq/rabbitmq-server/deps/amqp10_common"} - ]}, - {build_tools, ["make", "rebar3"]}, - {files, [ - "erlang.mk", - "git-revisions.txt", - "include", - "LICENSE*", - "Makefile", - "rabbitmq-components.mk", - "README", - "README.md", - "mk" - ]} -""", - app_name = "amqp10_common", - app_version = APP_VERSION, - modules = [":beam_files"], -) +APP_EXTRA_KEYS = """%% Hex.pm package informations. + {licenses, ["MPL-2.0"]}, + {links, [ + {"Website", "https://www.rabbitmq.com/"}, + {"GitHub", "https://github.com/rabbitmq/rabbitmq-server/deps/amqp10_common"} + ]}, + {build_tools, ["make", "rebar3"]}, + {files, [ + "erlang.mk", + "git-revisions.txt", + "include", + "LICENSE*", + "Makefile", + "rabbitmq-components.mk", + "README", + "README.md", + "mk" + ]} +""" -erlc( - name = "beam_files", - srcs = ["src/amqp10_framing0.erl"] + glob(["src/*.erl"]), - hdrs = ["include/amqp10_framing.hrl"] + glob(["include/*.hrl"]), - dest = "ebin", - erlc_opts = RABBITMQ_ERLC_OPTS, -) - -erlang_app_info( - name = "erlang_app", - hdrs = ["include/amqp10_framing.hrl"] + glob(["include/*.hrl"]), - app = ":app_file", - app_name = "amqp10_common", - beam = [":beam_files"], - visibility = ["//visibility:public"], -) - -erlc( - name = "test_beam_files", - srcs = ["src/amqp10_framing0.erl"] + glob(["src/*.erl"]), - hdrs = ["include/amqp10_framing.hrl"] + glob(["include/*.hrl"]), - dest = "test", - erlc_opts = RABBITMQ_TEST_ERLC_OPTS, -) - -erlang_app_info( - name = "test_erlang_app", - testonly = True, - hdrs = ["include/amqp10_framing.hrl"] + glob(["include/*.hrl"]), - app = ":app_file", +rabbitmq_app( + app_description = "Modules shared by rabbitmq-amqp1.0 and rabbitmq-amqp1.0-client", + app_extra_keys = APP_EXTRA_KEYS, app_name = "amqp10_common", - beam = [":test_beam_files"], - visibility = ["//visibility:public"], + extra_hdrs = ["include/amqp10_framing.hrl"], + extra_srcs = ["src/amqp10_framing0.erl"], ) -xref(tags = ["xref"]) +xref() dialyze( plt = "//:base_plt", - tags = ["dialyze"], ) suites = [ |