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

Wait for webc, bindings, exe generation during package-publish with --wait flag #4352

Merged
merged 10 commits into from
Jan 4, 2024
96 changes: 92 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions lib/cli/src/commands/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,14 @@ pub struct Publish {
///
/// Note that this is not the timeout for the entire publish process, but
/// for each individual query to the registry during the publish flow.
#[clap(long, default_value = "30s")]
#[clap(long, default_value = "2m")]
Michael-F-Bryan marked this conversation as resolved.
Show resolved Hide resolved
pub timeout: humantime::Duration,
}

impl Publish {
/// Executes `wasmer publish`
pub fn execute(&self) -> Result<(), anyhow::Error> {
#[tokio::main]
pub async fn execute(&self) -> Result<(), anyhow::Error> {
let token = self
.env
.token()
Expand All @@ -58,7 +59,7 @@ impl Publish {
wait: self.wait,
timeout: self.timeout.into(),
};
publish.execute().map_err(on_error)?;
publish.execute().await.map_err(on_error)?;

if let Err(e) = invalidate_graphql_query_cache(&self.env) {
tracing::warn!(
Expand Down
7 changes: 5 additions & 2 deletions lib/registry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ dialoguer = "0.11.0"
dirs = "4.0.0"
filetime = "0.2.19"
flate2 = "1.0.24"
futures = "0.3"
futures-util = "0.3.25"
graphql_client = "0.11.0"
graphql-ws-client = {version = "0.6.0", features = ["client-graphql-client"]}
graphql_client = "0.13.0"
hex = "0.4.3"
indexmap = { version = "1.9.3", optional = true }
indicatif = "0.17.2"
Expand All @@ -41,7 +43,8 @@ tempfile = "3.6.0"
thiserror = "1.0.37"
time = { version = "0.3.17", default-features = false, features = ["parsing", "std", "formatting"], optional = true }
tldextract = "0.6.0"
tokio = "1.24.0"
tokio = {version = "1"}
tokio-tungstenite = {version = "0.20", features = ["rustls-tls-native-roots"]}
toml = "0.5.9"
tracing = "0.1.40"
url = "2.3.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ mutation PublishPackageMutationChunked(
) {
success
packageVersion {
id
version
}
}
Expand Down
Loading
Loading