Skip to content
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

Fix features handling for massa-sc-runtime #4818

Merged
merged 1 commit into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[alias]
xtask = "run --package massa_xtask --"
xtask = "run --features gas_calibration --package massa_xtask --"
6 changes: 2 additions & 4 deletions massa-module-cache/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ name = "massa_module_cache"
version = "2.5.0"
edition = "2021"

[features]
test-exports = ["massa-sc-runtime/testing"]

[dependencies]
schnellru = {workspace = true}
rand = {workspace = true} # BOM UPGRADE Revert to "0.8.5" if problem
Expand All @@ -19,8 +16,9 @@ rocksdb = {workspace = true}
massa_hash = {workspace = true}
massa_models = {workspace = true}
massa_serialization = {workspace = true}
massa-sc-runtime = {workspace = true, "features" = ["testing"]}
massa-sc-runtime = {workspace = true}

[dev-dependencies]
tempfile = {workspace = true} # BOM UPGRADE Revert to "3.3" if problem
serial_test = {workspace = true}
massa-sc-runtime = {workspace = true, "features" = ["testing"]}
5 changes: 4 additions & 1 deletion massa-xtask/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ name = "massa_xtask"
version = "2.5.0"
edition = "2021"

[features]
gas_calibration = ["massa-sc-runtime/gas_calibration"]

[dependencies]
# update_package_versions dependencies
massa_models = {workspace = true}
toml_edit = {workspace = true} # BOM UPGRADE Revert to "0.19.8" if problem
walkdir = {workspace = true}
# check_gas_costs dependencies
massa-sc-runtime = {workspace = true, features = ["gas_calibration"]}
massa-sc-runtime = {workspace = true}
3 changes: 3 additions & 0 deletions massa-xtask/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#[cfg(feature = "gas_calibration")]
mod check_gas_cost_definitions;
mod update_package_versions;

#[cfg(feature = "gas_calibration")]
use crate::check_gas_cost_definitions::check_gas_cost_definitions;
use crate::update_package_versions::update_package_versions;
use std::env;
Expand All @@ -13,6 +15,7 @@ fn main() {
match task.as_deref() {
// We can add more tasks here
Some("update_package_versions") => update_package_versions(),
#[cfg(feature = "gas_calibration")]
Some("check_gas_cost_definitions") => check_gas_cost_definitions().unwrap(),
_ => panic!("Unknown task"),
}
Expand Down
Loading