Commit Graph

14 Commits

Author SHA1 Message Date
Rin Kuryloski fc5f22b205 Clean up moduleindex.yaml by regenerating it 2024-02-20 11:11:33 +01:00
Rin Kuryloski 78affa1df9 Update bazel docs 2023-09-13 15:22:52 +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
Alexey Lebedeff 1868c6176e Allow picking ports for `bazel run broker`
This way multiple brokers can be run at the same time. Before that the
only option was to use `bazel run start-cluster`, but it's not
granular enough to run rabbits from different checkouts or with
different configs.
2023-03-09 18:02:40 +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 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
Michael Klishin 7787fe2780
Revert "Update Bazel rules repository name"
This reverts commit 371b44dcf2.
2022-01-05 19:06:37 +03:00
Michael Klishin 371b44dcf2
Update Bazel rules repository name 2022-01-05 18:58:02 +03:00
Philip Kuryloski 8c0eece3cd Adjustments for the latest bazel-erlang 2021-11-02 16:24:26 +01:00
Philip Kuryloski d4e817aa27 Add some notes about additional bazel flags to BAZEL.md 2021-10-26 17:09:21 +02:00
Philip Kuryloski 3d7afcdc18 Update the Bazel guide, BAZEL.md 2021-09-13 13:14:31 +02:00
Philip Kuryloski 3eac3cf8a8 Remove unused load statements from bazel files 2021-07-12 12:10:26 +02:00
Philip Kuryloski 0bea8efb23 Suggest --incompatible_strict_action_env in Bazel readme
The flag implies a slightly more consistent env for bazel actions,
which while not supported by all bazel libs, can increase cache hit
percentage in those that do. rabbitmq-server builds fine with the flag
enabled, as we don't depend on any such incompatible libraries
2021-06-21 09:52:42 +02:00
Philip Kuryloski 388654c542
Add a partial Bazel build (#2938)
Adds WORKSPACE.bazel, BUILD.bazel & *.bzl files for partial build & test with Bazel. Introduces a build-time dependency on https://github.com/rabbitmq/bazel-erlang
2021-03-29 11:01:43 +02:00