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

@@ -5,13 +5,12 @@ edition = "2024"
[dependencies]
async-once-cell = "0.5.4"
async-std = "1.13.0"
async-stream = "0.3.6"
futures = "0.3.31"
hashbrown = "0.15.2"
futures = { version = "0.3.31", features = ["std"] }
hashbrown = "0.16.0"
itertools = "0.14.0"
never = "0.1.0"
once_cell = "1.20.2"
once_cell = "1.21.3"
orchid-api = { version = "0.1.0", path = "../orchid-api" }
orchid-api-derive = { version = "0.1.0", path = "../orchid-api-derive" }
orchid-api-traits = { version = "0.1.0", path = "../orchid-api-traits" }
@@ -20,9 +19,9 @@ orchid-extension = { version = "0.1.0", path = "../orchid-extension", features =
"tokio",
] }
ordered-float = "5.0.0"
rust_decimal = "1.36.0"
rust_decimal = "1.37.2"
substack = "1.1.1"
tokio = { version = "1.43.0", features = ["full"] }
tokio = { version = "1.47.1", features = ["full"] }
[dev-dependencies]
test_executors = "0.3.2"
test_executors = "0.3.5"

View File

@@ -1,7 +1,6 @@
use std::pin::pin;
use async_std::stream;
use futures::{FutureExt, StreamExt};
use futures::{FutureExt, StreamExt, stream};
use hashbrown::HashMap;
use itertools::Itertools;
use orchid_api::Paren;
@@ -54,7 +53,7 @@ impl Parser for LetLine {
pub async fn dealias_mac_v(aliased: Vec<MacTree>, ctx: &ConstCtx, rep: &Reporter) -> Vec<MacTree> {
let keys = glossary_v(&aliased).collect_vec();
let mut names: HashMap<_, _> = HashMap::new();
let mut stream = pin!(ctx.names(&keys).zip(stream::from_iter(&keys)));
let mut stream = pin!(ctx.names(&keys).zip(stream::iter(&keys)));
while let Some((canonical, local)) = stream.next().await {
match canonical {
Err(e) => rep.report(e),
@@ -91,7 +90,7 @@ pub async fn parse_tokv(line: PSnippet<'_>, ctx: &impl ParseCtx) -> Vec<MacTree>
}
async fn parse_tokv_no_lambdas(line: &[PTokTree], ctx: &impl ParseCtx) -> Vec<MacTree> {
stream::from_iter(line).filter_map(|tt| parse_tok(tt, ctx)).collect().await
stream::iter(line).filter_map(|tt| parse_tok(tt, ctx)).collect().await
}
pub async fn parse_tok(tree: &PTokTree, ctx: &impl ParseCtx) -> Option<MacTree> {

View File

@@ -3,8 +3,7 @@ use std::cell::RefCell;
use std::rc::Rc;
use async_once_cell::OnceCell;
use async_std::stream;
use futures::StreamExt;
use futures::{StreamExt, stream};
use hashbrown::{HashMap, HashSet};
use itertools::Itertools;
use never::Never;
@@ -159,7 +158,7 @@ impl Parser for MacroLine {
.get_or_init(async {
let rep = Reporter::new();
let rules = rules.borrow_mut().take().expect("once cell initializer runs");
let rules = stream::from_iter(rules)
let rules = stream::iter(rules)
.then(|(body_name, placeholders, index, pos, pattern_macv)| {
let cctx = &cctx;
let rep = &rep;
@@ -182,7 +181,7 @@ impl Parser for MacroLine {
}
}
})
.flat_map(stream::from_iter)
.flat_map(stream::iter)
.collect::<Vec<_>>()
.await;
let own_kws = keywords.keys().cloned().collect_vec();

View File

@@ -5,6 +5,7 @@ use orchid_base::reqnot::Receipt;
use orchid_extension::atom::{AtomDynfo, AtomicFeatures};
use orchid_extension::entrypoint::ExtReq;
use orchid_extension::lexer::LexerObj;
use orchid_extension::other_system::SystemHandle;
use orchid_extension::parser::ParserObj;
use orchid_extension::system::{System, SystemCard};
use orchid_extension::system_ctor::SystemCtor;
@@ -13,7 +14,7 @@ use orchid_extension::tree::GenMember;
use crate::macros::instantiate_tpl::InstantiateTplCall;
use crate::macros::let_line::LetLine;
use crate::macros::macro_lib::gen_macro_lib;
use crate::macros::macro_line::MacroLine;
use crate::macros::macro_line::{Macro, MacroLine};
use crate::macros::mactree_lexer::MacTreeLexer;
use crate::macros::recur_state::RecurState;
use crate::{MacTree, StdSystem};
@@ -25,13 +26,18 @@ impl SystemCtor for MacroSystem {
type Instance = Self;
const NAME: &'static str = "macros";
const VERSION: f64 = 0.00_01;
fn inst() -> Option<Self::Instance> { Some(Self) }
fn inst(_: SystemHandle<StdSystem>) -> Self::Instance { Self }
}
impl SystemCard for MacroSystem {
type Ctor = Self;
type Req = Never;
fn atoms() -> impl IntoIterator<Item = Option<Box<dyn AtomDynfo>>> {
[Some(InstantiateTplCall::dynfo()), Some(MacTree::dynfo()), Some(RecurState::dynfo())]
[
Some(InstantiateTplCall::dynfo()),
Some(MacTree::dynfo()),
Some(RecurState::dynfo()),
Some(Macro::dynfo()),
]
}
}
impl System for MacroSystem {

View File

@@ -25,7 +25,7 @@ impl SystemCtor for StdSystem {
type Instance = Self;
const NAME: &'static str = "orchid::std";
const VERSION: f64 = 0.00_01;
fn inst() -> Option<Self::Instance> { Some(Self) }
fn inst(_: ()) -> Self::Instance { Self }
}
impl SystemCard for StdSystem {
type Ctor = Self;

View File

@@ -3,7 +3,7 @@ use std::ops::Deref;
use std::pin::Pin;
use std::rc::Rc;
use async_std::io::Write;
use futures::AsyncWrite;
use orchid_api_derive::Coding;
use orchid_api_traits::{Encode, Request};
use orchid_base::error::{OrcRes, mk_errv};
@@ -46,7 +46,7 @@ impl Deref for StrAtom {
impl OwnedAtom for StrAtom {
type Refs = ();
async fn val(&self) -> Cow<'_, Self::Data> { Cow::Owned(()) }
async fn serialize(&self, _: SysCtx, sink: Pin<&mut (impl Write + ?Sized)>) -> Self::Refs {
async fn serialize(&self, _: SysCtx, sink: Pin<&mut (impl AsyncWrite + ?Sized)>) -> Self::Refs {
self.deref().encode(sink).await
}
async fn print_atom<'a>(&'a self, _: &'a (impl FmtCtx + ?Sized + 'a)) -> FmtUnit {
@@ -72,7 +72,7 @@ impl OwnedAtom for IntStrAtom {
async fn print_atom<'a>(&'a self, _: &'a (impl FmtCtx + ?Sized + 'a)) -> FmtUnit {
format!("{:?}i", *self.0).into()
}
async fn serialize(&self, _: SysCtx, write: Pin<&mut (impl Write + ?Sized)>) {
async fn serialize(&self, _: SysCtx, write: Pin<&mut (impl AsyncWrite + ?Sized)>) {
self.0.encode(write).await
}
async fn deserialize(mut ctx: impl DeserializeCtx, _: ()) -> Self {