Skip to content

Commit 4c78144

Browse files
author
Ludo Galabru
committed
feat: add wasm feature flag to clarinet-deployments
1 parent 39c565c commit 4c78144

File tree

19 files changed

+185
-469
lines changed

19 files changed

+185
-469
lines changed

Cargo.lock

Lines changed: 1 addition & 289 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ orchestra_types = { package = "orchestra-types", path = "./vendor/orchestra-type
8484
stacks_rpc_client = { package = "stacks-rpc-client", path = "./vendor/stacks-rpc-client" }
8585
clarinet_files = { package = "clarinet-files", path = "./vendor/clarinet-files" }
8686
clarity_lsp = { package = "clarity-lsp", path = "./vendor/clarity-lsp", features = ["cli"] }
87-
clarinet_deployments = { package = "clarinet-deployments", path = "./vendor/clarinet-deployments", features = ["cli"] }
87+
clarinet_deployments = { package = "clarinet-deployments", path = "./vendor/clarinet-deployments" }
8888
clarinet_utils = { package = "clarinet-utils", path = "./vendor/clarinet-utils" }
8989

9090
num_cpus = "1.13.1"

src/bin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ extern crate serde_json;
1010
mod macros;
1111

1212
mod chainhooks;
13-
mod deployment;
13+
mod deployments;
1414
mod frontend;
1515
mod generate;
1616
mod integrate;
Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ use clarity_repl::clarity::{ClarityName, Value};
99
use reqwest::Url;
1010
pub use ui::start_ui;
1111

12+
use crate::utils;
13+
1214
use clarinet_deployments::types::{
1315
DeploymentGenerationArtifacts, DeploymentSpecification, TransactionSpecification,
1416
};
@@ -230,6 +232,15 @@ pub fn get_default_deployment_path(
230232
Ok(deployment_path)
231233
}
232234

235+
pub fn generate_default_deployment(
236+
manifest: &ProjectManifest,
237+
network: &StacksNetwork,
238+
no_batch: bool,
239+
) -> Result<(DeploymentSpecification, DeploymentGenerationArtifacts), String> {
240+
let future = clarinet_deployments::generate_default_deployment(manifest, network, false);
241+
utils::nestable_block_on(future)
242+
}
243+
233244
pub fn read_deployment_or_generate_default(
234245
manifest: &ProjectManifest,
235246
network: &StacksNetwork,
@@ -247,8 +258,7 @@ pub fn read_deployment_or_generate_default(
247258
None,
248259
)
249260
} else {
250-
let (deployment, artifacts) =
251-
clarinet_deployments::generate_default_deployment(manifest, network, false)?;
261+
let (deployment, artifacts) = generate_default_deployment(manifest, network, false)?;
252262
(deployment, Some(artifacts))
253263
};
254264
Ok((deployment, artifacts))
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::deployment::TransactionTracker;
1+
use crate::deployments::TransactionTracker;
22
use tui::widgets::ListState;
33

44
pub struct StatefulList<T> {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::deployment::TransactionStatus;
1+
use crate::deployments::TransactionStatus;
22

33
use super::App;
44
use tui::{

src/frontend/cli.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
use crate::chainhooks::check_chainhooks;
2-
use crate::deployment::types::DeploymentSynthesis;
3-
use crate::deployment::{
4-
self, apply_on_chain_deployment, check_deployments, get_absolute_deployment_path,
5-
get_default_deployment_path, get_initial_transactions_trackers, load_deployment,
6-
load_deployment_if_exists, write_deployment, DeploymentCommand, DeploymentEvent,
2+
use crate::deployments::types::DeploymentSynthesis;
3+
use crate::deployments::{
4+
self, apply_on_chain_deployment, check_deployments, generate_default_deployment,
5+
get_absolute_deployment_path, get_default_deployment_path, get_initial_transactions_trackers,
6+
load_deployment, load_deployment_if_exists, write_deployment, DeploymentCommand,
7+
DeploymentEvent,
78
};
89
use crate::generate::{
910
self,
@@ -13,8 +14,8 @@ use crate::integrate::{self, DevnetOrchestrator};
1314
use crate::lsp::run_lsp;
1415
use crate::runner::run_scripts;
1516
use crate::runner::DeploymentCache;
17+
use clarinet_deployments::setup_session_with_deployment;
1618
use clarinet_deployments::types::{DeploymentGenerationArtifacts, DeploymentSpecification};
17-
use clarinet_deployments::{generate_default_deployment, setup_session_with_deployment};
1819
use clarinet_files::{FileLocation, ProjectManifest, ProjectManifestFile, RequirementConfig};
1920
use clarity_repl::clarity::analysis::{AnalysisDatabase, ContractAnalysis};
2021
use clarity_repl::clarity::costs::LimitedCostTracker;
@@ -651,7 +652,7 @@ pub fn main() {
651652
}
652653
}
653654
} else {
654-
let res = deployment::start_ui(&node_url, event_rx, transaction_trackers);
655+
let res = deployments::start_ui(&node_url, event_rx, transaction_trackers);
655656
match res {
656657
Ok(()) => println!(
657658
"{} Transactions successfully confirmed on {:?}",

0 commit comments

Comments
 (0)