updated all deps

migrated away from paste and async-std
This commit is contained in:
2025-09-03 18:42:54 +02:00
parent 7031f3a7d8
commit 088cb6a247
44 changed files with 569 additions and 456 deletions

View File

@@ -6,14 +6,14 @@ edition = "2024"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
async-lock = "3.4.1"
async-once-cell = "0.5.4"
async-process = "2.3.0"
async-std = "1.13.0"
async-process = "2.4.0"
async-stream = "0.3.6"
bound = "0.6.0"
derive_destructure = "1.0.0"
futures = "0.3.31"
hashbrown = "0.15.2"
futures = { version = "0.3.31", features = ["std"] }
hashbrown = "0.16.0"
itertools = "0.14.0"
lazy_static = "1.5.0"
memo-map = "0.3.3"
@@ -23,7 +23,7 @@ orchid-api = { version = "0.1.0", path = "../orchid-api" }
orchid-api-traits = { version = "0.1.0", path = "../orchid-api-traits" }
orchid-base = { version = "0.1.0", path = "../orchid-base" }
ordered-float = "5.0.0"
paste = "1.0.15"
pastey = "0.1.1"
substack = "1.1.1"
test_executors = "0.3.2"
test_executors = "0.3.5"
trait-set = "0.3.0"

View File

@@ -3,7 +3,7 @@ use std::num::{NonZero, NonZeroU16};
use std::rc::{Rc, Weak};
use std::{fmt, ops};
use async_std::sync::RwLock;
use async_lock::RwLock;
use hashbrown::HashMap;
use orchid_api::SysId;
use orchid_base::builtin::Spawner;

View File

@@ -1,6 +1,6 @@
use std::mem;
use async_std::sync::RwLockWriteGuard;
use async_lock::RwLockWriteGuard;
use bound::Bound;
use futures::FutureExt;
use orchid_base::error::OrcErrv;

View File

@@ -4,7 +4,7 @@ use std::num::NonZeroU64;
use std::rc::{Rc, Weak};
use std::{fmt, mem};
use async_std::sync::RwLock;
use async_lock::RwLock;
use futures::FutureExt;
use hashbrown::HashSet;
use itertools::Itertools;

View File

@@ -5,12 +5,12 @@ use std::num::NonZeroU64;
use std::pin::pin;
use std::rc::{Rc, Weak};
use async_std::channel::{self, Sender};
use async_std::sync::Mutex;
use async_stream::stream;
use derive_destructure::destructure;
use futures::channel::mpsc::{Sender, channel};
use futures::future::{join, join_all};
use futures::{StreamExt, stream};
use futures::lock::Mutex;
use futures::{SinkExt, StreamExt, stream};
use hashbrown::HashMap;
use itertools::Itertools;
use orchid_api_traits::Request;
@@ -45,12 +45,12 @@ pub struct ExtensionData {
next_pars: RefCell<NonZeroU64>,
exprs: ExprStore,
exiting_snd: Sender<()>,
lex_recur: Mutex<HashMap<api::ParsId, channel::Sender<ReqPair<api::SubLex>>>>,
lex_recur: Mutex<HashMap<api::ParsId, Sender<ReqPair<api::SubLex>>>>,
}
impl Drop for ExtensionData {
fn drop(&mut self) {
let reqnot = self.reqnot.clone();
let exiting_snd = self.exiting_snd.clone();
let mut exiting_snd = self.exiting_snd.clone();
(self.ctx.spawn)(Box::pin(async move {
reqnot.notify(api::HostExtNotif::Exit).await;
exiting_snd.send(()).await.unwrap()
@@ -64,7 +64,7 @@ impl Extension {
pub fn new(init: ExtInit, logger: Logger, msg_logger: Logger, ctx: Ctx) -> io::Result<Self> {
Ok(Self(Rc::new_cyclic(|weak: &Weak<ExtensionData>| {
let init = Rc::new(init);
let (exiting_snd, exiting_rcv) = channel::bounded::<()>(1);
let (exiting_snd, exiting_rcv) = channel::<()>(0);
(ctx.spawn)(clone!(init, weak, ctx; Box::pin(async move {
let rcv_stream = stream! { loop { yield init.recv().await } };
let mut event_stream = pin!(stream::select(exiting_rcv.map(|()| None), rcv_stream));
@@ -147,13 +147,14 @@ impl Extension {
hand.handle(fw, &sys.request(body.clone()).await).await
},
api::ExtHostReq::SubLex(sl) => {
let (rep_in, rep_out) = channel::bounded(1);
let (rep_in, mut rep_out) = channel(0);
{
let lex_g = this.0.lex_recur.lock().await;
let req_in = lex_g.get(&sl.id).expect("Sublex for nonexistent lexid");
let mut req_in =
lex_g.get(&sl.id).cloned().expect("Sublex for nonexistent lexid");
req_in.send(ReqPair(sl.clone(), rep_in)).await.unwrap();
}
hand.handle(&sl, &rep_out.recv().await.unwrap()).await
hand.handle(&sl, &rep_out.next().await.unwrap()).await
},
api::ExtHostReq::ExprReq(api::ExprReq::Inspect(
ins @ api::Inspect { target },
@@ -265,7 +266,7 @@ impl Extension {
// get unique lex ID
let id = api::ParsId(self.next_pars());
// create and register channel
let (req_in, req_out) = channel::bounded(1);
let (req_in, mut req_out) = channel(0);
self.0.lex_recur.lock().await.insert(id, req_in); // lex_recur released
let (ret, ()) = join(
async {
@@ -277,7 +278,7 @@ impl Extension {
res
},
async {
while let Ok(ReqPair(sublex, rep_in)) = req_out.recv().await {
while let Some(ReqPair(sublex, mut rep_in)) = req_out.next().await {
(rep_in.send(r(sublex.pos).await).await)
.expect("Response channel dropped while request pending")
}

View File

@@ -1,7 +1,7 @@
use std::rc::Rc;
use async_std::sync::Mutex;
use futures::FutureExt;
use futures::lock::Mutex;
use orchid_base::error::{OrcErrv, OrcRes, mk_errv};
use orchid_base::interner::Tok;
use orchid_base::location::SrcRange;

View File

@@ -1,12 +1,12 @@
use std::cell::RefCell;
use std::io::Write;
use std::io::{self, Write};
use std::pin::Pin;
use async_process::{self, Child, ChildStdin, ChildStdout};
use async_std::io::{self, BufReadExt, BufReader};
use async_std::sync::Mutex;
use futures::AsyncWriteExt;
use futures::future::LocalBoxFuture;
use futures::io::BufReader;
use futures::lock::Mutex;
use futures::{self, AsyncBufReadExt, AsyncWriteExt};
use orchid_api_traits::{Decode, Encode};
use orchid_base::builtin::{ExtInit, ExtPort};
use orchid_base::logging::Logger;

View File

@@ -4,8 +4,8 @@ use std::cell::RefCell;
use std::rc::{Rc, Weak};
use std::slice;
use async_lock::RwLock;
use async_once_cell::OnceCell;
use async_std::sync::RwLock;
use futures::{FutureExt, StreamExt, stream};
use hashbrown::HashMap;
use hashbrown::hash_map::Entry;