Skip to content

Commit

Permalink
removed feature flags for sui-move (#20658)
Browse files Browse the repository at this point in the history
## Description 

This removes the feature flags for the `sui-move` crate. These seem
overzealous and are preventing me from implementing some tests. The only
impacted crates are `sui-core`, `sui-source-validation-service`, and
`sui-framework-tests`. Of these, the main concern is bringing additional
code into `sui-core`, but (a) `sui-move` is only a dev-dependency of
`sui-core` and (b) `sui-move-build` is already a direct dependency of
`sui-core`, so this doesn't make things worse (per @amnn).

## Test plan 

No additional testing

---

## 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.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
  • Loading branch information
mdgeorge4153 authored Jan 6, 2025
1 parent fb98d48 commit b14ee43
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 28 deletions.
2 changes: 1 addition & 1 deletion crates/sui-framework-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ datatest-stable.workspace = true
prometheus.workspace = true

sui-framework.workspace = true
sui-move = { workspace = true, features = ["unit_test"] }
sui-move.workspace = true
sui-move-build.workspace = true
sui-protocol-config.workspace = true
sui-types.workspace = true
Expand Down
12 changes: 1 addition & 11 deletions crates/sui-move/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ edition = "2021"
anyhow.workspace = true
clap.workspace = true
colored.workspace = true
once_cell = { workspace = true, optional = true }
once_cell.workspace = true
serde_json.workspace = true
serde_yaml.workspace = true
tracing.workspace = true
Expand Down Expand Up @@ -56,13 +56,3 @@ sui-simulator.workspace = true

[package.metadata.cargo-udeps.ignore]
normal = ["jemalloc-ctl"]

[features]
default = []
build = []
coverage = []
disassemble = []
prove = []
unit_test = ["build", "dep:once_cell"]
calibrate = []
all = ["build", "coverage", "disassemble", "prove", "unit_test", "calibrate"]
13 changes: 0 additions & 13 deletions crates/sui-move/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,27 @@
// SPDX-License-Identifier: Apache-2.0

use clap::Parser;
#[cfg(feature = "unit_test")]
use move_cli::base::test::UnitTestResult;
use move_package::BuildConfig;
use std::path::Path;
use sui_move_build::set_sui_flavor;

#[cfg(feature = "build")]
pub mod build;
#[cfg(feature = "coverage")]
pub mod coverage;
#[cfg(feature = "disassemble")]
pub mod disassemble;
pub mod manage_package;
pub mod migrate;
pub mod new;
#[cfg(feature = "unit_test")]
pub mod unit_test;

#[derive(Parser)]
pub enum Command {
#[cfg(feature = "build")]
Build(build::Build),
#[cfg(feature = "coverage")]
Coverage(coverage::Coverage),
#[cfg(feature = "disassemble")]
Disassemble(disassemble::Disassemble),
ManagePackage(manage_package::ManagePackage),
Migrate(migrate::Migrate),
New(new::New),
#[cfg(feature = "unit_test")]
Test(unit_test::Test),
}
#[derive(Parser)]
Expand All @@ -51,17 +42,13 @@ pub fn execute_move_command(
anyhow::bail!(err_msg);
}
match command {
#[cfg(feature = "build")]
Command::Build(c) => c.execute(package_path, build_config),
#[cfg(feature = "coverage")]
Command::Coverage(c) => c.execute(package_path, build_config),
#[cfg(feature = "disassemble")]
Command::Disassemble(c) => c.execute(package_path, build_config),
Command::ManagePackage(c) => c.execute(package_path, build_config),
Command::Migrate(c) => c.execute(package_path, build_config),
Command::New(c) => c.execute(package_path),

#[cfg(feature = "unit_test")]
Command::Test(c) => {
let result = c.execute(package_path, build_config)?;

Expand Down
4 changes: 2 additions & 2 deletions crates/sui-source-validation-service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ tracing = "0.1.36"
serde = { version = "1.0.144", features = ["derive"] }
url = "2.3.1"

sui-move.workspace = true
sui-move.workspace = true
sui-move-build.workspace = true
sui-sdk.workspace = true
sui-source-validation.workspace = true
Expand All @@ -48,6 +48,6 @@ fs_extra = "1.3.0"
reqwest.workspace = true

sui.workspace = true
sui-move = { workspace = true, features = ["all"] }
sui-move.workspace = true
sui-json-rpc-types.workspace = true
test-cluster.workspace = true
2 changes: 1 addition & 1 deletion crates/sui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ sui-json-rpc-types.workspace = true
sui-sdk.workspace = true
sui-keys.workspace = true
sui-source-validation.workspace = true
sui-move = { workspace = true, features = ["all"] }
sui-move.workspace = true
sui-move-build.workspace = true
sui-package-management.workspace = true
sui-protocol-config.workspace = true
Expand Down

0 comments on commit b14ee43

Please sign in to comment.