Repository navigation
Description
Blocked on: bazelverse/rules_erlang#12, bazelverse/rules_erlang#14, bazelverse/rules_erlang#16 and bazelverse/rules_erlang#18 (all open). Nothing to change in-repo until one merges; then drop its hunks in a pin bump.
Problem
patches/rules_erlang/hermetic_otp.patch is applied to the pinned bazelverse/rules_erlang (RULES_ERLANG_COMMIT = 13977b3..., equal to upstream main today) by the repository rule in erlang/toolchain/repos.bzl:305. It mixes four unrelated changes. The fork's issues are disabled, so the only upstream channel is pull requests (maintainer: Marvin Hansen). One big patch is hard to review, and rules_dx must re-diff it at every pin bump. Split it into separate, tested PRs. Whatever does not land stays in the rules_dx patch, smaller.
The patch does not reach consumers directly: rules_dx applies it inside its own repo rule, so this is not part of #2283's consumer bug. It is listed there because it is the same patch directory.
Where
patches/rules_erlang/hermetic_otp.patch,patches/rules_erlang/BUILD.bazelerlang/toolchain/pins.bzl(RULES_ERLANG_COMMIT,RULES_ERLANG_SHA256,RULES_ERLANG_URL),erlang/toolchain/repos.bzl:169,305(patch application)erlang/toolchain/otp.bzl:5-20:dx_otpreturnsOtpInfo(..., tree = tree)anderlang_home = "${DX_ERLANG_HOME}";erlang/rules/defs.bzl:65setsDX_ERLANG_HOME- Upstream files (bazelverse/rules_erlang main):
private/erlang_xrl_yrl.bzl:36-40,erlang_app.bzl:50-190,ct.bzl:35-60,private/ct.bzl:190-218and:282-299(twoct_runblocks),private/erlang_build.bzl:17-34(OtpInfo),tools/erlang_toolchain.bzl:38-75; CI in.github/workflows/test.yaml(bazelisk test //...with OTP 28.5 and 29.0)
Fix
Four PRs, each from a fresh branch on upstream main, each with its own test. They are independent except PR 4, which does not need the others. Order them by risk, smallest first.
xrl_yrlinstalls Erlang:private/erlang_xrl_yrl.bzlalready passesmaybe_install_erlang = ...toformat()but the script template has no{maybe_install_erlang}line, so a release-tar erlang is never unpacked forerlang_xrl_yrl. Add the line (aserlang_bytecode2.bzl:83does). Test: a.xrlor.yrltarget built against a toolchain withrelease_dir_tarset, or at least that the generated script contains the unpack step; use what the repo'stest/can do without a network.- Forward
target_compatible_withandtags: inerlang_app.bzladd the two arguments toerlang_app()and pass them to each generated target (erlang_bytecode,app_file, the appup rule,erlang_app_info); inct.bzlforwardtarget_compatible_withinct_suite. DefaultsNone, so nothing changes. Test: a target withtarget_compatible_with = ["@platforms//:incompatible"]is skipped bybazel build //..., andtagsshow up inbazel query --output=build. - CT without
-hidden -sname, as an opt-in: add act_testattribute (for exampledistributed = Trueby default, so current behavior stays) that, whenFalse, omits-hidden -sname <name>from bothct_runblocks inprivate/ct.bzl. Reason to give upstream: nodes need epmd and a free name, which fails in sandboxes without a loopback. Test: the generated test script contains-snameby default and not with the opt-out. - Relocatable OTP
treeas a documented provider field: addtreetoOtpInfoinprivate/erlang_build.bzlwith a doc string ("optional depset of every file of a relocatable in-tree Erlang; its root holdsversion_file").tools/erlang_toolchain.bzl:erlang_dirsusestreefor runfiles when set;maybe_install_erlangexports the home derived from theversion_filelocation instead of unpacking. Do not hard-code aDX_*variable name upstream. Pick a neutral name (for exampleERLANG_HOME), then changeerlang/toolchain/otp.bzlanderlang/rules/defs.bzl:65in rules_dx to match. Existing built-from-source and external toolchains must be unchanged (treedefaults to absent: usegetattror give the field a default through the provider constructor). Test: anOtpInfofixture withtreeset and a rule that runserlc --versionfrom the derived home. - For each PR: run
bazelisk test //...in the upstream clone and include the result. Draft the PR title and body (problem, change, test). No issue text is needed because issues are disabled. - After each PR lands and a pin that contains it is chosen: bump
pins.bzl(commit, sha256, url), regeneratehermetic_otp.patchwithout the landed hunks (git apply --checkagainst the new pin), and run the Erlang tests (erlang/tests). When all four land, delete the patch andpatches/rules_erlang/.
Upstream rules (read first)
- Do not open, edit or comment on any upstream issue or PR, and do not push to any upstream fork. The maintainer submits everything personally.
- Your output is ready-to-submit material, posted as one comment on this issue: the diff against upstream main (
git format-patchor a fenced diff), the test output from the upstream repo, and the drafted upstream issue and PR text. - Work in a fresh clone of the upstream repo at its current main. Re-check that no equivalent change or open PR exists before drafting.
- Write the upstream text in plain, short sentences. State the problem, the change and how it was tested. Do not paste rules_dx internals.
- The upstream fork has no issue tracker. Do not message the maintainer either.
Done when
- A comment on this issue holds, per PR: the diff against upstream main, the passing
bazelisk test //...output from the upstream clone, and the PR text. Four PRs, or a note saying why one was dropped. - Each diff applies cleanly to upstream main (
git apply --check) and, together, they cover every hunk ofhermetic_otp.patchexcept those the comment says stay in rules_dx. - No upstream PR was opened.
- After the PRs land: the rules_dx patch holds only what did not land, or is gone.
Related
#2283. rules_elixir split issue (its tree PR depends on PR 4 here).
Activity
TrapsterDK commentedon Oct 27, 2026
Upstream PR material for bazelverse/rules_erlang
There are four independent PRs, each one commit on upstream
main. Nothing was opened, pushed or commented upstream.Setup
bazelverse/rules_erlangat13977b3. This isRULES_ERLANG_COMMITand still upstreammain.gh pr list --state allshows only dependabot and release PRs, so no equivalent change exists..bazelversion).ERLANG_HOMEexported and onPATHas the CI does. OTP 28.5 was not run locally.~/.bazelrcwas skipped (--nohome_rc), so nothing ran remotely.main: root//...3/3 pass,test///...15/15 pass.Note
In
test/, the internal OTP toolchain only matches theerlang_internalexec constraint, so the defaulttest/run uses the external erl. The release-tar and tree code paths are therefore tested with small fakeOtpInfotoolchains in root analysis tests. Those tests need no network and no OTP build.Order
PR 1, 2, 3, 4 (smallest first). Each applies alone to
main(git apply --check), and all four apply together withgit amin that order.PR 1:
fix(erlang_xrl_yrl): install a release-tar erlang before running erlcPR text
Title: fix(erlang_xrl_yrl): install a release-tar erlang before running erlc
Problem
erlang_xrl_yrlpassesmaybe_install_erlangtoformat(), but its script template has no{maybe_install_erlang}line. With a toolchain that ships erlang as a release tar, the tar is never unpacked for this action. erlc then works only if another action already unpacked it under the install path.Change
Add the placeholder to the script, as
erlang_bytecode2does. One line.Test
private/xrl_yrl_test: analysis tests with a fake release-tar toolchain. They check that the ERLC action for a.xrland a.yrltarget runstar --extractand has the tar as an input. Both fail on main and pass with the fix.test/xrl_yrl: builds a.xrland a.yrlwith the default toolchain and checks the generated modules.bazelisk test //... output (root, then test/)
(cached)means the same tree had passed earlier in that output base.git format-patch against main (pr1-xrl-yrl-install)
From 21c76e2b9ea1aac0ee91cce5da4f847b2a4f4d0b Mon Sep 17 00:00:00 2001 From: Martin Kuntz Jacobsen <martin.kuntz.jacobsen@gmail.com> Date: Tue, 27 Oct 2026 15:23:35 +0100 Subject: [PATCH] fix(erlang_xrl_yrl): install a release-tar erlang before running erlc The ERLC action of erlang_xrl_yrl formats maybe_install_erlang into its script, but the template had no {maybe_install_erlang} placeholder. With a toolchain that ships erlang as a release tar, the tar was never unpacked, so erlc only worked if another action had unpacked it first. Add the placeholder, as erlang_bytecode2 does. Add analysis tests that check the ERLC action unpacks the release tar, and a test/ package that builds a .xrl and a .yrl. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011u9TXHDZrfmzFQ2WT8QAKK --- private/erlang_xrl_yrl.bzl | 1 + private/xrl_yrl_test/BUILD.bazel | 38 +++++++++++++++ private/xrl_yrl_test/fake_otp_version | 1 + private/xrl_yrl_test/fake_release.tar | 1 + private/xrl_yrl_test/lexer.xrl | 10 ++++ private/xrl_yrl_test/parser.yrl | 8 ++++ private/xrl_yrl_test/xrl_yrl_test.bzl | 67 +++++++++++++++++++++++++++ test/xrl_yrl/BUILD.bazel | 32 +++++++++++++ test/xrl_yrl/lexer.xrl | 10 ++++ test/xrl_yrl/parser.yrl | 8 ++++ test/xrl_yrl/xrl_yrl_test.sh | 5 ++ 11 files changed, 181 insertions(+) create mode 100644 private/xrl_yrl_test/BUILD.bazel create mode 100644 private/xrl_yrl_test/fake_otp_version create mode 100644 private/xrl_yrl_test/fake_release.tar create mode 100644 private/xrl_yrl_test/lexer.xrl create mode 100644 private/xrl_yrl_test/parser.yrl create mode 100644 private/xrl_yrl_test/xrl_yrl_test.bzl create mode 100644 test/xrl_yrl/BUILD.bazel create mode 100644 test/xrl_yrl/lexer.xrl create mode 100644 test/xrl_yrl/parser.yrl create mode 100755 test/xrl_yrl/xrl_yrl_test.sh diff --git a/private/erlang_xrl_yrl.bzl b/private/erlang_xrl_yrl.bzl index ce0603d..429f0e8 100644 --- a/private/erlang_xrl_yrl.bzl +++ b/private/erlang_xrl_yrl.bzl @@ -35,6 +35,7 @@ def _impl(ctx): script = """set -euo pipefail +{maybe_install_erlang} mkdir -p {out_dir} diff --git a/private/xrl_yrl_test/BUILD.bazel b/private/xrl_yrl_test/BUILD.bazel new file mode 100644 index 0000000..0da7984 --- /dev/null +++ b/private/xrl_yrl_test/BUILD.bazel @@ -0,0 +1,38 @@ +load("//:erlang_xrl_yrl.bzl", "erlang_xrl_yrl") +load("//tools:erlang_toolchain.bzl", "erlang_toolchain") +load(":xrl_yrl_test.bzl", "fake_release_otp", "xrl_yrl_test_suite") + +# An erlang that ships as a release tar. Nothing here runs: the tests +# only inspect the ERLC action of erlang_xrl_yrl. +fake_release_otp( + name = "fake_otp", + release_dir_tar = "fake_release.tar", + version_file = "fake_otp_version", +) + +erlang_toolchain( + name = "fake_erlang", + otp = ":fake_otp", +) + +toolchain( + name = "fake_toolchain", + toolchain = ":fake_erlang", + toolchain_type = "//tools:toolchain_type", +) + +erlang_xrl_yrl( + name = "lexer", + srcs = ["lexer.xrl"], + outs = ["lexer.erl"], + tags = ["manual"], +) + +erlang_xrl_yrl( + name = "parser", + srcs = ["parser.yrl"], + outs = ["parser.erl"], + tags = ["manual"], +) + +xrl_yrl_test_suite(name = "xrl_yrl_test") diff --git a/private/xrl_yrl_test/fake_otp_version b/private/xrl_yrl_test/fake_otp_version new file mode 100644 index 0000000..573541a --- /dev/null +++ b/private/xrl_yrl_test/fake_otp_version @@ -0,0 +1 @@ +0 diff --git a/private/xrl_yrl_test/fake_release.tar b/private/xrl_yrl_test/fake_release.tar new file mode 100644 index 0000000..3e14aea --- /dev/null +++ b/private/xrl_yrl_test/fake_release.tar @@ -0,0 +1 @@ +fake release tar, never unpacked by these tests diff --git a/private/xrl_yrl_test/lexer.xrl b/private/xrl_yrl_test/lexer.xrl new file mode 100644 index 0000000..c98b464 --- /dev/null +++ b/private/xrl_yrl_test/lexer.xrl @@ -0,0 +1,10 @@ +Definitions. + +D = [0-9] + +Rules. + +{D}+ : {token, {int, TokenLine, list_to_integer(TokenChars)}}. +[\s\t\n]+ : skip_token. + +Erlang code. diff --git a/private/xrl_yrl_test/parser.yrl b/private/xrl_yrl_test/parser.yrl new file mode 100644 index 0000000..307238f --- /dev/null +++ b/private/xrl_yrl_test/parser.yrl @@ -0,0 +1,8 @@ +Nonterminals list items. +Terminals int. +Rootsymbol list. + +list -> items : '$1'. +list -> '$empty' : []. +items -> int : [element(3, '$1')]. +items -> int items : [element(3, '$1') | '$2']. diff --git a/private/xrl_yrl_test/xrl_yrl_test.bzl b/private/xrl_yrl_test/xrl_yrl_test.bzl new file mode 100644 index 0000000..d503dd3 --- /dev/null +++ b/private/xrl_yrl_test/xrl_yrl_test.bzl @@ -0,0 +1,67 @@ +load("@bazel_skylib//lib:unittest.bzl", "analysistest", "asserts") +load("//private:erlang_build.bzl", "OtpInfo") + +def _fake_release_otp_impl(ctx): + return [OtpInfo( + version = "0", + release_dir_tar = ctx.file.release_dir_tar, + install_path = "/tmp/bazel/erlang/fake", + erlang_home = "/tmp/bazel/erlang/fake", + version_file = ctx.file.version_file, + )] + +fake_release_otp = rule( + implementation = _fake_release_otp_impl, + attrs = { + "release_dir_tar": attr.label(allow_single_file = True, mandatory = True), + "version_file": attr.label(allow_single_file = True, mandatory = True), + }, + provides = [OtpInfo], +) + +def _installs_erlang_test_impl(ctx): + env = analysistest.begin(ctx) + actions = [a for a in analysistest.target_actions(env) if a.mnemonic == "ERLC"] + asserts.equals(env, 1, len(actions), "expected one ERLC action") + if actions: + action = actions[0] + command = " ".join(action.argv) + asserts.true( + env, + "tar --extract" in command, + "ERLC command does not unpack the release tar:\n" + command, + ) + asserts.true( + env, + "fake_release.tar" in command, + "ERLC command does not name the release tar:\n" + command, + ) + inputs = [f.basename for f in action.inputs.to_list()] + asserts.true(env, "fake_release.tar" in inputs, "release tar is not an input") + return analysistest.end(env) + +installs_erlang_test = analysistest.make( + _installs_erlang_test_impl, + config_settings = { + "//command_line_option:extra_toolchains": [ + str(Label("//private/xrl_yrl_test:fake_toolchain")), + ], + }, +) + +def xrl_yrl_test_suite(name): + installs_erlang_test( + name = "lexer_installs_erlang_test", + target_under_test = ":lexer", + ) + installs_erlang_test( + name = "parser_installs_erlang_test", + target_under_test = ":parser", + ) + native.test_suite( + name = name, + tests = [ + ":lexer_installs_erlang_test", + ":parser_installs_erlang_test", + ], + ) diff --git a/test/xrl_yrl/BUILD.bazel b/test/xrl_yrl/BUILD.bazel new file mode 100644 index 0000000..bad52e1 --- /dev/null +++ b/test/xrl_yrl/BUILD.bazel @@ -0,0 +1,32 @@ +load("@rules_erlang//:erlang_xrl_yrl.bzl", "erlang_xrl_yrl") +load("@rules_shell//shell:sh_test.bzl", "sh_test") + +erlang_xrl_yrl( + name = "lexer", + srcs = ["lexer.xrl"], + outs = ["lexer.erl"], +) + +erlang_xrl_yrl( + name = "parser", + srcs = ["parser.yrl"], + outs = ["parser.erl"], +) + +sh_test( + name = "xrl_yrl_test", + srcs = ["xrl_yrl_test.sh"], + args = [ + "$(location :lexer)", + "$(location :parser)", + ], + data = [ + ":lexer", + ":parser", + ], + target_compatible_with = select({ + "@platforms//os:osx": [], + "@platforms//os:linux": [], + "//conditions:default": ["@platforms//:incompatible"], + }), +) diff --git a/test/xrl_yrl/lexer.xrl b/test/xrl_yrl/lexer.xrl new file mode 100644 index 0000000..c98b464 --- /dev/null +++ b/test/xrl_yrl/lexer.xrl @@ -0,0 +1,10 @@ +Definitions. + +D = [0-9] + +Rules. + +{D}+ : {token, {int, TokenLine, list_to_integer(TokenChars)}}. +[\s\t\n]+ : skip_token. + +Erlang code. diff --git a/test/xrl_yrl/parser.yrl b/test/xrl_yrl/parser.yrl new file mode 100644 index 0000000..307238f --- /dev/null +++ b/test/xrl_yrl/parser.yrl @@ -0,0 +1,8 @@ +Nonterminals list items. +Terminals int. +Rootsymbol list. + +list -> items : '$1'. +list -> '$empty' : []. +items -> int : [element(3, '$1')]. +items -> int items : [element(3, '$1') | '$2']. diff --git a/test/xrl_yrl/xrl_yrl_test.sh b/test/xrl_yrl/xrl_yrl_test.sh new file mode 100755 index 0000000..b4fba15 --- /dev/null +++ b/test/xrl_yrl/xrl_yrl_test.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +set -euo pipefail + +grep -q -- '-module(lexer).' "$1" +grep -q -- '-module(parser).' "$2" -- 2.53.0PR 2:
feat(erlang_app, ct_suite): forward target_compatible_with and tagsPR text
Title: feat(erlang_app, ct_suite): forward target_compatible_with and tags
Problem
erlang_appandtest_erlang_appcannot mark their generated targets as incompatible with a platform, or tag them.ct_suitepassestarget_compatible_withto the test but not to the suite's bytecode target, so the suite still compiles on platforms where it cannot run.Change
erlang_app: new argumentstarget_compatible_withandtags, both defaultNone. They are passed toerlang_bytecode,app_file, the appupcopy_fileanderlang_app_info.ct_suite: also passestarget_compatible_withto the suite'serlang_bytecode.Test
test/erlang_app_attrs: an app, a test app and a suite, all withtags = ["attrs_fixture"]andtarget_compatible_with = ["@platforms//:incompatible"]. A macro in the same BUILD file walksnative.existing_rules()and fails at loading time if a generated rule misses either attribute.bazel test //...skips the incompatible suite, andbazel query --output=buildshows the tag on each target. On main the package fails to load (_erlang_app() got unexpected keyword arguments: tags, target_compatible_with).bazelisk test //... output (root, then test/)
(cached)means the same tree had passed earlier in that output base.git format-patch against main (pr2-forward-tcw-tags)
PR 3:
feat(ct_test): add auto_sname to opt out of -hidden -snamePR text
Title: feat(ct_test): add auto_sname to opt out of -hidden -sname
Problem
ct_testalways startsct_runwith-hidden -sname <name>. A named node needs epmd and a free name on a working loopback. In a sandbox without a loopback interface the node cannot start, and the test fails before any case runs.ct_run_extra_argscan add node options but cannot remove these two.Change
auto_snameonct_test, defaultTrue.False, both the POSIX and the Windows script startct_runwithout-hiddenand-sname.ct_run_extra_argsthen chooses the node options. For example,-sname undefined -start_epmd falseruns the suite without epmd.-snameor-name,ct_runuses its own default name (ct). The attribute doc says so.ct_suiteandct_suite_variantpass it through**kwargs.Test
private/ct_auto_sname_test: analysis tests on the generated POSIX and Windows scripts.-hiddenand-snameare present by default and absent withauto_sname = False.test/ct_no_sname: a suite withauto_sname = Falseand-sname undefined -start_epmd false. It checks thatnode()isnonode@nohostand that the node is not hidden. With the defaultauto_snamethe same suite fails, because-hiddenis still passed.bazelisk test //... output (root, then test/)
(cached)means the same tree had passed earlier in that output base.git format-patch against main (pr3-ct-auto-sname)
PR 4:
feat(OtpInfo): add an optional relocatable treePR text
Title: feat(OtpInfo): add an optional relocatable tree
Problem
A toolchain can give erlang in two ways only: an absolute
erlang_homeon the host, or a release tar that each action unpacks to a fixed absolute path. Neither lets an erlang that lives inside the build be used as plain inputs and runfiles. Examples are a relocatable release in a repository rule or in the source tree.Change
OtpInfogets an optional, documentedtreefield. It is a depset of every file of a relocatable erlang whose root directory holdsversion_file.treeis set:erlang_dirsputs the tree in the runfiles. It returns the home${RULES_ERLANG_HOME}, which is exported asTREE_ERLANG_HOME.maybe_install_erlangassignsRULES_ERLANG_HOMEfrom the directory ofversion_file, using the path in actions and the short path in tests. It does not unpack a tar. The variable is a plain shell variable and is not exported.ERLANG_HOMEmake variable fromerlang_toolchainanderlang_varsis the directory ofversion_file. A genrule that uses it must list the tree files as inputs.treeis read withgetattr. Providers that do not set it, and every existing toolchain, behave as before.erlang_headersnow double-quotes the home, so the variable expands.erlang_dirsalso emitsmaybe_install_erlang. A new rule that skips it fails at once with an unset variable. (erlang_xrl_yrlhas this bug on main for release tars as well; PR 1 fixes it.)Test
private/otp_tree_testhas a fake tree toolchain:OTP_VERSIONplus stubbin/erl,bin/erlcandbin/escript.erl_evalderives the home, runs"${RULES_ERLANG_HOME}"/bin/erl, has every tree file as an input, and does not unpack a tar.eunitscript derives the home from the short path and has the tree in its runfiles.sh_testbuildserl_evalwith the tree toolchain (through a transition onextra_toolchains) and checks that the stub erl ran from the tree in the sandbox.OtpInfohas notreefield.bazelisk test //... output (root, then test/)
(cached)means the same tree had passed earlier in that output base.git format-patch against main (pr4-otp-tree)
Coverage of
hermetic_otp.patchEvery hunk is covered.
private/erlang_xrl_yrl.bzl{maybe_install_erlang}erlang_app.bzltcw/tags,ct.bzltcwprivate/ct.bzldrop-hidden -snameprivate/erlang_build.bzltree,tools/erlang_toolchain.bzlThe four PRs, applied together, were diffed against
main+hermetic_otp.patch. Only these intentional differences remain:target_compatible_with.auto_sname(default unchanged), not an unconditional removal. The Windows block is covered too.RULES_ERLANG_HOME, exported asTREE_ERLANG_HOME, notDX_ERLANG_HOME.erlang_dirsreturns that constant instead ofinfo.erlang_home.ERLANG_HOMEpoints at the tree.erlang_headersquoting is fixed.The
-snameopt-in is namedauto_sname, notdistributed. With it off,ct_runstill starts a distributed node: its default name isct, and rules_dx passes-sname undefined.rules_dx side
#4072 replaces
hermetic_otp.patchwith the combined diff of these four PRs, without their tests. In the same PR:dx_otploadsTREE_ERLANG_HOME.RULES_ERLANG_HOME.ct_suitepassesauto_sname = False.//erlang/tests/...,//elixir/tests/...,//examples/erlang-app/...and//examples/elixir-app/...pass with it.After each upstream merge:
pins.bzl.git apply --checkagainst the new pin).//erlang/tests/....When all four have merged, delete
patches/rules_erlang/and thepatchesattr inerlang/toolchain/repos.bzl. The rules_elixirtreePR should reuseTREE_ERLANG_HOMErather than define its own variable.rules_erlang: align hermetic_otp.patch with the four proposed upstrea…
TrapsterDK commentedon Nov 4, 2026
Recheck 2026-11-04: still blocked. The maintainer must submit the four upstream PRs from the comment of 2026-10-27 (issue is needs-host). Upstream bazelverse/rules_erlang main is still 13977b3, our pin, and no upstream PR is open. Next: pin bump per merged PR, removing its hunks from hermetic_otp.patch.
TrapsterDK commentedon Nov 4, 2026
Plan (agent): size S once unblocked
Decision: an agent opens the four upstream PRs from the 2026-10-27 comment, then drops each PR's hunks here as it merges. Rejected: keep waiting for a manual submit (it has sat 8 days, and AGENTS.md says agents open the upstream PR); one more combined PR upstream (harder to review, the reason for this issue).
Cause: nothing is broken in rules_dx. #4072 already made
patches/rules_erlang/hermetic_otp.patchequal to the four PRs combined, applied aterlang/toolchain/repos.bzl:358. The only open step is upstream submission. bazelverse/rules_erlang main is still13977b3(our pin inerlang/toolchain/pins.bzl:10), with no PR from us.Change, after "yes":
git format-patchcommits from the 2026-10-27 comment as four branches on freshmain. Re-checkgit apply --checkfirst. Open PR 1 to PR 4 with the drafted text and link each one here. The fork has no issue tracker, so the PR is the issue.patches/rules_erlang/: splithermetic_otp.patchinto01_xrl_yrl.patch,02_tcw_tags.patch,03_auto_sname.patchand04_otp_tree.patch. Each one touches different files. List all four inerlang/toolchain/repos.bzl:358andBUILD.bazelexports_files. After that, a merged PR means a pin bump plus deleting one file.pins.bzl(commit, sha256, url), delete that PR's patch, and confirm the rest still apply. When all four are in, delete the four patches.toolchain_type_alias.patchstays.Tests:
tools/dx test //erlang/tests/... //elixir/tests/... //examples/erlang-app/... //examples/elixir-app/...Host: none. The
needs-hostlabel looks wrong: nothing here needs macOS or Windows.Upstream: the four PRs to bazelverse/rules_erlang above. The rules_elixir
treePR depends on PR 4.Question for owner: may an agent open the four PRs on bazelverse/rules_erlang from your GitHub account? This issue's body says only you submit, and AGENTS.md says agents open upstream PRs. Recommended: yes. Reply "yes", or reply "no, I submit" and post the PR links here.
TrapsterDK commentedon Nov 4, 2026
Owner decision: yes. Agents submit the drafted upstream PRs from this account (each ends with 'Assisted by Claude.'), then split our patch so each upstream merge is a pin bump plus deleting one patch file.
TrapsterDK commentedon Nov 4, 2026
Owner: before submitting each upstream PR, take extra care that it fits upstream: read their CONTRIBUTING and recent merged PRs, search for existing issues/PRs on the same thing, match their style and commit format, keep the diff minimal and focused, add a regression test in their test layout, and run their tests locally. Get a review pass before opening. Open the upstream issue first if they expect one.
patches/rules_erlang: split hermetic_otp.patch per upstream PR (part of
TrapsterDK commentedon Nov 4, 2026
Upstream PR 1 submitted: issue bazelverse/rules_erlang#11, PR bazelverse/rules_erlang#12 (branch TrapsterDK:pr1). Tests: root 5/5 alone on main; stacked root 15/15 and test/ 17 of 18 pass (1 skipped as incompatible by design).
TrapsterDK commentedon Nov 4, 2026
Upstream PR 2 submitted: issue bazelverse/rules_erlang#13, PR bazelverse/rules_erlang#14 (branch TrapsterDK:pr2). Root 3/3 alone on main; stacked results as in PR 1.
TrapsterDK commentedon Nov 4, 2026
Upstream PR 3 submitted: issue bazelverse/rules_erlang#15, PR bazelverse/rules_erlang#16 (branch TrapsterDK:pr3). Root 8/8 alone on main. macOS and Windows jobs not run locally.
TrapsterDK commentedon Nov 4, 2026
Upstream PR 4 submitted: issue bazelverse/rules_erlang#17, PR bazelverse/rules_erlang#18 (branch TrapsterDK:pr4). Depends on PR 1 (#12) merging first. Root 8/8 alone on main. Review follow-ups not applied (kept diff minimal): Windows scripts do not guard against a tree, shell rule runfiles drop the tree, ERLANG_HOME make variable is execroot-relative.
TrapsterDK commentedon Nov 5, 2026
Still blocked on upstream: bazelverse/rules_erlang PRs #12, #14, #16, #18 are all open, none merged; upstream main is still 13977b3 (our pin). Nothing to change in-repo until one merges; then drop its patch in a pin-bump PR, one at a time.
github-actions commentedon Nov 5, 2026
Unblocked: #12, #14, #16, #18 closed
TrapsterDK commentedon Nov 5, 2026
False unblock: the bot matched local #12/#14/#16/#18. Upstream PRs are still open; their CI waits for maintainer approval (
action_required). Still blocked.TrapsterDK commentedon Nov 5, 2026
Recheck 2026-11-05: #12/#14/#16/#18 upstream still open, main 13977b3. Split already done (repos.bzl:358). Next: one pin-bump PR per upstream merge.
TrapsterDK commentedon Nov 21, 2026
rules_erlang patch 08 (
08_nif_profile_per_library.patch) sent upstream: issue bazelverse/rules_erlang#22, PR bazelverse/rules_erlang#23. rules_dx header update: #14503.