Commit Graph

83 Commits

Author SHA1 Message Date
Michal Kuratczyk fb3655610c
Update CSV to 3.0.5;; remove unused dep 2023-05-26 18:04:42 +02:00
Rin Kuryloski ad03e31543 Add bazel build info for syslog dep
This allows building `@syslog//:erlang_app` on windows
2023-05-23 17:15:28 +02:00
Michal Kuratczyk a9a96a4f4a
OTP master is OTP27 2023-05-22 09:15:30 +02:00
Rin Kuryloski eb94a58bc9 Add a workflow to compare the bazel/erlang.mk output
To catch any drift between the builds
2023-05-15 13:54:14 +02:00
Michael Klishin 316251a8d6
Merge pull request #8156 from rabbitmq/mk-gazelle-update-repos
bazel run gazelle-update-repos for Ra 2.6
2023-05-12 20:32:50 +04:00
Michael Klishin 0bf4d5168a bazel run gazelle-update-repos for Ra 2.6 2023-05-12 20:25:40 +04:00
Rin Kuryloski ea895a0023 Account for Elixir containing several core applications
- eex
- elixir
- ex_unit
- iex
- logger
- mix

So that apps (like rabbitmq_cli) can dialyze against the extra
components
2023-05-12 08:26:42 +02:00
Rin Kuryloski 19f4abd55b Build cli deps as .ez archives
This provides an elixir/erlang agnostic way of providing them other
erlang rules
2023-05-12 08:26:42 +02:00
Michael Klishin bbb98226e2
Merge pull request #8100 from rabbitmq/otp26-dialyzer 2023-05-04 19:05:23 +04:00
Michal Kuratczyk 48086bfec9
Bump credentials_obfuscation to 3.4.0 2023-05-04 15:31:01 +02:00
Rin Kuryloski facd663062 Regenerate BUILD.cowboy for cowboy 2.12.0
see e6e68fc
2023-05-02 17:07:34 +02:00
Michal Kuratczyk ad53bd9d5e
bazel run gazelle for emqtt
bazel run gazelle-update-repos -- -args --testonly github.com/rabbitmq/emqtt@otp-26-compatibility
2023-04-26 11:06:23 +02:00
Rin Kuryloski a7365d04ec
Adjust the platform definition for the erlang git master pipeline (#7964)
by using the more selective constraint value
2023-04-25 08:22:04 +02:00
Rin Kuryloski 8de8f59d47 Use gazelle generated bazel files
Bazel build files are now maintained primarily with `bazel run
gazelle`. This will analyze and merge changes into the build files as
necessitated by certain code changes (e.g. the introduction of new
modules).

In some cases there hints to gazelle in the build files, such as `#
gazelle:erlang...` or `# keep` comments. xref checks on plugins that
depend on the cli are a good example.
2023-04-17 18:13:18 +02:00
Rin Kuryloski 2bb0b42c85 Add OTP 26.0-rc3 config to bazel 2023-04-14 18:23:33 +02:00
Rin Kuryloski 12dea642ef Properly escape certain shell variables in bazel
In places where such files recently changed
2023-04-13 09:45:28 +02:00
Rin Kuryloski 12153ed823 Fetch github.com/hexpm/hex via bzlmod
This fixes a visibility issue when a bazel module depends on
rabbitmq-server
2023-04-13 09:45:28 +02:00
Rin Kuryloski f09b31e8c5
Fetch all cli deps with bazel (#7875)
* Fetch all prod cli deps with bazel

This avoids issues with hex and OTP 26, and is needed for offline
bazel builds anyway

* Fetch test cli deps with bazel

* mix format
2023-04-12 16:27:32 +04:00
Michael Klishin b26b371f21
Merge pull request #7821 from rabbitmq/lh-update-ct-helper
Update ct_helper
2023-04-04 21:52:46 +04:00
Michael Klishin 9164104acd Regenerate BUILD.cowlib using 'bazel run gazelle-update-repos -- -args hex.pm/cowlib@2.12.1' 2023-04-04 20:26:13 +04:00
Michael Klishin 488f9bfe5c
Bazel build: Cowlib does not have a .app.src 2023-04-04 19:45:55 +04:00
Loïc Hoguin 53c6d19434
Update ct_helper
Since ct_helper removes erl_make_certs some tests needed
to be updated to use public_key:pkix_test_data/1 instead.
2023-04-04 13:01:33 +02:00
Rin Kuryloski 89d0b39ae8 Use 3.11.11 for mixed version testing 2023-03-21 10:24:13 +01:00
Rin Kuryloski eba1d531c9 Fetch cli prod deps via bazel or erlang.mk instead of mix
In preparation for offline bazel builds
2023-03-14 23:11:36 +01:00
Karl Nilsson d7ffeb1b9f bazel updates 2023-03-09 18:54:20 +00:00
Rin Kuryloski 3ebfa257e2 Add OTP 25.3 to the build and CI matrix as otp-max 2023-03-08 15:21:27 +01:00
Rin Kuryloski 778ee998a6 Further annotate test deps with new rules_erlang 3.9.9 features 2023-02-28 16:47:02 +01:00
Rin Kuryloski 36a4b5b24a Adjust bazel/BUILD.emqtt
until https://github.com/rabbitmq/rules_erlang/pull/147 is released
2023-02-16 19:15:03 +01:00
Rin Kuryloski e7cddb0698 Turn off +warnings_as_errors in redbug dep 2023-02-16 17:54:54 +01:00
Rin Kuryloski 5cb434ff17 Rebuild bazel/BUILD.* files with recent rules_erlang
rules_erlang 3.9.5+ generates "compact" rules when running
update-repos

this speeds up the cold build, since fewer erlc actions are run, and
since external deps typically don't change incrementally, the value of
having a bazel rule per file is miminal
2023-02-16 17:43:49 +01:00
Rin Kuryloski b6e145cbb8 Remove extra erlc_opts from BUILD.eetcd
Should be unnecessary once
https://github.com/rabbitmq/rules_erlang/pull/140 is available in a
release
2023-02-15 15:46:11 +01:00
Rin Kuryloski 2dc0236101 Regenerate bazel/BUILD.eetcd with the latest rules_erlang
`bazel run gazelle -- update-repos --verbose --build_files_dir=bazel
hex.pm/eetcd@0.3.6`

Related to #7196
2023-02-15 15:35:51 +01:00
Rin Kuryloski 2c7b37d7af
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
2023-01-25 09:41:56 +01:00
Alexey Lebedeff 48f648259d Use bash from any directory in dev helpers
So it'll work e.g. on NixOS
2023-01-24 17:30:48 +01:00
Michael Klishin 0bfaa280a1
Secondary umbrella: bump to 3.11.7 2023-01-21 20:52:42 -06:00
Rin Kuryloski b84e746ee9 Rework plt/dialyze for rabbitmqctl and plugins that depend on it
This allows us to stop ignorning undefined callback warnings

When mix compiles rabbitmqctl, it produces a 'consolidated' directory
alongside the 'ebin' dir. Some of the modules in consolidated are
intended to be used instead of those provided by elixir. We now handle
the conflicts properly in the bazel build.
2023-01-19 17:29:23 +01:00
Rin Kuryloski 2cd020a0da rules_erlang 3.9.0 compatibility
the elixir toolchain uses some private apis, and needed updating to
match internal changes in rules_erlang
2023-01-17 17:08:09 +01:00
Rin Kuryloski 3db02f7f9f Update `//:test-logs` and `//:test-node-data`
to handle the new ct_logdir flag
2022-12-19 13:49:07 +01:00
Michal Kuratczyk d78b8b3a2a
Adopt OTP 25.2 2022-12-15 11:08:21 +01:00
Rin Kuryloski 136d1cd7a3 Use 3.11.4 for mixed version testing 2022-12-09 12:33:51 +01:00
David Ansari 1f6ead8055 Make main branch use 3.11.2 as mixed version tests
The 3.11.2 artifact already got uploaded to AWS.
2022-10-19 10:56:22 +02:00
Rin Kuryloski 16300cc4ba Adopt rules_erlang 3.8.3
and apply corresponding changes to the elixir build
2022-10-18 15:57:51 +02:00
Rin Kuryloski 18bccf5873 Remove erlang 23 from bazel build 2022-10-10 09:30:29 +02:00
Rin Kuryloski c494c7f1ec Use Elixir 1.13.x with otp 24.x in bazel build 2022-10-04 11:42:29 +02:00
Rin Kuryloski 25c0eae13f Add erlang 25.1 to github actions 2022-09-30 09:21:56 +02:00
Rin Kuryloski a735672787 Enhance inference of ELIXIR_HOME from the path of iex/elixir 2022-09-29 12:28:30 +02:00
Rin Kuryloski ad043228f2 Fixup config drift causing the Windows Actions to fail 2022-09-29 11:54:06 +02:00
Rin Kuryloski 502730b32d Apply the @erlang_config pattern for elixir via the WORKSPACE
and use rules_erlang 3.7.0
2022-09-28 16:09:18 +02:00
Rin Kuryloski 6d35adc740 Fixup platform references for erlang git master nightly tests 2022-09-28 10:49:31 +02:00
Rin Kuryloski bf66d4f858
Filter out elixir compilation from local execution in bazel (#5869) 2022-09-24 20:22:39 +04:00