Skip to content

Commit

Permalink
Merge pull request #316 from boozook/fix-cargo-run-wrong-ctx
Browse files Browse the repository at this point in the history
Fix use async `tokio-serial` in incorrect context
  • Loading branch information
boozook authored Apr 18, 2024
2 parents a2d3649 + a315995 commit e334325
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion Cargo.lock

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

3 changes: 2 additions & 1 deletion cargo/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cargo-playdate"
version = "0.4.3"
version = "0.4.4"
readme = "README.md"
description = "Build tool for neat yellow console."
keywords = ["playdate", "build", "cargo", "plugin", "cargo-subcommand"]
Expand Down Expand Up @@ -53,6 +53,7 @@ env_logger.workspace = true
log.workspace = true

futures-lite.workspace = true
async-std = { version = "1.12", features = ["tokio1"] }


[dependencies.build]
Expand Down
7 changes: 3 additions & 4 deletions cargo/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ fn execute(config: &Config) -> CargoResult<()> {

// run:
{
use futures_lite::future::block_on;
use device::run::run as run_dev;
use simulator::run::run as run_sim;

Expand All @@ -212,12 +211,12 @@ fn execute(config: &Config) -> CargoResult<()> {
let pdx = package.path.to_owned();
let no_install = false;
let no_read = config.no_read;
let force = false;
let force = true;
let fut = run_dev(query, pdx, no_install, no_read, force);
block_on(fut)?;
async_std::task::block_on(fut)?;
} else {
let fut = run_sim(&package.path, config.sdk_path.as_deref());
block_on(fut)?;
futures_lite::future::block_on(fut)?;
};
}

Expand Down

0 comments on commit e334325

Please sign in to comment.