Enable ephemeral --dump-bytecode-as-base64#25082
Merged
mdgeorge4153 merged 16 commits intomainfrom Feb 12, 2026
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
af4bf59 to
f0a0fa3
Compare
f0a0fa3 to
25df73c
Compare
| You can also prepare bytecode for publication without actually publishing it by passing `--pubfile-path <pubfile>` to `sui move build --dump-bytecode-as-base64`: | ||
|
|
||
| ```sh | ||
| sui move build --dump-bytecode-as-base64 --pubfile-path Pub.localnet.toml |
Contributor
There was a problem hiding this comment.
Shouldn't this also need build-env (-e)? Or do we extract it from the pubfile? (but i guess the latter only works if the pubfile is not fresh)
Contributor
There was a problem hiding this comment.
Would be cool to also test the case where pubfile path does not exist (so it also requires build-env)
manolisliolios
approved these changes
Jan 27, 2026
Contributor
Author
|
Note: the --allow-dirty flag is not being passed down to the PackageLoader constructor when converting a |
00e4177 to
31c045c
Compare
Rename the long form of the environment flag from --environment to --build-env while keeping the -e short form for consistency with other CLI conventions. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add a shorter --dump alias for the --dump-bytecode-as-base64 flag for convenience when using sui move build. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add --pubfile-path flag to BuildConfig, making it available on build commands. When --pubfile-path is passed to sui move build --dump-bytecode-as-base64, use ephemeral addresses from the specified publication file instead of addresses from the lock file. This enables building packages with ephemeral publication data for testing and development workflows. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add validation to reject --pubfile-path flag on sui client publish and sui client upgrade commands. Users should use test-publish or test-upgrade instead for ephemeral publication workflows. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Test that sui move build --dump correctly uses addresses from an ephemeral publication file (Pub.*.toml) when --pubfile-path is provided. The test creates a main_pkg that depends on dep_pkg, provides a pubfile with ephemeral publication info for both, and verifies the dump output uses the expected addresses. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The reroot_path() function changes the current working directory to the package root before the pubfile path is used. This caused relative paths passed to --pubfile-path to be resolved relative to the -p package directory instead of the original CWD. Fix by resolving pubfile_path to absolute before reroot_path is called. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Instead of snapshotting the entire JSON output, decode the base64 module and disassemble it to verify the ephemeral original-id (cafe0001) appears in the bytecode. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Verifies that when building with --dump (without --pubfile-path), the dependency's original-id from Published.toml appears in the compiled bytecode. This contrasts with the ephemeral dump test which uses addresses from a pubfile. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The build_env and pubfile_path fields from EphemeralArgs are now available in MoveBuildConfig via --build-env and --pubfile-path flags. This eliminates the clap argument name conflicts in test-publish and test-upgrade commands. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove EphemeralArgs from cli_tests.rs and set environment and pubfile_path directly on MoveBuildConfig. Tests that use TestPublish need both fields set for ephemeral publication to work correctly. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
0b38a47 to
4f1c289
Compare
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
See the release notes below
Test plan
Shell tests were added to ensure that
--dump-bytecode-as-base64 --pubfile-pathproduces bytecode containing the ephemeral addresses.Release notes
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.
You can now do
sui move build --dump-bytecode-as-base64 --pubfile-path <file>to use ephemeral addresses for dumped bytecode.The
--dumpflag can be used as a shorthand for--dump-bytecode-as-base64.The full flag for
-ehas been changed to--build-env(the shorthand-eremains the same)Fixed a bug when
--pubfile-pathis used with-p