sui_package_management/
lib.rs

1// Copyright (c) Mysten Labs, Inc.
2// SPDX-License-Identifier: Apache-2.0
3
4use sui_types::base_types::ObjectID;
5
6pub mod system_package_versions;
7
8/// TODO(pkg-alt): Move this to a crate we really want to use.
9pub enum LockCommand {
10    Publish,
11    Upgrade,
12}
13
14/// TODO(pkg-alt): Remove these once we figure out deps.
15#[derive(thiserror::Error, Debug, Clone)]
16pub enum PublishedAtError {
17    #[error("The 'published-at' field in Move.toml or Move.lock is invalid: {0:?}")]
18    Invalid(String),
19
20    #[error("The 'published-at' field is not present in Move.toml or Move.lock")]
21    NotPresent,
22
23    #[error(
24        "Conflicting 'published-at' addresses between Move.toml -- {id_manifest} -- and \
25         Move.lock -- {id_lock}"
26    )]
27    Conflict {
28        id_lock: ObjectID,
29        id_manifest: ObjectID,
30    },
31}