Skip to content

Conversation

@alamb
Copy link
Contributor

@alamb alamb commented Dec 12, 2024

While running the release verification script with rc1 the cargo fmt check failed:

+ cargo fmt --all -- --check
Diff in /private/var/folders/1l/tg68jc6550gg8xqf1hr4mlwr0000gn/T/datafusion-sqlparser-rs-0.53.0.XXXXX.7AY3fOIeJZ/apache-datafusion-sqlparser-rs-0.53.0/derive/src/lib.rs:18:
 use proc_macro2::TokenStream;
 use quote::{format_ident, quote, quote_spanned, ToTokens};
 use syn::spanned::Spanned;
-use syn::{parse::{Parse, ParseStream}, parse_macro_input, parse_quote, Attribute, Data, DeriveInput, Fields, GenericParam, Generics, Ident, Index, LitStr, Meta, Token, Type, TypePath};
+use syn::{
+    parse::{Parse, ParseStream},
+    parse_macro_input, parse_quote, Attribute, Data, DeriveInput, Fields, GenericParam, Generics,
+    Ident, Index, LitStr, Meta, Token, Type, TypePath,
+};
 use syn::{Path, PathArguments};

 /// Implementation of `[#derive(Visit)]`
Diff in /private/var/folders/1l/tg68jc6550gg8xqf1hr4mlwr0000gn/T/datafusion-sqlparser-rs-0.53.0.XXXXX.7AY3fOIeJZ/apache-datafusion-sqlparser-rs-0.53.0/derive/src/lib.rs:267:
 }

 fn is_option(ty: &Type) -> bool {
-    if let Type::Path(TypePath { path: Path { segments, .. }, .. }) = ty {
+    if let Type::Path(TypePath {
+        path: Path { segments, .. },
+        ..
+    }) = ty
+    {
         if let Some(segment) = segments.last() {
             if segment.ident == "Option" {
                 if let PathArguments::AngleBracketed(args) = &segment.arguments {
+ cleanup
+ '[' no = yes ']'
+ echo 'Failed to verify release candidate. See /var/folders/1l/tg68jc6550gg8xqf1hr4mlwr0000gn/T/datafusion-sqlparser-rs-0.53.0.XXXXX.7AY3fOIeJZ for details.'
Failed to verify release candidate. See /var/folders/1l/tg68jc6550gg8xqf1hr4mlwr0000gn/T/datafusion-sqlparser-rs-0.53.0.XXXXX.7AY3fOIeJZ for details.

This PR updates the CI check to match the verification script and also formats derive

@alamb alamb changed the title Run cargo fmt in derive crate Run cargo fmt on derive crate Dec 12, 2024
Copy link
Contributor

@iffyio iffyio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@alamb alamb merged commit 3108828 into apache:main Dec 13, 2024
8 checks passed
@alamb
Copy link
Contributor Author

alamb commented Dec 13, 2024

Thanks @iffyio !

@alamb alamb deleted the alamb/run_fmt_derive branch December 13, 2024 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants