[compiler] set language version 2.4 and bytecode version v10 as default#19702
Merged
Conversation
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
5429202 to
299b9f5
Compare
657e796 to
de928aa
Compare
wrwg
approved these changes
May 12, 2026
gregnazario
approved these changes
May 13, 2026
de928aa to
30688b9
Compare
22 tasks
30688b9 to
fca83dc
Compare
fca83dc to
ed1d507
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Contributor
✅ Forge suite
|
Contributor
✅ Forge suite
|
Contributor
✅ Forge suite
|
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.

Description
This PR sets language version 2.4 and bytecode version v10 as default. It follows the same pattern as #18400 (which previously set 2.3 + v9 as default), bumping one version higher.
Release CLI 9.4.0.
Source-level changes:
third_party/move/move-binary-format/src/file_format_common.rs:VERSION_DEFAULTV9 → V10; removedVERSION_DEFAULT_LANG_V2_4(which now equalsVERSION_DEFAULT); keptVERSION_DEFAULT_LANG_V2_5 = V10as the pointer for language versions above the default.third_party/move/move-model/src/metadata.rs:LATEST_STABLE_LANGUAGE_VERSION_VALUEV2.3 → V2.4; V2.4 removed fromunstable();infer_bytecode_versioncollapses V2.0–V2.4 →VERSION_DEFAULT, V2.5 →VERSION_DEFAULT_LANG_V2_5.crates/aptos/CHANGELOG.md: added an Unreleased entry.This PR incurs changes to the bytecode version in the results of many tests which output bytecode version info (about 100
.exp/.disassembledgoldens acrossmove-asm,transactional-test-runner, andmove-vm-transactional-tests), plus the API state-test golden and the cached release bundle (head.mrb).How Has This Been Tested?
RUST_MIN_STACK=42971520 UPBL=1 cargo test -p move-asm --test testsuite— 35 passedRUST_MIN_STACK=42971520 UPBL=1 cargo test -p move-vm-transactional-tests— 931 passedRUST_MIN_STACK=42971520 UPBL=1 cargo test -p move-transactional-test-runner --test tests— 7 passedcargo run -p aptos-framework -- update-cached-packagesand re-ran the API state-test golden underREGENERATE_GOLDENFILES=1(cargo test -p aptos-api test_get_account_module) — golden bytecode header is now0xa11ceb0b0a(v10) with embedded language2.4.Bytecode version v9references in.exp/.disassembled/.jsonfiles.Key Areas to Review
VERSION_DEFAULT_LANG_V2_4(the only references were inmove-binary-formatandmove-model, both updated here).e2e-move-tests,aptos-framework,move-compiler-v2) continue to pass against the new defaults under CI.Type of Change
Which Components or Systems Does This Change Impact?
Checklist
Note
Medium Risk
Changing default language/bytecode versions affects all new CLI compilations and published bytecode shape; risk is mitigated by following the prior stable-default bump pattern but still warrants validation against on-chain max bytecode version and broader CI (framework, e2e, compiler-v2).
Overview
This PR makes Move language 2.4 and bytecode v10 the default for the Aptos CLI (release 9.4.0), following the same pattern as the prior 2.3 / v9 bump.
Compiler defaults:
VERSION_DEFAULTmoves from v9 to v10 infile_format_common.rs, and the separateVERSION_DEFAULT_LANG_V2_4mapping is removed because v10 is now the global default. Inmetadata.rs, 2.4 becomes the latest stable language version (replacing 2.3), 2.4 is no longer treated as unstable, and bytecode inference for 2.0–2.4 all useVERSION_DEFAULT.User-visible behavior: New compilations without explicit version flags emit v10 bytecode and 2.4 language metadata (e.g. framework
guidgolden, compile-script hash). Compiler diagnostics for gated 2.4 features now refer to "2.4" instead of "2.4-unstable". An e2e Move test dropspublicon a struct now that public struct visibility is allowed under the new default.Baselines: Large mechanical updates to
.exp,.disassembled, and API goldens so printed bytecode headers show v10;Cargo.lockreflects the CLI version bump.Reviewed by Cursor Bugbot for commit ed1d507. Bugbot is set up for automated code reviews on this repo. Configure here.