This is an automated email from the ASF dual-hosted git repository.
martin-g pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/avro-rs.git
The following commit(s) were added to refs/heads/main by this push:
new 8000091 chore(deps): Bump syn from 2.0.119 to 3.0.2 (#606)
8000091 is described below
commit 8000091350d32f4ed4d94166dcb7695a4a25e409
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
AuthorDate: Fri Jul 31 05:49:24 2026 +0300
chore(deps): Bump syn from 2.0.119 to 3.0.2 (#606)
* chore(deps): Bump syn from 2.0.119 to 3.0.2
Bumps [syn](https://github.com/dtolnay/syn) from 2.0.119 to 3.0.2.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/2.0.119...3.0.2)
---
updated-dependencies:
- dependency-name: syn
dependency-version: 3.0.2
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <[email protected]>
* Build against keithamus/darling:upgrade-syn-to-3-0-0
https://github.com/TedDriggs/darling/compare/master...keithamus:darling:upgrade-syn-to-3-0-0
* Update darling to 0.24 and syn to 3.0.2
Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
---------
Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
Co-authored-by: dependabot[bot]
<49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Martin Tzvetanov Grigorov <[email protected]>
Co-authored-by: Martin Grigorov <[email protected]>
---
Cargo.lock | 45 +++++++++++++++++++---
avro_derive/Cargo.toml | 4 +-
avro_derive/src/enums/mod.rs | 3 +-
avro_derive/src/enums/record_internally_tagged.rs | 3 +-
.../ui/avro_rs_401_unknown_type_variant.stderr | 2 +-
5 files changed, 44 insertions(+), 13 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
index f688d41..6ff8ae9 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -94,7 +94,7 @@ name = "apache-avro-derive"
version = "0.22.0"
dependencies = [
"apache-avro",
- "darling",
+ "darling 0.24.0",
"macrotest",
"pretty_assertions",
"proc-macro2",
@@ -103,7 +103,7 @@ dependencies = [
"rustversion",
"serde",
"serde_json",
- "syn 2.0.119",
+ "syn 3.0.3",
"trybuild",
"uuid",
]
@@ -205,7 +205,7 @@ version = "3.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6dee98b0db6a962de883bf5d20362dee4d7ca0d12fe39a7c6c73c844e1cd7c1f"
dependencies = [
- "darling",
+ "darling 0.23.0",
"ident_case",
"prettyplease",
"proc-macro2",
@@ -419,8 +419,18 @@ version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d"
dependencies = [
- "darling_core",
- "darling_macro",
+ "darling_core 0.23.0",
+ "darling_macro 0.23.0",
+]
+
+[[package]]
+name = "darling"
+version = "0.24.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "88490bf1b990d87eaaa7ac8aa887f629a08e7359765b4911faf63c3763347d23"
+dependencies = [
+ "darling_core 0.24.0",
+ "darling_macro 0.24.0",
]
[[package]]
@@ -436,17 +446,40 @@ dependencies = [
"syn 2.0.119",
]
+[[package]]
+name = "darling_core"
+version = "0.24.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "084e274f91c482280130e1e34e0b8d6e66776a060d7b6de7b84289ca778868c4"
+dependencies = [
+ "ident_case",
+ "proc-macro2",
+ "quote",
+ "syn 3.0.3",
+]
+
[[package]]
name = "darling_macro"
version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d"
dependencies = [
- "darling_core",
+ "darling_core 0.23.0",
"quote",
"syn 2.0.119",
]
+[[package]]
+name = "darling_macro"
+version = "0.24.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "68f5792fa0d41cd2325ce0ffa64f0a340eaebd4971a3a0c5e1ffd2cc488a355e"
+dependencies = [
+ "darling_core 0.24.0",
+ "quote",
+ "syn 3.0.3",
+]
+
[[package]]
name = "diff"
version = "0.1.13"
diff --git a/avro_derive/Cargo.toml b/avro_derive/Cargo.toml
index 15e6971..3d2f131 100644
--- a/avro_derive/Cargo.toml
+++ b/avro_derive/Cargo.toml
@@ -32,11 +32,11 @@ readme = "README.md"
proc-macro = true
[dependencies]
-darling = { default-features = false, version = "0.23.0" }
+darling = { default-features = false, version = "0.24.0" }
proc-macro2 = { default-features = false, version = "1.0.106" }
quote = { default-features = false, version = "1.0.45" }
serde_json = { workspace = true }
-syn = { default-features = false, version = "2.0.117", features = ["full",
"fold"] }
+syn = { default-features = false, version = "3.0.3", features = ["full",
"fold"] }
uuid = { workspace = true }
[dev-dependencies]
diff --git a/avro_derive/src/enums/mod.rs b/avro_derive/src/enums/mod.rs
index 1edd098..49f0805 100644
--- a/avro_derive/src/enums/mod.rs
+++ b/avro_derive/src/enums/mod.rs
@@ -190,8 +190,7 @@ fn variant_to_schema_expr(
schema_type: SchemaType::Transparent,
})
.map_err(|m| vec![syn::Error::new(variant_span, m)])?;
- let pair = fields.unnamed.pop().expect("There is one
field");
- let field = pair.into_value();
+ let field = fields.unnamed.pop().expect("There is one
field");
let field_attributes = FieldOptions::new(&field.attrs,
field.span())
.and_then(|o| newtype_extra_attribute_checks(o,
field.span()))?;
field_to_schema_expr(&field, &field_attributes.with)
diff --git a/avro_derive/src/enums/record_internally_tagged.rs
b/avro_derive/src/enums/record_internally_tagged.rs
index ec8208a..49a9dca 100644
--- a/avro_derive/src/enums/record_internally_tagged.rs
+++ b/avro_derive/src/enums/record_internally_tagged.rs
@@ -110,11 +110,10 @@ pub fn to_implementation(
Fields::Unnamed(mut fields) => {
// Serde only allows #[serde(tag = "...")] on tuple
variants with exactly one field (newtype variant)
if fields.unnamed.len() == 1 {
- let pair = fields
+ let field = fields
.unnamed
.pop()
.unwrap_or_else(|| unreachable!("Length is
1"));
- let field = pair.into_value();
let field_attrs = match
FieldOptions::new(&field.attrs, field.span())
.and_then(|o|
newtype_extra_attribute_checks(o, field.span()))
{
diff --git a/avro_derive/tests/ui/avro_rs_401_unknown_type_variant.stderr
b/avro_derive/tests/ui/avro_rs_401_unknown_type_variant.stderr
index 43262cd..1649f90 100644
--- a/avro_derive/tests/ui/avro_rs_401_unknown_type_variant.stderr
+++ b/avro_derive/tests/ui/avro_rs_401_unknown_type_variant.stderr
@@ -1,4 +1,4 @@
-error: AvroSchema: Unexpected type encountered! Please open an issue if this
kind of type should be supported: Type::BareFn { lifetimes: None, unsafety:
None, abi: None, fn_token: Fn, paren_token: Paren, inputs: [], variadic: None,
output: ReturnType::Type(RArrow, Type::Path { qself: None, path: Path {
leading_colon: None, segments: [PathSegment { ident: Ident { ident: "String",
span: #0 bytes(882..888) }, arguments: PathArguments::None }] } }) }
+error: AvroSchema: Unexpected type encountered! Please open an issue if this
kind of type should be supported: Type::FnPtr { attrs: [], lifetimes: None,
unsafety: None, abi: None, fn_token: Token![fn], paren_token: Paren, inputs:
[], variadic: None, output: ReturnType::Type(Token![->], Type::Path { attrs:
[], qself: None, path: Path { leading_colon: None, segments: [PathSegment {
ident: Ident { ident: "String", span: #0 bytes(882..888) }, arguments:
PathArguments::None }] } }) }
--> tests/ui/avro_rs_401_unknown_type_variant.rs:22:8
|
22 | a: fn() -> String,