Commit Graph

4 Commits

Author SHA1 Message Date
Rin Kuryloski fbf896c05c Remove +warnings_as_errors from the jose compilation options
Why?
1. Generally +warnings_as_errors is unnecessary for deps anyway
2. The gazelle plugin in rules_erlang, for the sake of simplicity,
splits compilation of a given application into at most 3 phases,
parse_transforms, behaviours & everything else. Therefore, if there
are behaviours that are behaviours, this produces warnings. It's
certainly possible to write an extra phase into BUILD.jose so that the
warning does not occur, but in this case it's much simpler to just to
allow the warning. Futhermore, this should not be an issue with
rules_erlang 4, as it is not limited to the finite number of
compilation phases, nor does it even have a gazelle plugin.
2024-06-04 16:13:06 +02:00
Michal Kuratczyk ad06ad2552
bazel run gazelle-update-repos -- hex.pm/jose@1.11.10 2024-06-03 08:51:39 +02: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 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