chore: use resolver 2 and 2021 edition (#769)

This commit is contained in:
Mike Voronov 2023-12-18 18:48:46 +03:00 committed by GitHub
parent 771d42dec4
commit 0a8827bb3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
39 changed files with 38 additions and 56 deletions

View File

@ -1,4 +1,5 @@
[workspace] [workspace]
resolver = "2"
members = [ members = [
"air", "air",
"air-interpreter", "air-interpreter",

View File

@ -3,7 +3,7 @@ name = "air-interpreter"
version = "0.55.0" version = "0.55.0"
description = "Crate-wrapper for air" description = "Crate-wrapper for air"
authors = ["Fluence Labs"] authors = ["Fluence Labs"]
edition = "2018" edition = "2021"
publish = false publish = false
keywords = ["fluence", "air", "webassembly", "programming-language"] keywords = ["fluence", "air", "webassembly", "programming-language"]
categories = ["wasm"] categories = ["wasm"]

View File

@ -3,7 +3,7 @@ name = "aquavm-air"
version = "0.55.0" version = "0.55.0"
description = "Interpreter of AIR scripts intended to coordinate request flow in the Fluence network" description = "Interpreter of AIR scripts intended to coordinate request flow in the Fluence network"
authors = ["Fluence Labs"] authors = ["Fluence Labs"]
edition = "2018" edition = "2021"
license = "Apache-2.0" license = "Apache-2.0"
repository = "https://github.com/fluencelabs/aquavm" repository = "https://github.com/fluencelabs/aquavm"
documentation = "https://docs.rs/aquavm-air" documentation = "https://docs.rs/aquavm-air"

View File

@ -33,7 +33,6 @@ use air_lambda_parser::ValueAccessor;
use non_empty_vec::NonEmpty; use non_empty_vec::NonEmpty;
use std::borrow::Cow; use std::borrow::Cow;
use std::convert::TryFrom;
use std::ops::Deref; use std::ops::Deref;
use std::rc::Rc; use std::rc::Rc;

View File

@ -125,8 +125,6 @@ fn try_jvalue_as_idx(jvalue: &JValue) -> LambdaResult<u32> {
} }
fn try_number_to_u32(accessor: &serde_json::Number) -> LambdaResult<u32> { fn try_number_to_u32(accessor: &serde_json::Number) -> LambdaResult<u32> {
use std::convert::TryFrom;
accessor accessor
.as_u64() .as_u64()
.and_then(|v| u32::try_from(v).ok()) .and_then(|v| u32::try_from(v).ok())

View File

@ -34,7 +34,6 @@ pub use lambda_applier::LambdaError;
pub mod errors_prelude { pub mod errors_prelude {
pub use super::CatchableError; pub use super::CatchableError;
pub use super::ExecutionError;
pub use super::UncatchableError; pub use super::UncatchableError;
} }

View File

@ -171,8 +171,6 @@ pub enum Generation {
impl Generation { impl Generation {
#[cfg(test)] #[cfg(test)]
pub fn previous(generation_id: u32) -> Self { pub fn previous(generation_id: u32) -> Self {
use std::convert::TryFrom;
let generation_id = usize::try_from(generation_id).unwrap(); let generation_id = usize::try_from(generation_id).unwrap();
let generation_idx = GenerationIdx::from(generation_id); let generation_idx = GenerationIdx::from(generation_id);
Self::Previous(generation_idx) Self::Previous(generation_idx)
@ -180,8 +178,6 @@ impl Generation {
#[cfg(test)] #[cfg(test)]
pub fn current(generation_id: u32) -> Self { pub fn current(generation_id: u32) -> Self {
use std::convert::TryFrom;
let generation_id = usize::try_from(generation_id).unwrap(); let generation_id = usize::try_from(generation_id).unwrap();
let generation_idx = GenerationIdx::from(generation_id); let generation_idx = GenerationIdx::from(generation_id);
Self::Current(generation_idx) Self::Current(generation_idx)

View File

@ -45,6 +45,9 @@ pub use execution_step::execution_context::no_error;
pub use execution_step::execution_context::no_error_object; pub use execution_step::execution_context::no_error_object;
pub use execution_step::execution_context::ExecutionCidState; pub use execution_step::execution_context::ExecutionCidState;
pub use execution_step::execution_context::InstructionError; pub use execution_step::execution_context::InstructionError;
pub use execution_step::execution_context::ERROR_CODE_FIELD_NAME;
pub use execution_step::execution_context::INSTRUCTION_FIELD_NAME;
pub use execution_step::execution_context::MESSAGE_FIELD_NAME;
pub use execution_step::execution_context::NO_ERROR_ERROR_CODE; pub use execution_step::execution_context::NO_ERROR_ERROR_CODE;
pub use execution_step::execution_context::NO_ERROR_MESSAGE; pub use execution_step::execution_context::NO_ERROR_MESSAGE;
pub use execution_step::CatchableError; pub use execution_step::CatchableError;

View File

@ -33,8 +33,6 @@ use air_parser::ast::Instruction;
use air_utils::measure; use air_utils::measure;
use fluence_keypair::KeyFormat; use fluence_keypair::KeyFormat;
use std::convert::TryFrom;
type PreparationResult<T> = Result<T, PreparationError>; type PreparationResult<T> = Result<T, PreparationError>;
/// Represents result of the preparation_step step. /// Represents result of the preparation_step step.

View File

@ -24,14 +24,14 @@ dependencies = [
[[package]] [[package]]
name = "air-execution-info-collector" name = "air-execution-info-collector"
version = "0.7.10" version = "0.7.11"
dependencies = [ dependencies = [
"aquavm-air-parser", "aquavm-air-parser",
] ]
[[package]] [[package]]
name = "air-interpreter-cid" name = "air-interpreter-cid"
version = "0.6.0" version = "0.7.0"
dependencies = [ dependencies = [
"blake3", "blake3",
"cid", "cid",
@ -46,7 +46,7 @@ dependencies = [
[[package]] [[package]]
name = "air-interpreter-data" name = "air-interpreter-data"
version = "0.14.0" version = "0.15.0"
dependencies = [ dependencies = [
"air-interpreter-cid", "air-interpreter-cid",
"air-interpreter-signatures", "air-interpreter-signatures",
@ -66,7 +66,7 @@ dependencies = [
[[package]] [[package]]
name = "air-interpreter-interface" name = "air-interpreter-interface"
version = "0.15.1" version = "0.15.2"
dependencies = [ dependencies = [
"serde", "serde",
"serde_json", "serde_json",
@ -74,7 +74,7 @@ dependencies = [
[[package]] [[package]]
name = "air-interpreter-signatures" name = "air-interpreter-signatures"
version = "0.1.4" version = "0.1.5"
dependencies = [ dependencies = [
"air-interpreter-cid", "air-interpreter-cid",
"borsh", "borsh",
@ -113,7 +113,7 @@ version = "0.1.0"
[[package]] [[package]]
name = "air-trace-handler" name = "air-trace-handler"
version = "0.5.7" version = "0.5.8"
dependencies = [ dependencies = [
"air-interpreter-cid", "air-interpreter-cid",
"air-interpreter-data", "air-interpreter-data",
@ -149,7 +149,7 @@ dependencies = [
[[package]] [[package]]
name = "aquavm-air" name = "aquavm-air"
version = "0.54.0" version = "0.55.0"
dependencies = [ dependencies = [
"air-execution-info-collector", "air-execution-info-collector",
"air-interpreter-cid", "air-interpreter-cid",
@ -181,7 +181,7 @@ dependencies = [
[[package]] [[package]]
name = "aquavm-air-parser" name = "aquavm-air-parser"
version = "0.10.0" version = "0.11.0"
dependencies = [ dependencies = [
"air-lambda-ast", "air-lambda-ast",
"air-lambda-parser", "air-lambda-parser",

View File

@ -2,7 +2,7 @@
name = "auth_module" name = "auth_module"
version = "0.1.0" version = "0.1.0"
authors = ["Fluence Labs"] authors = ["Fluence Labs"]
edition = "2018" edition = "2021"
[[bin]] [[bin]]
name = "auth_module" name = "auth_module"

View File

@ -2,7 +2,7 @@
name = "log_storage" name = "log_storage"
version = "0.1.0" version = "0.1.0"
authors = ["Fluence Labs"] authors = ["Fluence Labs"]
edition = "2018" edition = "2021"
[[bin]] [[bin]]
name = "log_storage" name = "log_storage"

View File

@ -52,7 +52,7 @@ fn par_ap_behaviour() {
let client_result_1 = engine.execute_one(client_name).unwrap(); let client_result_1 = engine.execute_one(client_name).unwrap();
assert_next_pks!( assert_next_pks!(
&client_result_1.next_peer_pks, &client_result_1.next_peer_pks,
[relay_id.as_str(), variable_setter_id.as_str()] &[relay_id.as_str(), variable_setter_id.as_str()]
); );
let setter_result = engine.execute_one(variable_setter_name).unwrap(); let setter_result = engine.execute_one(variable_setter_name).unwrap();

View File

@ -3,7 +3,7 @@ name = "avm-interface"
description = "Fluence AIR VM interfacing" description = "Fluence AIR VM interfacing"
version = "0.29.3" version = "0.29.3"
authors = ["Fluence Labs"] authors = ["Fluence Labs"]
edition = "2018" edition = "2021"
license = "Apache-2.0" license = "Apache-2.0"
documentation = "https://docs.rs/avm-interface" documentation = "https://docs.rs/avm-interface"
repository = "https://github.com/fluencelabs/aquavm/tree/master/avm/interface" repository = "https://github.com/fluencelabs/aquavm/tree/master/avm/interface"

View File

@ -3,7 +3,7 @@ name = "avm-server"
description = "Fluence AIR VM" description = "Fluence AIR VM"
version = "0.33.4" version = "0.33.4"
authors = ["Fluence Labs"] authors = ["Fluence Labs"]
edition = "2018" edition = "2021"
license = "Apache-2.0" license = "Apache-2.0"
documentation = "https://docs.rs/avm-server" documentation = "https://docs.rs/avm-server"
repository = "https://github.com/fluencelabs/aquavm/tree/master/avm/server" repository = "https://github.com/fluencelabs/aquavm/tree/master/avm/server"

View File

@ -3,7 +3,7 @@ name = "aquavm-air-parser"
description = "Parser of the AIR scripts in a form of string to AST" description = "Parser of the AIR scripts in a form of string to AST"
version = "0.11.0" version = "0.11.0"
authors = ["Fluence Labs"] authors = ["Fluence Labs"]
edition = "2018" edition = "2021"
license = "Apache-2.0" license = "Apache-2.0"
documentation = "https://docs.rs/air-parser" documentation = "https://docs.rs/air-parser"
repository = "https://github.com/fluencelabs/aquavm" repository = "https://github.com/fluencelabs/aquavm"

View File

@ -3,7 +3,7 @@ name = "air-execution-info-collector"
version = "0.7.11" version = "0.7.11"
description = "Implementation of AIR execution info collector" description = "Implementation of AIR execution info collector"
authors = ["Fluence Labs"] authors = ["Fluence Labs"]
edition = "2018" edition = "2021"
license = "Apache-2.0" license = "Apache-2.0"
repository = "https://github.com/fluencelabs/aquavm" repository = "https://github.com/fluencelabs/aquavm"
documentation = "https://docs.rs/air-execution-info-collector" documentation = "https://docs.rs/air-execution-info-collector"

View File

@ -3,7 +3,7 @@ name = "air-interpreter-cid"
description = "AIR interpreter CID util module" description = "AIR interpreter CID util module"
version = "0.7.0" version = "0.7.0"
authors = ["Fluence Labs"] authors = ["Fluence Labs"]
edition = "2018" edition = "2021"
license = "Apache-2.0" license = "Apache-2.0"
documentation = "https://docs.rs/air-interpreter-cid" documentation = "https://docs.rs/air-interpreter-cid"
repository = "https://github.com/fluencelabs/aquavm/tree/master/crates/air-lib/interpreter-cid" repository = "https://github.com/fluencelabs/aquavm/tree/master/crates/air-lib/interpreter-cid"

View File

@ -3,7 +3,7 @@ name = "air-interpreter-data"
description = "Data format of the AIR interpreter" description = "Data format of the AIR interpreter"
version = "0.15.0" version = "0.15.0"
authors = ["Fluence Labs"] authors = ["Fluence Labs"]
edition = "2018" edition = "2021"
license = "Apache-2.0" license = "Apache-2.0"
repository = "https://github.com/fluencelabs/aquavm" repository = "https://github.com/fluencelabs/aquavm"
documentation = "https://docs.rs/air-interpreter-data" documentation = "https://docs.rs/air-interpreter-data"

View File

@ -21,8 +21,6 @@ use newtype_derive::*;
use serde::Deserialize; use serde::Deserialize;
use serde::Serialize; use serde::Serialize;
use std::convert::TryFrom;
pub type PosType = u32; pub type PosType = u32;
#[derive(Copy, Clone, Default, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)] #[derive(Copy, Clone, Default, PartialEq, Eq, PartialOrd, Ord, Hash, Serialize, Deserialize)]

View File

@ -3,7 +3,7 @@ name = "air-interpreter-interface"
description = "Interface of the AIR interpreter" description = "Interface of the AIR interpreter"
version = "0.15.2" version = "0.15.2"
authors = ["Fluence Labs"] authors = ["Fluence Labs"]
edition = "2018" edition = "2021"
license = "Apache-2.0" license = "Apache-2.0"
documentation = "https://docs.rs/air-interpreter-interface" documentation = "https://docs.rs/air-interpreter-interface"
repository = "https://github.com/fluencelabs/aquavm/tree/master/crates/air-lib/interpreter-interface" repository = "https://github.com/fluencelabs/aquavm/tree/master/crates/air-lib/interpreter-interface"

View File

@ -3,7 +3,7 @@ name = "air-interpreter-signatures"
description = "AIR interpreter signatures util module" description = "AIR interpreter signatures util module"
version = "0.1.5" version = "0.1.5"
authors = ["Fluence Labs"] authors = ["Fluence Labs"]
edition = "2018" edition = "2021"
license = "Apache-2.0" license = "Apache-2.0"
documentation = "https://docs.rs/air-interpreter-signatures" documentation = "https://docs.rs/air-interpreter-signatures"
repository = "https://github.com/fluencelabs/aquavm/tree/master/crates/air-lib/interpreter-signatures" repository = "https://github.com/fluencelabs/aquavm/tree/master/crates/air-lib/interpreter-signatures"

View File

@ -39,7 +39,6 @@ use borsh::BorshSerialize;
use fluence_keypair::error::SigningError; use fluence_keypair::error::SigningError;
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use std::convert::TryFrom;
use std::hash::Hash; use std::hash::Hash;
use std::ops::Deref; use std::ops::Deref;

View File

@ -3,7 +3,7 @@ name = "air-lambda-ast"
description = "Definition of the AIR lambda AST" description = "Definition of the AIR lambda AST"
version = "0.1.0" version = "0.1.0"
authors = ["Fluence Labs"] authors = ["Fluence Labs"]
edition = "2018" edition = "2021"
license = "Apache-2.0" license = "Apache-2.0"
repository = "https://github.com/fluencelabs/aquavm" repository = "https://github.com/fluencelabs/aquavm"
documentation = "https://docs.rs/air-lambda-ast" documentation = "https://docs.rs/air-lambda-ast"

View File

@ -21,8 +21,6 @@ use crate::ValueAccessor;
pub use non_empty_vec::EmptyError; pub use non_empty_vec::EmptyError;
use non_empty_vec::NonEmpty; use non_empty_vec::NonEmpty;
use std::convert::TryFrom;
impl<'input> LambdaAST<'input> { impl<'input> LambdaAST<'input> {
pub fn try_from_accessors(accessors: Vec<ValueAccessor<'input>>) -> Result<Self, EmptyError> { pub fn try_from_accessors(accessors: Vec<ValueAccessor<'input>>) -> Result<Self, EmptyError> {
let value_path = NonEmpty::try_from(accessors)?; let value_path = NonEmpty::try_from(accessors)?;

View File

@ -3,7 +3,7 @@ name = "air-lambda-parser"
description = "Parser of an AIR lambda" description = "Parser of an AIR lambda"
version = "0.1.0" version = "0.1.0"
authors = ["Fluence Labs"] authors = ["Fluence Labs"]
edition = "2018" edition = "2021"
license = "Apache-2.0" license = "Apache-2.0"
repository = "https://github.com/fluencelabs/aquavm" repository = "https://github.com/fluencelabs/aquavm"
documentation = "https://docs.rs/air-lambda-parser" documentation = "https://docs.rs/air-lambda-parser"

View File

@ -22,9 +22,6 @@ use crate::Functor;
use crate::LambdaAST; use crate::LambdaAST;
use crate::ValueAccessor; use crate::ValueAccessor;
use std::convert::TryFrom;
use std::convert::TryInto;
// Caching parser to cache internal regexes, which are expensive to instantiate // Caching parser to cache internal regexes, which are expensive to instantiate
// See also https://github.com/lalrpop/lalrpop/issues/269 // See also https://github.com/lalrpop/lalrpop/issues/269
thread_local!(static PARSER: RawLambdaASTParser = RawLambdaASTParser::new()); thread_local!(static PARSER: RawLambdaASTParser = RawLambdaASTParser::new());

View File

@ -3,7 +3,7 @@ name = "air-log-targets"
version = "0.1.0" version = "0.1.0"
description = "Definition of global consts used for logging" description = "Definition of global consts used for logging"
authors = ["Fluence Labs"] authors = ["Fluence Labs"]
edition = "2018" edition = "2021"
license = "Apache-2.0" license = "Apache-2.0"
repository = "https://github.com/fluencelabs/aquavm" repository = "https://github.com/fluencelabs/aquavm"
documentation = "https://docs.rs/air-log-targets" documentation = "https://docs.rs/air-log-targets"

View File

@ -3,7 +3,7 @@ name = "polyplets"
version = "0.5.1" version = "0.5.1"
description = "Security primitives to verify origin of service calls in Fluence network" description = "Security primitives to verify origin of service calls in Fluence network"
authors = ["Fluence Labs"] authors = ["Fluence Labs"]
edition = "2018" edition = "2021"
license = "Apache-2.0" license = "Apache-2.0"
documentation = "https://docs.rs/polyplets" documentation = "https://docs.rs/polyplets"
repository = "https://github.com/fluencelabs/aquavm/tree/master/crates/air-lib/polyplets" repository = "https://github.com/fluencelabs/aquavm/tree/master/crates/air-lib/polyplets"

View File

@ -3,7 +3,7 @@ name = "air-test-utils"
version = "0.13.0" version = "0.13.0"
description = "Test utils for the AIR interpreter" description = "Test utils for the AIR interpreter"
authors = ["Fluence Labs"] authors = ["Fluence Labs"]
edition = "2018" edition = "2021"
license = "Apache-2.0" license = "Apache-2.0"
repository = "https://github.com/fluencelabs/aquavm" repository = "https://github.com/fluencelabs/aquavm"
documentation = "https://docs.rs/air-test-utils" documentation = "https://docs.rs/air-test-utils"

View File

@ -25,7 +25,6 @@ use rand_chacha::rand_core::SeedableRng;
// Should be moved to test lib when keypair interface PR is merged. // Should be moved to test lib when keypair interface PR is merged.
pub fn derive_dummy_keypair(seed: &str) -> (KeyPair, String) { pub fn derive_dummy_keypair(seed: &str) -> (KeyPair, String) {
use sha2::{Digest as _, Sha256}; use sha2::{Digest as _, Sha256};
use std::convert::TryFrom;
let mut rng = { let mut rng = {
let mut hasher = Sha256::new(); let mut hasher = Sha256::new();

View File

@ -47,9 +47,6 @@ pub mod prelude {
pub use executed_state::*; pub use executed_state::*;
pub use test_runner::*; pub use test_runner::*;
pub use air::interpreter_data::*;
pub use avm_server::*;
pub use serde_json::json; pub use serde_json::json;
} }
@ -132,7 +129,7 @@ macro_rules! assert_next_pks {
($expected:expr, $actual:expr) => { ($expected:expr, $actual:expr) => {
let expected: std::collections::HashSet<_> = let expected: std::collections::HashSet<_> =
$expected.into_iter().map(|s| s.as_str()).collect(); $expected.into_iter().map(|s| s.as_str()).collect();
let actual: std::collections::HashSet<_> = $actual.into_iter().map(|s| *s).collect(); let actual: std::collections::HashSet<_> = $actual.iter().map(|s| *s).collect();
assert_eq!(expected, actual) assert_eq!(expected, actual)
}; };

View File

@ -3,7 +3,7 @@ name = "air-trace-handler"
version = "0.5.8" version = "0.5.8"
description = "Implementation of AIR trace handler" description = "Implementation of AIR trace handler"
authors = ["Fluence Labs"] authors = ["Fluence Labs"]
edition = "2018" edition = "2021"
license = "Apache-2.0" license = "Apache-2.0"
keywords = ["fluence", "air", "webassembly", "programming-language"] keywords = ["fluence", "air", "webassembly", "programming-language"]
categories = ["wasm"] categories = ["wasm"]

View File

@ -3,7 +3,7 @@ name = "air-utils"
version = "0.2.0" version = "0.2.0"
description = "AIR helper funcitions and macros" description = "AIR helper funcitions and macros"
authors = ["Fluence Labs"] authors = ["Fluence Labs"]
edition = "2018" edition = "2021"
license = "Apache-2.0" license = "Apache-2.0"
keywords = ["fluence", "air", "webassembly", "programming-language"] keywords = ["fluence", "air", "webassembly", "programming-language"]
categories = ["wasm"] categories = ["wasm"]

View File

@ -3,7 +3,7 @@ name = "air-beautifier"
version = "0.4.0" version = "0.4.0"
description = "AIR human-readable format transformer library" description = "AIR human-readable format transformer library"
authors = ["Fluence Labs"] authors = ["Fluence Labs"]
edition = "2018" edition = "2021"
license = "Apache-2.0" license = "Apache-2.0"
repository = "https://github.com/fluencelabs/aquavm" repository = "https://github.com/fluencelabs/aquavm"
documentation = "https://docs.rs/air-beautifier" documentation = "https://docs.rs/air-beautifier"

View File

@ -3,7 +3,7 @@ name = "avm-data-store"
version = "0.7.3" version = "0.7.3"
description = "Definition of the AVM DataStore trait" description = "Definition of the AVM DataStore trait"
authors = ["Fluence Labs"] authors = ["Fluence Labs"]
edition = "2018" edition = "2021"
license = "Apache-2.0" license = "Apache-2.0"
documentation = "https://docs.rs/avm-data-store" documentation = "https://docs.rs/avm-data-store"
repository = "https://github.com/fluencelabs/aquavm/tree/master/crates/data-store" repository = "https://github.com/fluencelabs/aquavm/tree/master/crates/data-store"

View File

@ -4,7 +4,7 @@ version = "0.55.0"
description = "Distribution of AIR interpreter as .wasm" description = "Distribution of AIR interpreter as .wasm"
authors = ["Fluence Labs"] authors = ["Fluence Labs"]
license = "Apache-2.0" license = "Apache-2.0"
edition = "2018" edition = "2021"
include = [ include = [
"**/*.rs", "**/*.rs",
"Cargo.toml", "Cargo.toml",

View File

@ -3,7 +3,7 @@ name = "air-testing-framework"
version = "0.8.0" version = "0.8.0"
description = "AquaVM testing framework" description = "AquaVM testing framework"
authors = ["Fluence Labs"] authors = ["Fluence Labs"]
edition = "2018" edition = "2021"
license = "Apache-2.0" license = "Apache-2.0"
repository = "https://github.com/fluencelabs/aquavm/tree/master/crates/test-framework" repository = "https://github.com/fluencelabs/aquavm/tree/master/crates/test-framework"
documentation = "https://docs.rs/air-testing-framework" documentation = "https://docs.rs/air-testing-framework"

View File

@ -3,7 +3,7 @@ name = "air-near-contract"
version = "0.55.0" version = "0.55.0"
description = "AIR interpreter as a NEAR contract" description = "AIR interpreter as a NEAR contract"
authors = ["Fluence labs"] authors = ["Fluence labs"]
edition = "2018" edition = "2021"
license = "Apache-2.0" license = "Apache-2.0"
keywords = ["fluence", "air", "webassembly", "programming-language", "near"] keywords = ["fluence", "air", "webassembly", "programming-language", "near"]
categories = ["wasm"] categories = ["wasm"]