diff --git a/workspaces/Cargo.toml b/workspaces/Cargo.toml index 35a8d216..9702f188 100644 --- a/workspaces/Cargo.toml +++ b/workspaces/Cargo.toml @@ -14,7 +14,7 @@ async-trait = "0.1" base64 = "0.22" bs58 = "0.5" cargo_metadata = { version = "0.18", optional = true } -cargo-near = { version = "0.8", default-features = false } +cargo-near-build = { version = "0.1.0" } chrono = "0.4.19" fs2 = "0.4" rand = "0.8.4" diff --git a/workspaces/src/cargo/mod.rs b/workspaces/src/cargo/mod.rs index 325e1ebd..517bfd92 100644 --- a/workspaces/src/cargo/mod.rs +++ b/workspaces/src/cargo/mod.rs @@ -14,30 +14,23 @@ pub async fn compile_project(project_path: &str) -> crate::Result> { _ => ErrorKind::Io.custom(e), })?; - let cargo_opts = cargo_near::BuildOpts { - no_release: false, - no_embed_abi: false, + // `no_abi` has become flipped true -> false + let cargo_opts = cargo_near_build::BuildOpts { no_locked: true, - no_doc: true, - color: None, - no_abi: true, - out_dir: None, manifest_path: Some( - cargo_near::types::utf8_path_buf::Utf8PathBuf::from_path_buf( - project_path.join("Cargo.toml"), - ) - .map_err(|error_path| { + cargo_near_build::camino::Utf8PathBuf::from_path_buf(project_path.join("Cargo.toml")) + .map_err(|error_path| { ErrorKind::Io.custom(format!( "Unable to construct UTF-8 path from: {}", error_path.display() )) })?, ), - features: None, - no_default_features: false, + ..Default::default() }; - let compile_artifact = cargo_near::build(cargo_opts).map_err(|e| ErrorKind::Io.custom(e))?; + let compile_artifact = + cargo_near_build::build(cargo_opts).map_err(|e| ErrorKind::Io.custom(e))?; let file = compile_artifact .path