From 85823c6be77ee1416597b3e9cda633915f6a728b Mon Sep 17 00:00:00 2001 From: Rin Kuryloski Date: Wed, 20 Mar 2024 12:16:28 +0100 Subject: [PATCH 1/2] Use rules_erlang 3.15.0 (cherry picked from commit 7a54b4637918af506acd1b9f62fe93b61c82ebd9) (cherry picked from commit 38bf5083bdec080d2a6ac774c6260bd023327e7e) (cherry picked from commit d531418a646a6c34b3f97957ecb77165a397fac6) # Conflicts: # MODULE.bazel --- MODULE.bazel | 26 +++++++++++++++++++++++++- WORKSPACE | 2 +- bazel/elixir/elixir_toolchain.bzl | 12 ++++++++---- 3 files changed, 34 insertions(+), 6 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index a35e22e0bd35..c8eee5a78d5a 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -41,7 +41,7 @@ bazel_dep( bazel_dep( name = "rules_erlang", - version = "3.14.0", + version = "3.15.0", ) bazel_dep( @@ -78,43 +78,67 @@ erlang_config.internal_erlang_from_github_release( name = "24", sha256 = "8444ff9abe23aea268adbb95463561fc222c965052d35d7c950b17be01c3ad82", version = "24.3.4.6", + extra_make_opts = ["-j 4"], ) erlang_config.internal_erlang_from_github_release( name = "25_0", sha256 = "8fc707f92a124b2aeb0f65dcf9ac8e27b2a305e7bcc4cc1b2fdf770eec0165bf", version = "25.0.4", + extra_make_opts = ["-j 4"], ) erlang_config.internal_erlang_from_github_release( name = "25_1", sha256 = "1cd2fbe225a412009cda9b1fd9f3fff0293e75e3020daa48abf68721471e91eb", version = "25.1.2.1", + extra_make_opts = ["-j 4"], ) erlang_config.internal_erlang_from_github_release( name = "25_2", sha256 = "f4d9f11d67ba478a053d72e635a44722a975603fe1284063fdf38276366bc61c", version = "25.2.3", + extra_make_opts = ["-j 4"], ) erlang_config.internal_erlang_from_github_release( name = "25_3", sha256 = "0a7338415c8eb6ae25664bfd1a10631c293838ef072665223a524831b823a8b7", version = "25.3.2.10", + extra_make_opts = ["-j 4"], ) erlang_config.internal_erlang_from_github_release( +<<<<<<< HEAD name = "26", sha256 = "47853ea9230643a0a31004433f07a71c1b92d6e0094534f629e3b75dbc62f193", version = "26.0.2", +======= + name = "26_1", + sha256 = "f1074cf3a54f1f87e66027d5abebab2fa76a0243453fa58bc5f30d0ce0313921", + version = "26.1.2", + extra_make_opts = ["-j 4"], +) + +erlang_config.internal_erlang_from_github_release( + name = "26_2", + sha256 = "d537ff4ac5d8c1cb507aedaf7198fc1f155ea8aa65a8d83edb35c2802763cc28", + version = "26.2.2", + extra_make_opts = ["-j 4"], +>>>>>>> d531418a64 (Use rules_erlang 3.15.0) ) erlang_config.internal_erlang_from_http_archive( name = "git_master", strip_prefix = "otp-master", url = "https://github.com/erlang/otp/archive/refs/heads/master.tar.gz", +<<<<<<< HEAD version = "master", +======= + version = "27", + extra_make_opts = ["-j 4"], +>>>>>>> d531418a64 (Use rules_erlang 3.15.0) ) use_repo( diff --git a/WORKSPACE b/WORKSPACE index 16b9b4583d61..2df8d450d0ed 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -19,7 +19,7 @@ rules_pkg_dependencies() git_repository( name = "rules_erlang", remote = "https://github.com/rabbitmq/rules_erlang.git", - tag = "3.13.1", + tag = "3.15.0", ) load("@rules_erlang//:internal_deps.bzl", "rules_erlang_internal_deps") diff --git a/bazel/elixir/elixir_toolchain.bzl b/bazel/elixir/elixir_toolchain.bzl index e96e56c5f78b..54aff63f08f6 100644 --- a/bazel/elixir/elixir_toolchain.bzl +++ b/bazel/elixir/elixir_toolchain.bzl @@ -56,9 +56,13 @@ def maybe_install_erlang(ctx, short_path = False): return "" else: return """\ -tar --extract \\ - --directory / \\ - --file {release_tar}""".format( +mkdir -p $(dirname "{install_path}") +if mkdir "{install_path}"; then + tar --extract \\ + --directory "{install_path}" \\ + --file {release_tar} +fi\ +""".format( release_tar = release_dir_tar.short_path if short_path else release_dir_tar.path, - erlang_home = info.erlang_home, + install_path = info.install_path, ) From 196d855fdf57588ec477f7d694e415d77bd1ceac Mon Sep 17 00:00:00 2001 From: Rin Kuryloski Date: Thu, 2 May 2024 07:29:33 +0200 Subject: [PATCH 2/2] fixup backport --- MODULE.bazel | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index c8eee5a78d5a..fe025116b8ff 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -110,35 +110,18 @@ erlang_config.internal_erlang_from_github_release( ) erlang_config.internal_erlang_from_github_release( -<<<<<<< HEAD name = "26", sha256 = "47853ea9230643a0a31004433f07a71c1b92d6e0094534f629e3b75dbc62f193", version = "26.0.2", -======= - name = "26_1", - sha256 = "f1074cf3a54f1f87e66027d5abebab2fa76a0243453fa58bc5f30d0ce0313921", - version = "26.1.2", extra_make_opts = ["-j 4"], ) -erlang_config.internal_erlang_from_github_release( - name = "26_2", - sha256 = "d537ff4ac5d8c1cb507aedaf7198fc1f155ea8aa65a8d83edb35c2802763cc28", - version = "26.2.2", - extra_make_opts = ["-j 4"], ->>>>>>> d531418a64 (Use rules_erlang 3.15.0) -) - erlang_config.internal_erlang_from_http_archive( name = "git_master", strip_prefix = "otp-master", url = "https://github.com/erlang/otp/archive/refs/heads/master.tar.gz", -<<<<<<< HEAD - version = "master", -======= version = "27", extra_make_opts = ["-j 4"], ->>>>>>> d531418a64 (Use rules_erlang 3.15.0) ) use_repo(