Repository navigation
fix(erlang_xrl_yrl): install a release-tar erlang before running erlc - #12
Open
TrapsterDK wants to merge 1 commit into
Open
TrapsterDK wants to merge 1 commit into
TrapsterDK wants to merge 1 commit into
Conversation
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.
Assisted by Claude.
This was referenced Nov 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #11.
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. This is a smoke test; the analysis tests above are the regression test.Test output (OTP 29.1.2, Bazel 9.2.0,
--nohome_rc)The PR was also checked alone on
main(5/5 root tests pass). The output below is from all four of my PRs stacked (bazel test //...in the root, then intest/).Assisted by Claude.