From bd06c9a14a52bf36ce0b56687189c52a71c2a751 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Jul 2026 03:07:03 +0000 Subject: [PATCH 1/2] chore(deps)(deps): update syn requirement in the proc-macro group Updates the requirements on [syn](https://github.com/dtolnay/syn) to permit the latest version. Updates `syn` to 3.0.1 - [Release notes](https://github.com/dtolnay/syn/releases) - [Commits](https://github.com/dtolnay/syn/compare/2.0.0...3.0.1) --- updated-dependencies: - dependency-name: syn dependency-version: 3.0.1 dependency-type: direct:production dependency-group: proc-macro ... Signed-off-by: dependabot[bot] --- Cargo.toml | 2 +- crates/entity-derive-impl/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b19fc44..591bec9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,7 @@ repository = "https://github.com/RAprogramm/entity-derive" entity-core = { path = "crates/entity-core", version = "0.10" } entity-derive = { path = "crates/entity-derive", version = "0.22" } entity-derive-impl = { path = "crates/entity-derive-impl", version = "0.20" } -syn = { version = "2", features = ["full", "extra-traits", "parsing"] } +syn = { version = "3", features = ["full", "extra-traits", "parsing"] } quote = "1" proc-macro2 = "1" darling = "0.23" diff --git a/crates/entity-derive-impl/Cargo.toml b/crates/entity-derive-impl/Cargo.toml index 6ac9e83..b68457f 100644 --- a/crates/entity-derive-impl/Cargo.toml +++ b/crates/entity-derive-impl/Cargo.toml @@ -67,7 +67,7 @@ migrations = [] projections = [] [dependencies] -syn = { version = "2", features = ["full", "extra-traits", "parsing"] } +syn = { version = "3", features = ["full", "extra-traits", "parsing"] } quote = "1" proc-macro2 = "1" darling = "0.23" From 18e3a417bae9d3145c37467544eda87c02179a9c Mon Sep 17 00:00:00 2001 From: RAprogramm Date: Mon, 27 Jul 2026 13:32:44 +0700 Subject: [PATCH 2/2] #231 ci: decline the syn 3 update until darling supports it --- .github/dependabot.yml | 9 +++++++ Cargo.toml | 38 +++++++++++++++++++++++++++- crates/entity-derive-impl/Cargo.toml | 20 ++++++++++++--- 3 files changed, 62 insertions(+), 5 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 032f4b2..2667343 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -22,6 +22,15 @@ updates: reviewers: - "RAprogramm" open-pull-requests-limit: 10 + # `syn` 3 cannot be taken while attribute parsing goes through + # darling, whose releases still require `syn` 2 — the two majors do + # not coexist in one tree, and the build fails on + # `syn::Path: darling::FromMeta is not satisfied`. Upstream tracks + # the port in darling#431; drop this entry once a darling release + # depends on `syn` 3. + ignore: + - dependency-name: "syn" + versions: ["3.x"] groups: # Group all minor and patch updates together rust-dependencies: diff --git a/Cargo.toml b/Cargo.toml index 591bec9..7e624ff 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,7 @@ repository = "https://github.com/RAprogramm/entity-derive" entity-core = { path = "crates/entity-core", version = "0.10" } entity-derive = { path = "crates/entity-derive", version = "0.22" } entity-derive-impl = { path = "crates/entity-derive-impl", version = "0.20" } -syn = { version = "3", features = ["full", "extra-traits", "parsing"] } +syn = { version = "2", features = ["full", "extra-traits", "parsing"] } quote = "1" proc-macro2 = "1" darling = "0.23" @@ -43,6 +43,42 @@ trybuild = "1" utoipa = { version = "5", features = ["chrono", "uuid"] } validator = { version = "0.20", features = ["derive"] } +# One lint policy for every crate. Pedantic is on: what stays allowed +# is listed here with the reason, instead of a per-crate pile of +# `#![allow(...)]` that silently covers future occurrences too. +[workspace.lints.rust] +rust_2018_idioms = { level = "warn", priority = -1 } +unsafe_code = "deny" + +[workspace.lints.clippy] +pedantic = { level = "warn", priority = -1 } +# Parse structs arrive from darling by value and are moved into the +# entity definition; taking them by reference would force a clone. +needless_pass_by_value = "allow" +# Dialect and attribute matches stay exhaustive and one arm per case, so +# adding a variant is a compile error rather than a silent fallthrough. +match_same_arms = "allow" +# A generator function is one SQL template read top to bottom; splitting +# it into fragments hides the statement it produces. +too_many_lines = "allow" +# Attribute configuration structs mirror the attribute surface, which is +# a set of independent flags. +struct_excessive_bools = "allow" +# `Option>` is the PATCH contract: absent field versus +# explicit null. +option_option = "allow" +# Field and column descriptors are passed by reference throughout; +# switching the small ones to by-value would split the convention. +trivially_copy_pass_by_ref = "allow" +# Prose in the docs names SQL keywords and types without backticks. +doc_markdown = "allow" +# SQL is assembled fragment by fragment; `push_str(&format!(..))` keeps +# the statement readable, unlike `write!` with an ignored Result. +format_push_string = "allow" +# Raised inside the parser darling generates for the attribute structs, +# where there is no source line to change. +needless_continue = "allow" + [workspace.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs"] diff --git a/crates/entity-derive-impl/Cargo.toml b/crates/entity-derive-impl/Cargo.toml index b68457f..262cad3 100644 --- a/crates/entity-derive-impl/Cargo.toml +++ b/crates/entity-derive-impl/Cargo.toml @@ -3,7 +3,7 @@ [package] name = "entity-derive-impl" -version = "0.20.14" +version = "0.20.16" edition.workspace = true rust-version.workspace = true authors.workspace = true @@ -49,8 +49,8 @@ events = [] # Generates command structs, the handler trait, and the dispatcher. commands = [] -# Generates `{Entity}Hooks` trait (currently manual-wiring; see #127 for -# auto-invocation plans). +# Generates the `{Entity}Hooks` trait and the `{Entity}Repo` wrapper +# that runs the hooks around every mutation. hooks = [] # Generates `{Entity}TransactionRepo` adapter, the (deprecated) `with_*` @@ -66,8 +66,17 @@ migrations = [] # Generates projection structs and `find_by_id_` methods. projections = [] +# Generates the `pg_notify` publication in writes and the +# `{Entity}Subscriber`. Off means an entity asking for `streams` gets a +# compile error naming the feature, not a missing-path error from +# generated code. +streams = [] + +# Generates the transactional-outbox enqueue inside writes. +outbox = [] + [dependencies] -syn = { version = "3", features = ["full", "extra-traits", "parsing"] } +syn = { version = "2", features = ["full", "extra-traits", "parsing"] } quote = "1" proc-macro2 = "1" darling = "0.23" @@ -91,6 +100,9 @@ utoipa = { version = "5", features = ["chrono", "uuid"] } validator = { version = "0.20", features = ["derive"] } entity-core = { path = "../entity-core" } +[lints] +workspace = true + [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs"]