Repository navigation
Build the Elixir 1.12-1.14 archives on OTP 24 - #1265
Merged
Merged
Conversation
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.
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.
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:
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 withUndefinedFunctionError. Resolution and downloads still work.mix_hex_repo:fingerprint/1callsssh:hostkey_fingerprint/2, which OTP 23 doesn't export. Since 2.5.0,mix hex.repo showandmix hex.repo listcrash on the OTP 23 build.The old CSV format used for Elixir 1.12 to 1.16 has no OTP column, so
mix local.hexon 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.buildandmix 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.