Skip to content

Releases: rabbitmq/rules_erlang

rules_erlang 2.5.2

26 Apr 13:04

Choose a tag to compare

Fixes an incompatibility with bzlmod introduced in 2.5.0 (bazelbuild/bazel-central-registry#79)

Full Changelog: 2.5.1...2.5.2

rules_erlang 2.5.1

08 Apr 15:24
1c82dc0

Choose a tag to compare

What's Changed

  • Properly quote erlc_opts when passed to erlc in the erlc rule by @pjk25 in #38

Full Changelog: 2.5.0...2.5.1

rules_erlang 2.5.0

08 Apr 10:35
a31781e

Choose a tag to compare

What's Changed

  • Various enhancements by @pjk25 in #33
    • Add the erlang_package module extension which allows for similar but
      substantially improved functionality from our hex_pm_erlang_app and
      github_erlang_app workspace macros
      • erlang_package.hex behaves like hex_pm_erlang_app, but can better infer package properties
      • erlang_package.hex_tree with fetch the package and it's dependencies from hex.pm, performing a certain amount of dependency resolution
      • erlang_package.git behaves like github_erlang_app, but can better infer package properties and is not strictly limited to github
    • Automatically compile behaviours and parse transforms first in the
      erlc macro, so that first_srcs are usually no longer necessary in the
      erlang_app macro
    • Generate/Update .app files with erlang, rather than simple string substitutions, making things like updating of {modules, ...} work correctly regardless of whitespace. Additionally, this allows values on the erlang_app macro, like app_description to be injected overtop of whatever is in src/*.app.src, if the file is present. Previously in this case app_description would have been silently ignored.
    • Allow stamping of .app files with a version
    • erlc no longer assumes that dependencies sit in
      directories named after their erlang app name (as is no longer the
      case when using bzlmod). Additionally, the :test_erlang_app now
      includes private headers.This way test sources, like _SUITE.erl files,
      can include_lib them. This wasn't necessary given prior assumptions,
      but seems a reasonable way to keep everything working.
  • Add an internal rule for creating escripts by @pjk25 in #34
  • Handle PROJECT_APP_EXTRA_KEYS when auto-importing erlang.mk apps by @pjk25 in #36

Full Changelog: 2.4.0...2.5.0

rules_erlang 2.4.0

29 Mar 13:42

Choose a tag to compare

What's Changed

  • Improve the way that include paths are computed in erlc rule by @pjk25 in #28
  • Add the helper function without(item, elements) to util.bzl by @pjk25 in #29
  • Remove -Wrace_conditions from the default dialyzer options by @pjk25 in #31
  • Fix the handling of the xrefr dependency when used with bzlmod

Full Changelog: 2.3.0...2.4.0

rules_erlang 2.3.0

07 Mar 10:00

Choose a tag to compare

What's Changed

  • Allow the shell rule to pass through arguments by @pjk25 in #26

Full Changelog: 2.2.1...2.3.0

rules_erlang 2.2.1

24 Feb 10:11
b7c9cad

Choose a tag to compare

What's Changed

  • The dialyze rule now only analyzes the target and not its deps by @pjk25 in #24

Full Changelog: 2.2.0...2.2.1

rules_erlang 2.2.0

22 Feb 08:38
ab6ce22

Choose a tag to compare

What's Changed

  • No longer ignore dialyzer warnings in dialyze/dialyze_test by @pjk25 in #23

Full Changelog: 2.1.0...2.2.0

rules_erlang 2.1.0

01 Feb 12:00
b8ea348

Choose a tag to compare

What's Changed

  • Use subst as a workaround for long paths in tests by @pjk25 in #22

Full Changelog: 2.0.1...2.1.0

rules_erlang 2.0.1

24 Jan 11:30

Choose a tag to compare

Bugfixes

  • Fixes ct_suite sharding under windows

Full Changelog: 2.0.0...2.0.1

rules_erlang 2.0.0

19 Jan 09:17
61a964c

Choose a tag to compare

rules_erlang 2.0.0 is a substantial refactoring of bazel-erlang 1.x

Many names have changed, though since it works in mostly the same ways, upgrading should not be too difficult a task.

New Features

  • Support for Windows

Bugfixes

  • xref would not actually check the correct files if the rule was applied to the top level of a workspace (See #21)

Changes

  • bazel_erlang_lib has been renamed to erlang_app
  • test_bazel_erlang_lib has been renamed to test_erlang_app
  • the nominal label created by the erlang_app macro is :erlang_app, instead of :bazel_erlang_lib
  • bazel_erlang_deps() has been renamed to rules_erlang_dependencies()
  • github_bazel_erlang_lib has been renamed to github_erlang_app
  • hex_pm_bazel_erlang_lib has been renamed to hex_pm_erlang_app
  • the ct_suite macro from ct.bzl no longer supports the matrix argument (it was introduced early on, and ct_suite_variant is intended to replace it)
  • erlc_opts are no longer deduplicated #16

Notes: Upgrading from bazel-erlang 1.x

  1. Replace *:bazel_erlang_lib labels with *:erlang_app
  2. Replace load("@bazel-erlang//:bazel_erlang_lib.bzl", "erlang_lib", "test_erlang_lib") calls to bazel_erlang_lib and test_bazel_erlang_lib with load("@rules_erlang//:erlang_app.bzl", "erlang_app", "test_erlang_app"), erlang_app and test_erlang_app, respectively.
  3. Replace load(":bazel_erlang.bzl", "bazel_erlang_deps") and bazel_erlang_deps() with load(":rules_erlang.bzl", "rules_erlang_dependencies") and rules_erlang_dependencies()
  4. Reference this package as @rules_erlang instead of @bazel-erlang, adjusting load statements appropriately (i.e. load("@bazel-erlang//:xref.bzl", "xref") -> load("@rules_erlang//:xref.bzl", "xref"). Adjust your .bazelrc files as well.

Notes: Windows

See https://docs.bazel.build/versions/main/windows.html

Additionally, we have tested these rules using symlink support (see https://docs.bazel.build/versions/main/windows.html#enable-symlink-support). Test rules probably do not work without symlink support.

Full Changelog: 1.4.0...2.0.0