Skip to content

Bump minimum OTP version to 26, Elixir to 1.17#2025

Merged
bettio merged 1 commit intoatomvm:release-0.7from
pguyot:w47/bump-minimum-otp-version
Mar 23, 2026
Merged

Bump minimum OTP version to 26, Elixir to 1.17#2025
bettio merged 1 commit intoatomvm:release-0.7from
pguyot:w47/bump-minimum-otp-version

Conversation

@pguyot
Copy link
Copy Markdown
Collaborator

@pguyot pguyot commented Dec 7, 2025

Simplify tests and remove support for opcodes that are not emitted by OTP26+, significantly reducing the virtual machine size.

Update build-and-test.yaml workflow matrix with 42 jobs:

  • every compiler
  • latest three OTP versions with default compiler versions
  • two previous Elixir versions (1.17 and 1.18) with compatible OTP versions
  • arm64 with and without JIT
  • armv6m with and without JIT
  • riscv32 with and without JIT
  • i386
  • s390x
  • x86-64 with JIT
  • stacktraces disabled
  • 32 bits floats
  • OTP master and Elixir main
  • -Os optimization on x86-64

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later

@pguyot pguyot force-pushed the w47/bump-minimum-otp-version branch from 3548923 to 813c0dc Compare December 7, 2025 20:14
@pguyot pguyot marked this pull request as ready for review December 7, 2025 20:14
Copy link
Copy Markdown
Collaborator

@UncleGrumpy UncleGrumpy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I spotted some test code that can be simplified even further, and had a question about the Elixir version for OTP 26. I am all in favor of focusing our efforts on currently supported OTP and Elixir releases. I will look forward to replacing our old edoc style module docs with newer (OTP-27) triple quoted doc strings, so we can use regular markdown in doc sections, and not the strange `markup' style for code markup once OTP 26 has been sunset.

Comment thread doc/release-notes.md.in
Comment thread tests/libs/estdlib/test_net_kernel.erl Outdated
@pguyot pguyot force-pushed the w47/bump-minimum-otp-version branch 6 times, most recently from 7e6164b to 7b82552 Compare December 12, 2025 22:03
@pguyot pguyot mentioned this pull request Dec 15, 2025
5 tasks
@pguyot pguyot force-pushed the w47/bump-minimum-otp-version branch from 7b82552 to dad9cd0 Compare January 18, 2026 10:10
@pguyot pguyot force-pushed the w47/bump-minimum-otp-version branch 2 times, most recently from 8ef3849 to 60e2403 Compare February 1, 2026 07:11
@pguyot pguyot force-pushed the w47/bump-minimum-otp-version branch 2 times, most recently from 9529b91 to 713d99c Compare February 22, 2026 10:16
@pguyot pguyot force-pushed the w47/bump-minimum-otp-version branch from 713d99c to 63a03f0 Compare March 7, 2026 21:17
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After the changes here, we might do some cleanup in term.h:

term_get_match_state_binary: USED
term_get_match_state_offset: USED
term_set_match_state_offset: USED
term_match_state_save_offset: UNUSED
term_match_state_save_start_offset: UNUSED
term_match_state_restore_start_offset: USED (only once, is it correct?)
term_match_state_restore_offset: UNUSED

Comment thread src/libAtomVM/opcodesswitch.h Outdated
Comment thread CHANGELOG.md
Comment thread tests/erlang_tests/test_node.erl Outdated
@pguyot pguyot force-pushed the w47/bump-minimum-otp-version branch 3 times, most recently from f7ace69 to e3dbedc Compare March 16, 2026 07:10
Comment thread src/libAtomVM/opcodesswitch.h
@pguyot pguyot force-pushed the w47/bump-minimum-otp-version branch 2 times, most recently from 41ac623 to bdc0987 Compare March 16, 2026 21:25
bettio added a commit to bettio/AtomVM-fork that referenced this pull request Mar 19, 2026
This PR anticipates part of atomvm#2025.

Signed-off-by: Davide Bettio <davide@uninstall.it>
bettio added a commit that referenced this pull request Mar 19, 2026
Phase out OTP < 26 from run-tests-with-beam

This PR anticipates part of #2025.

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later
@pguyot pguyot force-pushed the w47/bump-minimum-otp-version branch 2 times, most recently from 0247005 to dd5b422 Compare March 20, 2026 18:02
@pguyot pguyot changed the base branch from main to release-0.7 March 20, 2026 20:08
@pguyot pguyot force-pushed the w47/bump-minimum-otp-version branch 2 times, most recently from f15cbb1 to f3bbf4c Compare March 21, 2026 04:46
@petermm
Copy link
Copy Markdown
Contributor

petermm commented Mar 21, 2026

esp32c5 is oversized:
is it
#if MINIMUM_OTP_COMPILER_VERSION <= 24 (esp32 was minimum 26 even before)
being changed to
#if SUPPORT_COMPILER_OPT_NO_BS_MATCH || SUPPORT_COMPILER_OPT_NO_SSA_OPT_BS_ENSURE

either way I suggest the pragmatic addition of CONFIG_COMPILER_OPTIMIZATION_SIZE=y to src/platforms/esp32/sdkconfig.defaults.esp32c5

or maybe we can squeeze it in with a bit of cleaning

Simplify tests and remove support for opcodes that are not emitted by OTP26+,
significantly reducing the virtual machine size.

Also add AVM_MINIMAL_OPCODES option to remove support for opcodes that
are only emitted by OTP26-29 with specific compiler options.

Update build-and-test.yaml workflow matrix with 44 jobs:
- every compiler
- latest three OTP versions with default compiler versions
- next OTP version (29) with and without JIT
- two previous Elixir versions (1.17 and 1.18) with compatible OTP versions
  among the last three
- arm64 with and without JIT
- armv6m with and without JIT
- riscv32 with and without JIT
- i386
- s390x
- x86-64 with JIT
- stacktraces disabled
- 32 bits floats
- OTP master and Elixir main
- -Os optimization on x86-64

Signed-off-by: Paul Guyot <pguyot@kallisys.net>
@pguyot pguyot force-pushed the w47/bump-minimum-otp-version branch from f3bbf4c to 94f6f0b Compare March 21, 2026 08:43
@pguyot
Copy link
Copy Markdown
Collaborator Author

pguyot commented Mar 21, 2026

esp32c5 is oversized: is it #if MINIMUM_OTP_COMPILER_VERSION <= 24 (esp32 was minimum 26 even before) being changed to #if SUPPORT_COMPILER_OPT_NO_BS_MATCH || SUPPORT_COMPILER_OPT_NO_SSA_OPT_BS_ENSURE

either way I suggest the pragmatic addition of CONFIG_COMPILER_OPTIMIZATION_SIZE=y to src/platforms/esp32/sdkconfig.defaults.esp32c5

or maybe we can squeeze it in with a bit of cleaning

Exactly. Locally it fits with a new AVM_MINIMAL_OPCODES option that just disables support for these opcodes.

@bettio bettio merged commit 86031fe into atomvm:release-0.7 Mar 23, 2026
193 of 194 checks passed
bettio added a commit that referenced this pull request Mar 23, 2026
Merge fixes and minor changes from release-0.7, including:
  - Bump minimum OTP version to 26, Elixir to 1.17 (#2025)
  - JIT: inline mul/bsl/bsr BIF operations when provably safe (#2213)
  - JIT: inline byte_size/1 when argument is a known binary (#2221)
  - JIT: inline div and rem bifs (#2222)
  - JIT: fuse tuple operations (#2224)
@pguyot pguyot deleted the w47/bump-minimum-otp-version branch March 23, 2026 18:53
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.

4 participants