Skip to content

Build the Elixir 1.12-1.14 archives on OTP 24 - #1265

Merged
ericmj merged 1 commit into
mainfrom
ericmj/vigilant-hodgkin-b4c110
Oct 6, 2026
Merged

ericmj merged 1 commit into
mainfrom
ericmj/vigilant-hodgkin-b4c110

Conversation

@ericmj

@ericmj ericmj commented Oct 6, 2026

Copy link
Copy Markdown
Member

The release script built the Elixir 1.12 and 1.13 archives on OTP 22.3 and the 1.14 archive on OTP 23.3. CI's oldest OTP is 24.3 (with Elixir 1.12.3), and hex_core is only tested on OTP 24 and later, so nothing ran the code those archives ship. This PR builds them on OTP 24.3.4.17 like the 1.15 and 1.16 archives, which makes OTP 24 the minimum supported OTP. It also adds a changelog entry and a note in RELEASE.md that archives are only built on OTP versions CI tests.

Two problems in released archives came out of this:

  • Since the update to hex_core 0.15.0 (Update to hex_core 0.15.0 #1138), the vendored erl_tar calls filelib:safe_relative_path/2, which was added in OTP 23. On OTP 22, Hex 2.4.2 to 2.5.1 fail to unpack packages with UndefinedFunctionError. Resolution and downloads still work.
  • mix_hex_repo:fingerprint/1 calls ssh:hostkey_fingerprint/2, which OTP 23 doesn't export. Since 2.5.0, mix hex.repo show and mix hex.repo list crash on the OTP 23 build.

The old CSV format used for Elixir 1.12 to 1.16 has no OTP column, so mix local.hex on those Elixir versions installs the same archive whatever the OTP. Archives built on OTP 24 don't load on OTP 22 or 23 ("This BEAM file was compiled for a later version of the run-time system"). A version check inside Hex can't give a better error, because the modules never load. The changelog points OTP 22 users at Hex 2.4.1 and OTP 23 users at 2.5.1.

I built the three archives with the image tags in this PR. In each image I installed the archive and ran mix deps.get (jason, plug, decimal), mix hex.build and mix hex.repo show hexpm, and all of them worked. I also confirmed that released Hex 2.4.1 works on OTP 22.3 and 2.4.2 doesn't.

The release script built the Elixir 1.12 and 1.13 archives on OTP 22.3
and the 1.14 archive on OTP 23.3, but CI's oldest OTP is 24.3 and
hex_core is only tested on OTP 24 and later. Since the update to
hex_core 0.15.0 (#1138) the vendored
erl_tar calls filelib:safe_relative_path/2, which OTP 22 doesn't have,
so Hex 2.4.2 to 2.5.1 fail to unpack packages on OTP 22.
mix_hex_repo:fingerprint/1 calls ssh:hostkey_fingerprint/2, which OTP 23
doesn't have, so mix hex.repo show and list crash on the OTP 23 build
since 2.5.0.

Build these archives on OTP 24.3.4.17 like the 1.15 and 1.16 archives,
which makes OTP 24 the minimum, and document that archives are only
built on OTP versions CI tests.
@ericmj
ericmj marked this pull request as ready for review October 6, 2026 15:04
@ericmj
ericmj merged commit 65d6281 into main Oct 6, 2026
22 checks passed
@ericmj
ericmj deleted the ericmj/vigilant-hodgkin-b4c110 branch October 6, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant