chore(deps): update rust crates syn to v2, darling to 0.20.1 (#66)

* chore(deps): update rust crate syn to v2

* update syn and darling together

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Valery Antopol <valery.antopol@gmail.com>
This commit is contained in:
renovate[bot] 2023-05-05 16:33:58 +03:00 committed by GitHub
parent b398b095ae
commit 923609add7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 56 additions and 17 deletions

57
Cargo.lock generated
View File

@ -413,8 +413,18 @@ version = "0.14.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850"
dependencies = [ dependencies = [
"darling_core", "darling_core 0.14.4",
"darling_macro", "darling_macro 0.14.4",
]
[[package]]
name = "darling"
version = "0.20.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0558d22a7b463ed0241e993f76f09f30b126687447751a8638587b864e4b3944"
dependencies = [
"darling_core 0.20.1",
"darling_macro 0.20.1",
] ]
[[package]] [[package]]
@ -431,17 +441,42 @@ dependencies = [
"syn 1.0.109", "syn 1.0.109",
] ]
[[package]]
name = "darling_core"
version = "0.20.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab8bfa2e259f8ee1ce5e97824a3c55ec4404a0d772ca7fa96bf19f0752a046eb"
dependencies = [
"fnv",
"ident_case",
"proc-macro2",
"quote",
"strsim",
"syn 2.0.15",
]
[[package]] [[package]]
name = "darling_macro" name = "darling_macro"
version = "0.14.4" version = "0.14.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e"
dependencies = [ dependencies = [
"darling_core", "darling_core 0.14.4",
"quote", "quote",
"syn 1.0.109", "syn 1.0.109",
] ]
[[package]]
name = "darling_macro"
version = "0.20.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a"
dependencies = [
"darling_core 0.20.1",
"quote",
"syn 2.0.15",
]
[[package]] [[package]]
name = "digest" name = "digest"
version = "0.10.6" version = "0.10.6"
@ -1189,14 +1224,14 @@ dependencies = [
"proc-macro-error", "proc-macro-error",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 1.0.109", "syn 2.0.15",
] ]
[[package]] [[package]]
name = "marine-test-macro-impl" name = "marine-test-macro-impl"
version = "0.9.1" version = "0.9.1"
dependencies = [ dependencies = [
"darling", "darling 0.20.1",
"fluence-app-service", "fluence-app-service",
"itertools", "itertools",
"marine-it-parser", "marine-it-parser",
@ -1205,7 +1240,7 @@ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"static_assertions", "static_assertions",
"syn 1.0.109", "syn 2.0.15",
"thiserror", "thiserror",
] ]
@ -1649,7 +1684,7 @@ checksum = "a2a0814352fd64b58489904a44ea8d90cb1a91dcb6b4f5ebabc32c8318e93cb6"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.14", "syn 2.0.15",
] ]
[[package]] [[package]]
@ -1685,7 +1720,7 @@ version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1966009f3c05f095697c537312f5415d1e3ed31ce0a56942bac4c771c5c335e" checksum = "a1966009f3c05f095697c537312f5415d1e3ed31ce0a56942bac4c771c5c335e"
dependencies = [ dependencies = [
"darling", "darling 0.14.4",
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 1.0.109", "syn 1.0.109",
@ -1754,9 +1789,9 @@ dependencies = [
[[package]] [[package]]
name = "syn" name = "syn"
version = "2.0.14" version = "2.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fcf316d5356ed6847742d036f8a39c3b8435cac10bd528a4bd461928a6ab34d5" checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -1811,7 +1846,7 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
"syn 2.0.14", "syn 2.0.15",
] ]
[[package]] [[package]]

View File

@ -17,11 +17,11 @@ all-features = true
fluence-app-service = { version = "0.25.3", features = ["raw-module-api"] } fluence-app-service = { version = "0.25.3", features = ["raw-module-api"] }
marine-it-parser = "0.12.1" marine-it-parser = "0.12.1"
itertools = "0.10.5" itertools = "0.10.5"
darling = "0.14.4" darling = "0.20.1"
quote = "1.0.26" quote = "1.0.26"
proc-macro2 = "1.0.56" proc-macro2 = "1.0.56"
proc-macro-error = { version = "1.0.4", default-features = false } proc-macro-error = { version = "1.0.4", default-features = false }
syn = { version = '1.0.109', features = ['full'] } syn = { version = '2.0.15', features = ['full'] }
thiserror = "1.0.40" thiserror = "1.0.40"
static_assertions = "1.1.0" static_assertions = "1.1.0"

View File

@ -15,6 +15,8 @@
*/ */
use darling::FromMeta; use darling::FromMeta;
use darling::ast::NestedMeta;
use std::collections::HashMap; use std::collections::HashMap;
/// Describes attributes of `marine_test` macro. /// Describes attributes of `marine_test` macro.
@ -35,7 +37,7 @@ pub struct ServiceDescription {
} }
impl FromMeta for MTestAttributes { impl FromMeta for MTestAttributes {
fn from_list(items: &[syn::NestedMeta]) -> darling::Result<Self> { fn from_list(items: &[NestedMeta]) -> darling::Result<Self> {
let single_service = ServiceDescription::from_list(items); let single_service = ServiceDescription::from_list(items);
let multiple_services = HashMap::<String, ServiceDescription>::from_list(items); let multiple_services = HashMap::<String, ServiceDescription>::from_list(items);
match (single_service, multiple_services) { match (single_service, multiple_services) {

View File

@ -21,7 +21,9 @@ use crate::marine_test::glue_code_generator::generate_marine_test_env_for_build_
use proc_macro2::TokenStream; use proc_macro2::TokenStream;
use darling::FromMeta; use darling::FromMeta;
use darling::ast::NestedMeta;
use syn::parse::Parser; use syn::parse::Parser;
use std::path::{PathBuf, Path}; use std::path::{PathBuf, Path};
pub fn marine_test_impl( pub fn marine_test_impl(
@ -30,9 +32,9 @@ pub fn marine_test_impl(
file_path: PathBuf, file_path: PathBuf,
) -> TResult<TokenStream> { ) -> TResult<TokenStream> {
// from https://github.com/dtolnay/syn/issues/788 // from https://github.com/dtolnay/syn/issues/788
let parser = syn::punctuated::Punctuated::<syn::NestedMeta, syn::Token![,]>::parse_terminated; let parser = syn::punctuated::Punctuated::<NestedMeta, syn::Token![,]>::parse_terminated;
let attrs = parser.parse2(attrs)?; let attrs = parser.parse2(attrs)?;
let attrs: Vec<syn::NestedMeta> = attrs.into_iter().collect(); let attrs: Vec<NestedMeta> = attrs.into_iter().collect();
let attrs = MTestAttributes::from_list(&attrs)?; let attrs = MTestAttributes::from_list(&attrs)?;
let item = syn::parse2::<syn::Item>(input)?; let item = syn::parse2::<syn::Item>(input)?;

View File

@ -23,4 +23,4 @@ marine-test-macro-impl = { path = "../marine-test-macro-impl", version = "=0.9.1
quote = "1.0.26" quote = "1.0.26"
proc-macro2 = "1.0.56" proc-macro2 = "1.0.56"
proc-macro-error = { version = "1.0.4", default-features = false } proc-macro-error = { version = "1.0.4", default-features = false }
syn = { version = '1.0.109', features = ['full'] } syn = { version = '2.0.15', features = ['full'] }