mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 01:12:56 +03:00
Bump derive_more from 0.99.18 to 1.0.0 (#1310)
Bumps [derive_more](https://github.com/JelteF/derive_more) from 0.99.18 to 1.0.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/JelteF/derive_more/releases">derive_more's releases</a>.</em></p> <blockquote> <h2>v1.0.0 - Finally a stable release</h2> <p><code>derive_more</code> is a library that adds derives for many of the standard library traits. By using this library the following code just works:</p> <pre lang="rust"><code>use derive_more::{Add, Display, From, Into}; <p>#[derive(PartialEq, From, Add)] struct MyInt(i32);</p> <p>#[derive(PartialEq, From, Into)] struct Point2D { x: i32, y: i32, }</p> <p>#[derive(PartialEq, From, Add, Display)] enum MyEnum { #[display("int: {_0}")] Int(i32), Uint(u32), #[display("nothing")] Nothing, }</p> <p>assert!(MyInt(11) == MyInt(5) + 6.into()); assert!((5, 6) == Point2D { x: 5, y: 6 }.into()); assert!(MyEnum::Int(15) == (MyEnum::Int(8) + 7.into()).unwrap()); assert!(MyEnum::Int(15).to_string() == "int: 15"); assert!(MyEnum::Uint(42).to_string() == "42"); assert!(MyEnum::Nothing.to_string() == "nothing"); </code></pre></p> <p>Now, more than 8 years after the first commit and almost 5 years after the 0.99.0 release, <code>derive_more</code> has finally reached its 1.0.0 release. This release contains a lot of changes (including some breaking ones) to make it easier to use the derives and make it possible to extend them without having to break backwards compatibility again. There are five major changes that I would like to call out, but there are many more changes that are documented below:</p> <ol> <li>There is a new <code>Debug</code> derive that can be used to easily customize <code>Debug</code> formatting.</li> <li>A greatly improved <code>Display</code> derive, which allows you to do anything that <a href="https://github.com/dtolnay/thiserror"><code>thiserror</code></a> provides, but it works for any type not just errors. And by combining the <code>Display</code> derive with the <code>Error</code> and <code>From</code> derives, there shouldn't really be any need to use <code>thiserror</code> anymore (if you are missing a feature/behaviour from <code>thiserror</code> please report an issue).</li> <li>Traits that can return errors now return a type that implements <code>Error</code> when an error occurs instead of a <code>&'static str</code>.</li> <li>When using <code>use derive_more::SomeTrait</code> the actual trait is also imported not just the derive macro. This is especially useful for <code>Error</code> and <code>Display</code></li> <li>The docs are now rendered on docs.rs and are much better overall.</li> </ol> <h3>Breaking changes</h3> <ul> <li>The minimum supported Rust version (MSRV) is now Rust 1.75.</li> <li>Add the <code>std</code> feature which should be disabled in <code>no_std</code> environments.</li> <li>All Cargo features, except <code>std</code>, are now disabled by default. The <code>full</code> feature can be used to get the old behavior of supporting all possible derives.</li> <li>The <code>TryFrom</code>, <code>Add</code>, <code>Sub</code>, <code>BitAnd</code>, <code>BitOr</code>, <code>BitXor</code>, <code>Not</code> and <code>Neg</code> derives now return a dedicated error type instead of a <code>&'static str</code> on error.</li> <li>The <code>FromStr</code> derive now uses a dedicated <code>FromStrError</code> error type instead of generating unique one each time.</li> <li>The <code>Display</code> derive (and other <code>fmt</code>-like ones) now uses <code>#[display("...", (<expr>),*)]</code> syntax instead of <code>#[display(fmt = "...", ("<expr>"),*)]</code>, and <code>#[display(bound(<bound>))]</code> instead of <code>#[display(bound = "<bound>")]</code>. So without the double quotes around the expressions and bounds.</li> <li>The <code>Debug</code> and <code>Display</code> derives (and other <code>fmt</code>-like ones) now transparently delegate to the inner type when <code>#[display("...", (<expr>),*)]</code> attribute is trivially substitutable with a transparent call. (<a href="https://redirect.github.com/JelteF/derive_more/pull/322">#322</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/JelteF/derive_more/blob/master/CHANGELOG.md">derive_more's changelog</a>.</em></p> <blockquote> <h2>1.0.0 - 2024-08-07</h2> <p>More than 8 years after the first commit and almost 5 years after the 0.99.0 release, <code>derive_more</code> has finally reached its 1.0.0 release. This release contains a lot of changes (including some breaking ones) to make it easier to use the derives and make it possible to extend them without having to break backwards compatibility again. There are five major changes that I would like to call out, but there are many more changes that are documented below:</p> <ol> <li>There is a new <code>Debug</code> derive that can be used to easily customize <code>Debug</code> formatting.</li> <li>A greatly improved <code>Display</code> derive, which allows you to do anything that <a href="https://github.com/dtolnay/thiserror"><code>thiserror</code></a> provides, but it works for any type not just errors. And by combining the <code>Display</code> derive with the <code>Error</code> and <code>From</code> derives, there shouldn't really be any need to use <code>thiserror</code> anymore (if you are missing a feature/behaviour from <code>thiserror</code> please report an issue).</li> <li>Traits that can return errors now return a type that implements <code>Error</code> when an error occurs instead of a <code>&'static str</code>.</li> <li>When using <code>use derive_more::SomeTrait</code> the actual trait is also imported not just the derive macro. This is especially useful for <code>Error</code> and <code>Display</code></li> <li>The docs are now rendered on docs.rs and are much better overall.</li> </ol> <h3>Breaking changes</h3> <ul> <li>The minimum supported Rust version (MSRV) is now Rust 1.75.</li> <li>Add the <code>std</code> feature which should be disabled in <code>no_std</code> environments.</li> <li>All Cargo features, except <code>std</code>, are now disabled by default. The <code>full</code> feature can be used to get the old behavior of supporting all possible derives.</li> <li>The <code>TryFrom</code>, <code>Add</code>, <code>Sub</code>, <code>BitAnd</code>, <code>BitOr</code>, <code>BitXor</code>, <code>Not</code> and <code>Neg</code> derives now return a dedicated error type instead of a <code>&'static str</code> on error.</li> <li>The <code>FromStr</code> derive now uses a dedicated <code>FromStrError</code> error type instead of generating unique one each time.</li> <li>The <code>Display</code> derive (and other <code>fmt</code>-like ones) now uses <code>#[display("...", (<expr>),*)]</code> syntax instead of <code>#[display(fmt = "...", ("<expr>"),*)]</code>, and <code>#[display(bound(<bound>))]</code> instead of <code>#[display(bound = "<bound>")]</code>. So without the double quotes around the expressions and bounds.</li> <li>The <code>Debug</code> and <code>Display</code> derives (and other <code>fmt</code>-like ones) now transparently delegate to the inner type when <code>#[display("...", (<expr>),*)]</code> attribute is trivially substitutable with a transparent call. (<a href="https://redirect.github.com/JelteF/derive_more/pull/322">#322</a>)</li> <li>The <code>DebugCustom</code> derive is renamed to just <code>Debug</code> (gated now under a separate <code>debug</code> feature), and its semantics were changed to be a superset of <code>std</code> variant of <code>Debug</code>.</li> <li>The <code>From</code> derive doesn't derive <code>From<()></code> for enum variants without any fields anymore. This feature was removed because it was considered useless in</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="d7f5b9e94d
"><code>d7f5b9e</code></a> chore: Release</li> <li><a href="40201b1e2e
"><code>40201b1</code></a> Update release date to be correct</li> <li><a href="88863ca4e6
"><code>88863ca</code></a> Update changelog wording</li> <li><a href="b713835894
"><code>b713835</code></a> Improve error when not enabling any features</li> <li><a href="330e4252fb
"><code>330e425</code></a> Order features in Cargo.toml alphabetically</li> <li><a href="84f2cbb05f
"><code>84f2cbb</code></a> Update README and CHANGELOG in preparation of 1.0.0</li> <li><a href="e8d60cf0e5
"><code>e8d60cf</code></a> Add compile_fail test for on purpose limited bounds (<a href="https://redirect.github.com/JelteF/derive_more/issues/393">#393</a>, <a href="https://redirect.github.com/JelteF/derive_more/issues/392">#392</a>)</li> <li><a href="f665d18125
"><code>f665d18</code></a> Make anyhow reference a bit less strong</li> <li><a href="6d632b2db2
"><code>6d632b2</code></a> Add release announcement (<a href="https://redirect.github.com/JelteF/derive_more/issues/390">#390</a>)</li> <li><a href="e87ab1315f
"><code>e87ab13</code></a> Don't create git tags for derive_more-impl (<a href="https://redirect.github.com/JelteF/derive_more/issues/391">#391</a>)</li> <li>Additional commits viewable in <a href="https://github.com/JelteF/derive_more/compare/v0.99.18...v1.0.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=derive_more&package-manager=cargo&previous-version=0.99.18&new-version=1.0.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Daniel Harvey <danieljamesharvey@gmail.com> V3_GIT_ORIGIN_REV_ID: 2a5d2033a90d16d5bf2096db5a717e31128b8c00
This commit is contained in:
parent
fb5fd77b04
commit
1667c96c5d
40
v3/Cargo.lock
generated
40
v3/Cargo.lock
generated
@ -1016,12 +1016,6 @@ version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2"
|
||||
|
||||
[[package]]
|
||||
name = "convert_case"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e"
|
||||
|
||||
[[package]]
|
||||
name = "convert_case"
|
||||
version = "0.6.0"
|
||||
@ -1636,19 +1630,6 @@ dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "derive_more"
|
||||
version = "0.99.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce"
|
||||
dependencies = [
|
||||
"convert_case 0.4.0",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"rustc_version",
|
||||
"syn 2.0.82",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "derive_more"
|
||||
version = "1.0.0"
|
||||
@ -1664,6 +1645,7 @@ version = "1.0.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22"
|
||||
dependencies = [
|
||||
"convert_case",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.82",
|
||||
@ -2279,7 +2261,7 @@ version = "3.0.0"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"blake2",
|
||||
"derive_more 0.99.18",
|
||||
"derive_more",
|
||||
"execute",
|
||||
"futures-util",
|
||||
"graphql-frontend",
|
||||
@ -2425,7 +2407,7 @@ version = "3.0.0"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"axum-core",
|
||||
"derive_more 0.99.18",
|
||||
"derive_more",
|
||||
"http 1.1.0",
|
||||
"lang-graphql",
|
||||
"open-dds",
|
||||
@ -2927,7 +2909,7 @@ version = "3.0.0"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"axum-core",
|
||||
"derive_more 0.99.18",
|
||||
"derive_more",
|
||||
"execute",
|
||||
"hasura-authn-core",
|
||||
"indexmap 2.6.0",
|
||||
@ -3215,7 +3197,7 @@ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
|
||||
name = "metadata-resolve"
|
||||
version = "3.0.0"
|
||||
dependencies = [
|
||||
"derive_more 0.99.18",
|
||||
"derive_more",
|
||||
"error-context",
|
||||
"hasura-authn-core",
|
||||
"indexmap 2.6.0",
|
||||
@ -3490,7 +3472,7 @@ version = "0.12.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "caad8a11807e43c49ab8f9527c96d0ec926f525549e65e5cd3b502115704a58e"
|
||||
dependencies = [
|
||||
"derive_more 1.0.0",
|
||||
"derive_more",
|
||||
"http 1.1.0",
|
||||
"log",
|
||||
"once_cell",
|
||||
@ -3554,7 +3536,7 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381"
|
||||
name = "open-dds"
|
||||
version = "3.0.0"
|
||||
dependencies = [
|
||||
"derive_more 0.99.18",
|
||||
"derive_more",
|
||||
"goldenfile",
|
||||
"indexmap 2.6.0",
|
||||
"jsonpath",
|
||||
@ -3578,7 +3560,7 @@ dependencies = [
|
||||
name = "opendds-derive"
|
||||
version = "3.0.0"
|
||||
dependencies = [
|
||||
"convert_case 0.6.0",
|
||||
"convert_case",
|
||||
"darling",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@ -3996,7 +3978,7 @@ checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec"
|
||||
name = "plan"
|
||||
version = "3.0.0"
|
||||
dependencies = [
|
||||
"derive_more 0.99.18",
|
||||
"derive_more",
|
||||
"execute",
|
||||
"graphql-ir",
|
||||
"graphql-schema",
|
||||
@ -4013,7 +3995,7 @@ dependencies = [
|
||||
name = "plan-types"
|
||||
version = "3.0.0"
|
||||
dependencies = [
|
||||
"derive_more 0.99.18",
|
||||
"derive_more",
|
||||
"metadata-resolve",
|
||||
"open-dds",
|
||||
"schemars",
|
||||
@ -5443,7 +5425,7 @@ name = "tracing-util"
|
||||
version = "3.0.0"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"derive_more 0.99.18",
|
||||
"derive_more",
|
||||
"http 1.1.0",
|
||||
"opentelemetry",
|
||||
"opentelemetry-contrib",
|
||||
|
@ -85,7 +85,7 @@ cookie = "0.18"
|
||||
criterion = "0.5"
|
||||
darling = "0.20"
|
||||
datafusion = "41"
|
||||
derive_more = "0.99"
|
||||
derive_more = { version = "1.0", features = ["full"] }
|
||||
diffy = "0.4"
|
||||
env_logger = "0.11"
|
||||
expect-test = "1"
|
||||
|
@ -32,10 +32,10 @@ pub use open_dds::{
|
||||
pub enum SessionVariableValue {
|
||||
/// An unparsed session variable value as a string. Might be a raw string, might be a number, might be json.
|
||||
/// How we interpret it depends on what type we're trying to coerce to from the string
|
||||
#[display(fmt = "{_0}")]
|
||||
#[display("{_0}")]
|
||||
Unparsed(String),
|
||||
/// A parsed JSON session variable value. We know what the type is because we parsed it from JSON.
|
||||
#[display(fmt = "{_0}")]
|
||||
#[display("{_0}")]
|
||||
Parsed(serde_json::Value),
|
||||
}
|
||||
|
||||
|
@ -340,33 +340,33 @@ pub enum AggregateBooleanExpressionError {
|
||||
|
||||
#[derive(Debug, Eq, PartialEq, Copy, Clone, derive_more::Display)]
|
||||
pub enum CountAggregateType {
|
||||
#[display(fmt = "count")]
|
||||
#[display("count")]
|
||||
Count,
|
||||
#[display(fmt = "count distinct")]
|
||||
#[display("count distinct")]
|
||||
CountDistinct,
|
||||
}
|
||||
|
||||
#[derive(Debug, Eq, PartialEq, Copy, Clone, derive_more::Display)]
|
||||
pub enum AggregateOperandType {
|
||||
#[display(fmt = "object aggregate")]
|
||||
#[display("object aggregate")]
|
||||
ObjectAggregate,
|
||||
#[display(fmt = "scalar aggregate")]
|
||||
#[display("scalar aggregate")]
|
||||
ScalarAggregate,
|
||||
}
|
||||
|
||||
#[derive(Debug, Eq, PartialEq, Copy, Clone, derive_more::Display)]
|
||||
pub enum NameSource {
|
||||
#[display(fmt = "comparable aggregation function")]
|
||||
#[display("comparable aggregation function")]
|
||||
ComparableAggregationFunction,
|
||||
#[display(fmt = "comparable aggregatable field")]
|
||||
#[display("comparable aggregatable field")]
|
||||
ComparableAggregatableField,
|
||||
#[display(fmt = "comparable aggregatable relationship")]
|
||||
#[display("comparable aggregatable relationship")]
|
||||
ComparableAggregatableRelationship,
|
||||
#[display(fmt = "logical operator")]
|
||||
#[display("logical operator")]
|
||||
LogicalOperator,
|
||||
#[display(fmt = "count aggregation function")]
|
||||
#[display("count aggregation function")]
|
||||
CountAggregationFunction,
|
||||
#[display(fmt = "count distinct aggregation function")]
|
||||
#[display("count distinct aggregation function")]
|
||||
CountDistinctAggregationFunction,
|
||||
}
|
||||
|
||||
|
@ -166,9 +166,9 @@ impl JsonSchema for TypeReference {
|
||||
|
||||
#[derive(Hash, Clone, Debug, PartialEq, Eq, derive_more::Display)]
|
||||
pub enum BaseType {
|
||||
#[display(fmt = "{_0}")]
|
||||
#[display("{_0}")]
|
||||
Named(TypeName),
|
||||
#[display(fmt = "[{_0}]")]
|
||||
#[display("[{_0}]")]
|
||||
List(Box<TypeReference>),
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ impl<T> TraceableHttpResponse<T> {
|
||||
/// Error type for `TraceableHttpResponse`.
|
||||
/// Only used as an associated type when implementing [`Traceable`] trait for [`TraceableHttpResponse`].
|
||||
#[derive(Debug, derive_more::Display)]
|
||||
#[display(fmt = "{error}")]
|
||||
#[display("{error}")]
|
||||
pub struct ResponseError {
|
||||
error: String,
|
||||
}
|
||||
|
@ -16,9 +16,9 @@ pub static GLOBAL_TRACER_NAME: &str = "engine-tracing-util";
|
||||
|
||||
#[derive(Clone, Copy, derive_more::Display)]
|
||||
pub enum SpanVisibility {
|
||||
#[display(fmt = "internal")]
|
||||
#[display("internal")]
|
||||
Internal,
|
||||
#[display(fmt = "user")]
|
||||
#[display("user")]
|
||||
User,
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user