Skip to content

Commit

Permalink
Release and debug builds
Browse files Browse the repository at this point in the history
  • Loading branch information
andrzejressel committed Aug 25, 2024
1 parent facecee commit 05147ef
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pulumi_wasm_runner/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ async fn main() -> Result<(), Error> {
pulumi_wasm_source.as_ref(),
fs::read(program)
.context(format!("Cannot read program {}", program.to_str().unwrap()))?,
*debug
*debug,
)
.await?;
log::info!("Created final component");
Expand Down
4 changes: 2 additions & 2 deletions pulumi_wasm_runner_component_creator/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use crate::source::{DefaultProviderSource, ProviderSource, PulumiWasmSource};
use anyhow::{bail, Context};
use itertools::Itertools;
use log::info;
use regex::Regex;
use std::collections::{BTreeMap, BTreeSet};
use std::hash::Hash;
use log::{info, log};
use wac_graph::types::{Package, SubtypeChecker};
use wac_graph::{CompositionGraph, EncodeOptions, NodeId, PackageId};

Expand All @@ -17,7 +17,7 @@ pub async fn create(
default_provider_source: &dyn DefaultProviderSource,
pulumi_wasm: &dyn PulumiWasmSource,
program: Vec<u8>,
debug: bool
debug: bool,
) -> anyhow::Result<Vec<u8>> {
let mut graph = CompositionGraph::new();

Expand Down
4 changes: 2 additions & 2 deletions pulumi_wasm_runner_component_creator/src/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ impl PulumiWasmSource for GithubPulumiWasmSource {
download_file_and_cache(wasm_location, &url)
.await
.context(format!(
"Cannot download pulumi-wasm in version {version} with profile {profile}. Url: [{url}]"
))
"Cannot download pulumi-wasm in version {version} with profile {profile}. Url: [{url}]"
))
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ async fn should_combine_wasm_components() -> Result<()> {
&TestDefaultProviderSource {},
&TestProgramSource {},
encoded.clone(),
true,
)
.await
.unwrap();
Expand Down Expand Up @@ -104,6 +105,7 @@ async fn return_error_when_multiple_dependencies_on_the_same_provider_is_found()
&TestDefaultProviderSource {},
&TestProgramSource {},
encoded.clone(),
true,
)
.await
.expect_err("Expected creator to return error");
Expand Down Expand Up @@ -153,6 +155,7 @@ async fn return_error_when_multiple_versions_of_pulumi_wasm_is_found() -> Result
&TestDefaultProviderSource {},
&TestProgramSource {},
encoded.clone(),
true,
)
.await
.expect_err("Expected creator to return error");
Expand Down Expand Up @@ -213,6 +216,7 @@ async fn return_error_when_multiple_versions_of_pulumi_wasm_in_providers_is_foun
&TestDefaultProviderSource {},
&TestProgramSource {},
encoded.clone(),
true,
)
.await
.expect_err("Expected creator to return error");
Expand Down
2 changes: 1 addition & 1 deletion regenerate_providers/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ fn replace_build_wasm_components(providers: &[Provider], content: &str) -> Strin
));
}
replacement.push_str(" --timings\n");
replacement.push_str("\n");
replacement.push('\n');
replacement.push_str("build-wasm-providers-release:\n");
replacement.push_str(" cargo component build \\\n");
for provider in providers {
Expand Down

0 comments on commit 05147ef

Please sign in to comment.