git.delta.rocks / jrsonnet / refs/commits / 101b513c0b09

difftreelog

build use now-stable async traits

Petr Portnov2023-10-29parent: #fd582d4.patch.diff
in: master

5 files changed

modifiedCargo.lockdiffbeforeafterboth
111 "smallvec",111 "smallvec",
112]112]
113
114[[package]]
115name = "async-trait"
116version = "0.1.74"
117source = "registry+https://github.com/rust-lang/crates.io-index"
118checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9"
119dependencies = [
120 "proc-macro2",
121 "quote",
122 "syn 2.0.38",
123]
124113
125[[package]]114[[package]]
126name = "autocfg"115name = "autocfg"
598dependencies = [587dependencies = [
599 "annotate-snippets",588 "annotate-snippets",
600 "anyhow",589 "anyhow",
601 "async-trait",
602 "bincode",590 "bincode",
603 "derivative",591 "derivative",
604 "hashbrown 0.14.2",592 "hashbrown 0.14.2",
modifiedCargo.tomldiffbeforeafterboth
35rustc-hash = "1.1"35rustc-hash = "1.1"
36bincode = "1.3"36bincode = "1.3"
37annotate-snippets = "0.9.1"37annotate-snippets = "0.9.1"
38async-trait = "0.1.60"
39num-bigint = "0.4.3"38num-bigint = "0.4.3"
40derivative = "2.2.0"39derivative = "2.2.0"
41strsim = "0.10.0"40strsim = "0.10.0"
modifiedcrates/jrsonnet-evaluator/Cargo.tomldiffbeforeafterboth
14# Allows library authors to throw custom errors14# Allows library authors to throw custom errors
15anyhow-error = ["anyhow"]15anyhow-error = ["anyhow"]
16# Adds ability to build import closure in async16# Adds ability to build import closure in async
17async-import = ["async-trait"]17async-import = []
1818
19# Allows to preserve field order in objects19# Allows to preserve field order in objects
20exp-preserve-order = []20exp-preserve-order = []
54bincode = { workspace = true, optional = true }54bincode = { workspace = true, optional = true }
55# Explaining traces55# Explaining traces
56annotate-snippets = { workspace = true, features = ["color"], optional = true }56annotate-snippets = { workspace = true, features = ["color"], optional = true }
57# Async imports
58async-trait = { workspace = true, optional = true }
59# Bigint57# Bigint
60num-bigint = { workspace = true, features = ["serde"], optional = true }58num-bigint = { workspace = true, features = ["serde"], optional = true }
61derivative.workspace = true59derivative.workspace = true
modifiedcrates/jrsonnet-evaluator/src/async_import.rsdiffbeforeafterboth
1use std::{cell::RefCell, path::Path};1use std::{cell::RefCell, path::Path};
22
3use async_trait::async_trait;
4use jrsonnet_gcmodule::Trace;3use jrsonnet_gcmodule::Trace;
5use jrsonnet_interner::IStr;4use jrsonnet_interner::IStr;
6use jrsonnet_parser::{5use jrsonnet_parser::{
218 }217 }
219}218}
220219
221#[async_trait(?Send)]220#[allow(async_fn_in_trait)] // we don't care about `Send` bound
222pub trait AsyncImportResolver {221pub trait AsyncImportResolver {
223 type Error;222 type Error;
224 /// Resolves file path, e.g. `(/home/user/manifests, b.libjsonnet)` can correspond223 /// Resolves file path, e.g. `(/home/user/manifests, b.libjsonnet)` can correspond
addedrust-toolchain.tomldiffbeforeafterboth

no changes