-
Notifications
You must be signed in to change notification settings - Fork 2
full package history #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…y using a Move.package-history.toml file The `Move.package-history.toml` file * should be located in the same directory as the `Move.lock` file * contains all necessary data * can be maintained manually or by using a package-history CLI tool
….package-history.toml` files
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
… in package_history_cli/src/main.rs to be used by build.rs scripts of product repositories Crate package_history_cli has been removed
… can ignore envs specified by their alias
…d in build.rs implementations
UMR1352
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly nitpicks, feel free to disregard anything you don't agree with
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issue 1
The build script requires env tables in Move.lock, but fresh Move projects don't generate these until after first deployment.
Root Cause:
MoveHistoryManagerparser expects[env.{network}]sections withoriginal-published-idandlatest-published-id- New/unpublished Move packages don't have these entries yet
- Build fails before you can even publish the contract
Impact:
This creates a problem where you can't build your client until you've published your contract at least once on each target network.
Typical Scenario:
- Create new Move package →
Move.lockhas noenvtables - Try to build Rust client → Build fails
- Can only proceed after publishing contract to generate the
enventries
Solution needed: The parser should either:
- Accept empty/missing
envtables gracefully for new projects.
|
Issue 2 Custom aliases are not being written to Move.history.json - the aliases field remains empty {} even after deployment with custom aliases defined. Current State: {
"aliases": {}, # Empty despite having an alias
"envs": {
"ead649fb": ["0x3cd00d411d6a74d833d7f690025ebd4ce3c2f4934afd29ab141fe474ee335282"]
}
}Expected Behavior: {
"aliases": {
"my-custom-network": "ead649fb"
},
"envs": { ... }
} |
|
Issue 3 When an environment is deleted from Reproduction:
Impact:
Root Cause: The real question is how should we handle this ? do we want the |
|
Issue 4 Aliases are inconsistently written to Current State: {
"aliases": {
"localnet": "ead649fb" // ← Appeared after testnet deployment (???)
},
"envs": {
"ead649fb": ["0x3cd..."],
"2304aa97": ["0xabc..."] // ← testnet chain-id, but no alias
}
}Reproduction:
{
"aliases": {
"localnet": "ead649fb",
"testnet": "2304aa97",
"devnet": "e678123a"
},
"envs": {
"ead649fb": ["0x..."],
"2304aa97": ["0x..."],
"e678123a": ["0x..."]
}
} |
# Conflicts: # product_common/Cargo.toml
The required version has been set to "2.1.0" instead of "2.11.0"
- Add method to retrieve aliases in PackageRegistry. - Introduce method to update aliases in PackageRegistry. - Update MoveHistoryManager to synchronize aliases from Move.lock to the existing registry.
- Implement tests to verify that updating the Move.lock file correctly syncs new and existing aliases in the PackageRegistry. - Ensure that existing aliases are preserved when no new environments are added during the update process.
…liases_to_watch_list
…istently-written-to-Move.history.json fix: Sync aliases from Move.lock during history file updates
# Conflicts: # product_common/Cargo.toml
…ets and package redeployment due to breaking changes
Description of change
product_common::PackageRegistrynow supports the full package version history. It uses aMove.history.jsonfile to import the version history and known environments (as being previously done withMove.lockfiles).The
Move.history.jsonfileMove.lockfilePackageRegistryPackageRegistryinclude_str!()) - like the previously usedMove.lockfile had been integrated in the buildlocalnetnetworks, as this would mass up the file. For this purpose theMoveHistoryManagerdescribed below, offers aaliases_to_ignorelist which is set tolocalnetper default.For example the
Move.history.jsonfor the recent (not latest) Identity package would look like this:{ "aliases": { "devnet": "e678123a", "testnet": "2304aa97", "mainnet": "6364aad5" }, "envs": { "6364aad5": ["0x84cf5d12de2f9731a89bb519bc0c982a941b319a33abefdd5ed2054ad931de08"], "e678123a": [ "0xe6fa03d273131066036f1d2d4c3d919b9abbca93910769f26a924c7a01811103", "0x6a976d3da90db5d27f8a0c13b3268a37e582b455cfc7bf72d6461f6e8f668823" ], "2304aa97": [ "0x222741bbdff74b42df48a7b4733185e9b24becb8ccfbafe8eac864ab4e4cc555", "0x3403da7ec4cd2ff9bdf6f34c0b8df5a2bd62c798089feb0d2ebf1c2e953296dc" ] } }Product
build.rsscriptsThe
Move.history.jsonfor a product can be created manually or automatically using theMoveHistoryManagerinbuils.rsscripts .See the docs of the MoveHistoryManager for further details.
An example for a build.rs script using the
MoveHistoryManagerto manage itsMove.history.jsonfile can be found in the Notarization - Full package history PR.Links to any relevant issues
Will fix: NOTARIZATION_PACKAGE_REGISTRY: Support full package address version history #71