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

await compose runner messages #2156

Merged
Merged
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
5 changes: 4 additions & 1 deletion src/command/supergraph/compose/do_compose.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ use semver::Version;
use serde::Serialize;
use std::io::Read;
use tempfile::NamedTempFile;
use tokio::join;
use tokio_stream::StreamExt;

use rover_client::shared::GraphRef;
Expand Down Expand Up @@ -195,12 +196,14 @@ impl Compose {
let runner =
crate::composition::runner::Runner::new(supergraph_config, supergraph_binary);
let mut messages = runner.run().await?;
tokio::task::spawn(async move {
let join_handle = tokio::task::spawn(async move {
while let Some(message) = messages.next().await {
eprintln!("{:?}", message);
}
});

join!(join_handle).0?;

return Ok(RoverOutput::EmptySuccess);
}
let mut supergraph_config = get_supergraph_config(
Expand Down