From 01c09be08086640274ccd0439b7be2a2d8062fed Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Mon, 11 Sep 2023 12:36:39 +0800 Subject: [PATCH] Fix serde build. --- .github/workflows/build.yml | 11 +++++++---- CHANGELOG.md | 6 ++++++ Cargo.toml | 2 +- src/ast/flags.rs | 2 +- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6606275d2..efa8493b1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,16 +45,20 @@ jobs: flags: - "" - "--features testing-environ,debugging" - - "--features testing-environ,metadata,serde,internals" + - "--features testing-environ,metadata" + - "--features testing-environ,serde" + - "--features testing-environ,decimal" + - "--features testing-environ,no_float,decimal" + - "--features testing-environ,unicode-xid-ident" + - "--features testing-environ,internals" + - "--features testing-environ,decimal,serde,metadata,internals,debugging" - "--features testing-environ,unchecked,serde,metadata,internals,debugging" - "--features testing-environ,sync,serde,metadata,internals,debugging" - "--features testing-environ,no_position,serde,metadata,internals,debugging" - "--features testing-environ,no_optimize,serde,metadata,internals,debugging" - "--features testing-environ,no_float,serde,metadata,internals,debugging" - "--features testing-environ,f32_float,serde,metadata,internals,debugging" - - "--features testing-environ,decimal,serde,metadata,internals,debugging" - "--features testing-environ,no_custom_syntax,serde,metadata,internals,debugging" - - "--features testing-environ,no_float,decimal" - "--tests --features testing-environ,only_i32,serde,metadata,internals,debugging" - "--features testing-environ,only_i64,serde,metadata,internals,debugging" - "--features testing-environ,no_index,serde,metadata,internals,debugging" @@ -63,7 +67,6 @@ jobs: - "--features testing-environ,no_module,serde,metadata,internals,debugging" - "--features testing-environ,no_time,serde,metadata,internals,debugging" - "--features testing-environ,no_closure,serde,metadata,internals,debugging" - - "--features testing-environ,unicode-xid-ident,serde,metadata,internals,debugging" - "--features testing-environ,sync,no_time,no_function,no_float,no_position,no_optimize,no_module,no_closure,no_custom_syntax,metadata,serde,unchecked,debugging" - "--features testing-environ,no_time,no_function,no_float,no_position,no_index,no_object,no_optimize,no_module,no_closure,no_custom_syntax,unchecked" toolchain: [stable] diff --git a/CHANGELOG.md b/CHANGELOG.md index f5b7f4e33..683d6103a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,12 @@ Rhai Release Notes ================== +Version 1.16.1 +============== + +Fixes compilation error when using the `serde` feature with `metadata`. + + Version 1.16.0 ============== diff --git a/Cargo.toml b/Cargo.toml index 3656f23fa..a4f02c9c6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ members = [".", "codegen"] [package] name = "rhai" -version = "1.16.0" +version = "1.16.1" rust-version = "1.66.0" edition = "2018" resolver = "2" diff --git a/src/ast/flags.rs b/src/ast/flags.rs index ecdef34da..70df9d3c7 100644 --- a/src/ast/flags.rs +++ b/src/ast/flags.rs @@ -7,7 +7,7 @@ use std::prelude::v1::*; /// A type representing the access mode of a function. #[derive(Debug, Clone, Copy, Eq, PartialEq, Ord, PartialOrd, Hash)] #[cfg_attr( - feature = "metadata", + feature = "serde", derive(serde::Serialize, serde::Deserialize), serde(rename_all = "camelCase") )]