Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sqlx-macros disables default features of syn but doesn't enable required features #2418

Closed
arch-mage opened this issue Mar 21, 2023 · 15 comments
Labels

Comments

@arch-mage
Copy link

Bug Description

I've asked about this at Discord. They (or He) say this is a bug because sqlx-macros dependencies are wrong.

Minimal Reproduction

  • Create a new project cargo new bugtest.
  • Add sqlx as a dependency.
[package]
name = "bugtest"
version = "0.1.0"
edition = "2021"

[dependencies.sqlx]
version = "0.6.2"
default-features = false
features = ["runtime-tokio-rustls", "postgres"]
  • Run cargo check

Info

  • SQLx version: 0.6.1, 0.6.2
  • SQLx features enabled: runtime-tokio-rustls
  • Database server and version: mysql, postgres
  • Operating system: arch-linux, debian, alpine
  • rustc --version: 1.67, 1.68

cargo check output

    Updating crates.io index
   Compiling libc v0.2.140
   Compiling version_check v0.9.4
   Compiling autocfg v1.1.0
   Compiling cfg-if v1.0.0
   Compiling typenum v1.16.0
   Compiling cc v1.0.79
   Compiling log v0.4.17
   Compiling memchr v2.5.0
   Compiling proc-macro2 v1.0.52
   Compiling unicode-ident v1.0.8
   Compiling quote v1.0.26
   Compiling futures-core v0.3.27
   Compiling once_cell v1.17.1
   Compiling rustls v0.20.8
   Compiling parking_lot_core v0.8.6
   Compiling spin v0.5.2
   Compiling untrusted v0.7.1
   Compiling serde_derive v1.0.158
   Compiling generic-array v0.14.6
   Compiling ahash v0.7.6
   Compiling crossbeam-utils v0.8.15
   Compiling tokio v1.26.0
   Compiling lock_api v0.4.9
   Compiling num-traits v0.2.15
   Compiling serde v1.0.158
   Compiling subtle v2.4.1
   Compiling futures-task v0.3.27
   Compiling syn v2.0.4
   Compiling getrandom v0.2.8
   Compiling pin-project-lite v0.2.9
   Compiling tinyvec_macros v0.1.1
   Compiling socket2 v0.4.9
   Compiling mio v0.8.6
   Compiling num_cpus v1.15.0
   Compiling tinyvec v1.6.0
   Compiling indexmap v1.9.2
   Compiling serde_json v1.0.94
   Compiling bytes v1.4.0
   Compiling thiserror v1.0.40
   Compiling crossbeam-queue v0.3.8
   Compiling ring v0.16.20
    Checking block-buffer v0.10.4
    Checking crypto-common v0.1.6
   Compiling futures-channel v0.3.27
    Checking digest v0.10.6
   Compiling futures-util v0.3.27
   Compiling unicode-normalization v0.1.22
   Compiling instant v0.1.12
   Compiling scopeguard v1.1.0
   Compiling paste v1.0.12
   Compiling unicode-bidi v0.3.13
   Compiling smallvec v1.10.0
   Compiling hashbrown v0.12.3
   Compiling rand_core v0.6.4
   Compiling percent-encoding v2.2.0
   Compiling minimal-lexical v0.2.1
   Compiling either v1.8.1
   Compiling cpufeatures v0.2.5
   Compiling ppv-lite86 v0.2.17
   Compiling futures-sink v0.3.27
   Compiling itertools v0.10.5
   Compiling nom v7.1.3
   Compiling form_urlencoded v1.1.0
   Compiling parking_lot v0.11.2
   Compiling idna v0.3.0
   Compiling hmac v0.12.1
   Compiling rand_chacha v0.3.1
   Compiling dirs-sys v0.3.7
   Compiling pin-utils v0.1.0
   Compiling base64 v0.21.0
   Compiling itoa v1.0.6
    Checking webpki v0.22.0
    Checking sct v0.7.0
   Compiling ryu v1.0.13
   Compiling unicode_categories v0.1.1
   Compiling syn v1.0.109
   Compiling rustls-pemfile v1.0.2
   Compiling thiserror-impl v1.0.40
   Compiling sqlformat v0.2.1
   Compiling webpki-roots v0.22.6
   Compiling dirs v4.0.0
   Compiling atoi v1.0.0
   Compiling url v2.3.1
   Compiling tokio-stream v0.1.12
   Compiling rand v0.8.5
   Compiling hkdf v0.12.3
   Compiling futures-intrusive v0.4.2
    Checking tokio-rustls v0.23.4
   Compiling hashlink v0.8.1
   Compiling sha2 v0.10.6
   Compiling sha1 v0.10.5
   Compiling stringprep v0.1.2
   Compiling md-5 v0.10.5
   Compiling unicode-segmentation v1.10.1
   Compiling event-listener v2.5.3
   Compiling hex v0.4.3
   Compiling whoami v1.4.0
   Compiling sqlx-rt v0.6.2
   Compiling base64 v0.13.1
   Compiling bitflags v1.3.2
   Compiling byteorder v1.4.3
   Compiling dotenvy v0.15.6
   Compiling heck v0.4.1
    Checking sqlx-core v0.6.2
   Compiling sqlx-macros v0.6.2
error[E0432]: unresolved import `syn::spanned`
 --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/attributes.rs:4:10
  |
4 | use syn::spanned::Spanned;
  |          ^^^^^^^ could not find `spanned` in `syn`

error[E0432]: unresolved import `syn::DeriveInput`
 --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/attributes.rs:6:22
  |
6 | use syn::{Attribute, DeriveInput, Field, Lit, Meta, MetaNameValue, NestedMeta, Variant};
  |                      ^^^^^^^^^^^ no `DeriveInput` in the root

error[E0432]: unresolved imports `syn::parse_quote`, `syn::Data`, `syn::DataEnum`, `syn::DataStruct`, `syn::DeriveInput`
  --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/decode.rs:11:5
   |
11 |     parse_quote, Arm, Data, DataEnum, DataStruct, DeriveInput, Field, Fields, FieldsNamed,
   |     ^^^^^^^^^^^       ^^^^  ^^^^^^^^  ^^^^^^^^^^  ^^^^^^^^^^^ no `DeriveInput` in the root
   |     |                 |     |         |
   |     |                 |     |         no `DataStruct` in the root
   |     |                 |     no `DataEnum` in the root
   |     |                 no `Data` in the root
   |     no `parse_quote` in the root
   |
help: a similar name exists in the module
   |
11 |     parse_quote, Arm, data, DataEnum, DataStruct, DeriveInput, Field, Fields, FieldsNamed,
   |                       ~~~~
help: a similar name exists in the module
   |
11 |     parse_quote, Arm, Data, DataEnum, PatStruct, DeriveInput, Field, Fields, FieldsNamed,
   |                                       ~~~~~~~~~

error[E0432]: unresolved imports `syn::parse_quote`, `syn::Data`, `syn::DataEnum`, `syn::DataStruct`, `syn::DeriveInput`
  --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/encode.rs:11:5
   |
11 |     parse_quote, Data, DataEnum, DataStruct, DeriveInput, Expr, Field, Fields, FieldsNamed,
   |     ^^^^^^^^^^^  ^^^^  ^^^^^^^^  ^^^^^^^^^^  ^^^^^^^^^^^ no `DeriveInput` in the root
   |     |            |     |         |
   |     |            |     |         no `DataStruct` in the root
   |     |            |     no `DataEnum` in the root
   |     |            no `Data` in the root
   |     no `parse_quote` in the root
   |
help: a similar name exists in the module
   |
11 |     parse_quote, data, DataEnum, DataStruct, DeriveInput, Expr, Field, Fields, FieldsNamed,
   |                  ~~~~
help: a similar name exists in the module
   |
11 |     parse_quote, Data, DataEnum, PatStruct, DeriveInput, Expr, Field, Fields, FieldsNamed,
   |                                  ~~~~~~~~~

error[E0432]: unresolved imports `syn::parse_quote`, `syn::Data`, `syn::DataStruct`, `syn::DeriveInput`
 --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/row.rs:4:5
  |
4 |     parse_quote, punctuated::Punctuated, token::Comma, Data, DataStruct, DeriveInput, Expr, Field,
  |     ^^^^^^^^^^^                                        ^^^^  ^^^^^^^^^^  ^^^^^^^^^^^ no `DeriveInput` in the root
  |     |                                                  |     |
  |     |                                                  |     no `DataStruct` in the root
  |     no `parse_quote` in the root                       no `Data` in the root
  |
help: a similar name exists in the module
  |
4 |     parse_quote, punctuated::Punctuated, token::Comma, data, DataStruct, DeriveInput, Expr, Field,
  |                                                        ~~~~
help: a similar name exists in the module
  |
4 |     parse_quote, punctuated::Punctuated, token::Comma, Data, PatStruct, DeriveInput, Expr, Field,
  |                                                              ~~~~~~~~~

error[E0432]: unresolved imports `syn::parse_quote`, `syn::Data`, `syn::DataEnum`, `syn::DataStruct`, `syn::DeriveInput`
  --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/type.rs:10:5
   |
10 |     parse_quote, Data, DataEnum, DataStruct, DeriveInput, Field, Fields, FieldsNamed,
   |     ^^^^^^^^^^^  ^^^^  ^^^^^^^^  ^^^^^^^^^^  ^^^^^^^^^^^ no `DeriveInput` in the root
   |     |            |     |         |
   |     |            |     |         no `DataStruct` in the root
   |     |            |     no `DataEnum` in the root
   |     |            no `Data` in the root
   |     no `parse_quote` in the root
   |
help: a similar name exists in the module
   |
10 |     parse_quote, data, DataEnum, DataStruct, DeriveInput, Field, Fields, FieldsNamed,
   |                  ~~~~
help: a similar name exists in the module
   |
10 |     parse_quote, Data, DataEnum, PatStruct, DeriveInput, Field, Fields, FieldsNamed,
   |                                  ~~~~~~~~~

error[E0432]: unresolved import `syn::DeriveInput`
  --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/mod.rs:16:5
   |
16 | use syn::DeriveInput;
   |     ^^^^^^^^^^^^^^^^ no `DeriveInput` in the root

error[E0432]: unresolved import `syn::spanned`
 --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/query/args.rs:7:10
  |
7 | use syn::spanned::Spanned;
  |          ^^^^^^^ could not find `spanned` in `syn`

error[E0432]: unresolved import `syn::parse`
 --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/query/input.rs:4:10
  |
4 | use syn::parse::{Parse, ParseStream};
  |          ^^^^^ could not find `parse` in `syn`

error[E0432]: unresolved import `syn::parse`
  --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/query/output.rs:12:10
   |
12 | use syn::parse::{Parse, ParseStream};
   |          ^^^^^ could not find `parse` in `syn`

error[E0433]: failed to resolve: could not find `parse_macro_input` in `syn`
  --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/lib.rs:32:22
   |
32 |     let input = syn::parse_macro_input!(input as query::QueryMacroInput);
   |                      ^^^^^^^^^^^^^^^^^ could not find `parse_macro_input` in `syn`

error[E0433]: failed to resolve: could not find `parse_macro_input` in `syn`
  --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/lib.rs:49:22
   |
49 |     let input = syn::parse_macro_input!(tokenstream as syn::DeriveInput);
   |                      ^^^^^^^^^^^^^^^^^ could not find `parse_macro_input` in `syn`

error[E0433]: failed to resolve: could not find `parse_macro_input` in `syn`
  --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/lib.rs:58:22
   |
58 |     let input = syn::parse_macro_input!(tokenstream as syn::DeriveInput);
   |                      ^^^^^^^^^^^^^^^^^ could not find `parse_macro_input` in `syn`

error[E0433]: failed to resolve: could not find `parse_macro_input` in `syn`
  --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/lib.rs:67:22
   |
67 |     let input = syn::parse_macro_input!(tokenstream as syn::DeriveInput);
   |                      ^^^^^^^^^^^^^^^^^ could not find `parse_macro_input` in `syn`

error[E0433]: failed to resolve: could not find `parse_macro_input` in `syn`
  --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/lib.rs:76:22
   |
76 |     let input = syn::parse_macro_input!(input as syn::DeriveInput);
   |                      ^^^^^^^^^^^^^^^^^ could not find `parse_macro_input` in `syn`

error[E0433]: failed to resolve: could not find `parse_macro_input` in `syn`
   --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/lib.rs:105:21
    |
105 |     let args = syn::parse_macro_input!(args as syn::AttributeArgs);
    |                     ^^^^^^^^^^^^^^^^^ could not find `parse_macro_input` in `syn`

error[E0433]: failed to resolve: could not find `parse_macro_input` in `syn`
   --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/lib.rs:106:22
    |
106 |     let input = syn::parse_macro_input!(input as syn::ItemFn);
    |                      ^^^^^^^^^^^^^^^^^ could not find `parse_macro_input` in `syn`

error: cannot determine resolution for the macro `parse_quote`
  --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/decode.rs:67:20
   |
67 |         .insert(0, parse_quote!(DB: ::sqlx::Database));
   |                    ^^^^^^^^^^^
   |
   = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
  --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/decode.rs:68:31
   |
68 |     generics.params.insert(0, parse_quote!('r));
   |                               ^^^^^^^^^^^
   |
   = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
  --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/decode.rs:72:15
   |
72 |         .push(parse_quote!(#ty: ::sqlx::decode::Decode<'r, DB>));
   |               ^^^^^^^^^^^
   |
   = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
   --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/decode.rs:155:13
    |
155 |             parse_quote!(#rename => ::std::result::Result::Ok(#ident :: #id),)
    |             ^^^^^^^^^^^
    |
    = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
   --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/decode.rs:159:13
    |
159 |             parse_quote!(#name => ::std::result::Result::Ok(#ident :: #id),)
    |             ^^^^^^^^^^^
    |
    = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
   --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/decode.rs:162:13
    |
162 |             parse_quote!(#name => ::std::result::Result::Ok(#ident :: #id),)
    |             ^^^^^^^^^^^
    |
    = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
   --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/decode.rs:274:35
    |
274 |         generics.params.insert(0, parse_quote!('r));
    |                                   ^^^^^^^^^^^
    |
    = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
   --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/decode.rs:281:29
    |
281 |             predicates.push(parse_quote!(#ty: ::sqlx::decode::Decode<'r, ::sqlx::Postgres>));
    |                             ^^^^^^^^^^^
    |
    = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
   --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/decode.rs:282:29
    |
282 |             predicates.push(parse_quote!(#ty: ::sqlx::types::Type<::sqlx::Postgres>));
    |                             ^^^^^^^^^^^
    |
    = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
   --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/decode.rs:291:13
    |
291 |             parse_quote!(
    |             ^^^^^^^^^^^
    |
    = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
  --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/encode.rs:73:20
   |
73 |         .insert(0, parse_quote!(DB: ::sqlx::Database));
   |                    ^^^^^^^^^^^
   |
   = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
  --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/encode.rs:77:15
   |
77 |         .push(parse_quote!(#ty: ::sqlx::encode::Encode<#lifetime, DB>));
   |               ^^^^^^^^^^^
   |
   = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
   --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/encode.rs:221:23
    |
221 |                 .push(parse_quote!(#ty: for<'q> ::sqlx::encode::Encode<'q, ::sqlx::Postgres>));
    |                       ^^^^^^^^^^^
    |
    = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
   --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/encode.rs:222:29
    |
222 |             predicates.push(parse_quote!(#ty: ::sqlx::types::Type<::sqlx::Postgres>));
    |                             ^^^^^^^^^^^
    |
    = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
   --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/encode.rs:230:13
    |
230 |             parse_quote!(
    |             ^^^^^^^^^^^
    |
    = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
   --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/encode.rs:239:13
    |
239 |             parse_quote!(
    |             ^^^^^^^^^^^
    |
    = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
  --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/row.rs:56:31
   |
56 |     generics.params.insert(0, parse_quote!(R: ::sqlx::Row));
   |                               ^^^^^^^^^^^
   |
   = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
  --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/row.rs:59:35
   |
59 |         generics.params.insert(0, parse_quote!(#lifetime));
   |                                   ^^^^^^^^^^^
   |
   = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
  --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/row.rs:64:21
   |
64 |     predicates.push(parse_quote!(&#lifetime ::std::primitive::str: ::sqlx::ColumnIndex<R>));
   |                     ^^^^^^^^^^^
   |
   = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
  --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/row.rs:77:37
   |
77 |                     predicates.push(parse_quote!(#ty: ::sqlx::FromRow<#lifetime, R>));
   |                                     ^^^^^^^^^^^
   |
   = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
  --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/row.rs:78:21
   |
78 |                     parse_quote!(<#ty as ::sqlx::FromRow<#lifetime, R>>::from_row(row))
   |                     ^^^^^^^^^^^
   |
   = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
  --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/row.rs:82:31
   |
82 |                         .push(parse_quote!(#ty: ::sqlx::decode::Decode<#lifetime, R::Database>));
   |                               ^^^^^^^^^^^
   |
   = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
  --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/row.rs:83:37
   |
83 |                     predicates.push(parse_quote!(#ty: ::sqlx::types::Type<R::Database>));
   |                                     ^^^^^^^^^^^
   |
   = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
  --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/row.rs:93:21
   |
93 |                     parse_quote!(row.try_get(#id_s))
   |                     ^^^^^^^^^^^
   |
   = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
  --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/row.rs:96:37
   |
96 |                     predicates.push(parse_quote!(#try_from: ::sqlx::FromRow<#lifetime, R>));
   |                                     ^^^^^^^^^^^
   |
   = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
  --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/row.rs:97:21
   |
97 | ...   parse_quote!(<#try_from as ::sqlx::FromRow<#lifetime, R>>::from_row(row).and_then(|v| <#ty as ::std::convert::TryFrom::<#try_from>>...
   |       ^^^^^^^^^^^
   |
   = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
   --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/row.rs:101:31
    |
101 |                         .push(parse_quote!(#try_from: ::sqlx::decode::Decode<#lifetime, R::Database>));
    |                               ^^^^^^^^^^^
    |
    = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
   --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/row.rs:102:37
    |
102 |                     predicates.push(parse_quote!(#try_from: ::sqlx::types::Type<R::Database>)); 
    |                                     ^^^^^^^^^^^
    |
    = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
   --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/row.rs:112:21
    |
112 | ...   parse_quote!(row.try_get(#id_s).and_then(|v| <#ty as ::std::convert::TryFrom::<#try_from>>::try_from(v).map_err(|e| ::sqlx::Error::...
    |       ^^^^^^^^^^^
    |
    = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
   --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/row.rs:117:22
    |
117 |                 Some(parse_quote!(let #id: #ty = #expr.or_else(|e| match e {
    |                      ^^^^^^^^^^^
    |
    = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
   --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/row.rs:124:22
    |
124 |                 Some(parse_quote!(
    |                      ^^^^^^^^^^^
    |
    = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
   --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/row.rs:166:31
    |
166 |     generics.params.insert(0, parse_quote!(R: ::sqlx::Row));
    |                               ^^^^^^^^^^^
    |
    = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
   --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/row.rs:169:35
    |
169 |         generics.params.insert(0, parse_quote!(#lifetime));
    |                                   ^^^^^^^^^^^
    |
    = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
   --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/row.rs:174:21
    |
174 |     predicates.push(parse_quote!(
    |                     ^^^^^^^^^^^
    |
    = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
   --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/row.rs:181:25
    |
181 |         predicates.push(parse_quote!(#ty: ::sqlx::decode::Decode<#lifetime, R::Database>));
    |                         ^^^^^^^^^^^
    |
    = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
   --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/row.rs:182:25
    |
182 |         predicates.push(parse_quote!(#ty: ::sqlx::types::Type<R::Database>));
    |                         ^^^^^^^^^^^
    |
    = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
  --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/type.rs:67:24
   |
67 |             .insert(0, parse_quote!(DB: ::sqlx::Database));
   |                        ^^^^^^^^^^^
   |
   = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
  --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/type.rs:71:19
   |
71 |             .push(parse_quote!(#ty: ::sqlx::Type<DB>));
   |                   ^^^^^^^^^^^
   |
   = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
  --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/type.rs:77:19
   |
77 |             .push(parse_quote!(#ty: ::sqlx::postgres::PgHasArrayType));
   |                   ^^^^^^^^^^^
   |
   = note: import resolution is stuck, try simplifying macro imports

error: cannot determine resolution for the macro `parse_quote`
   --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/derives/decode.rs:108:13
    |
108 |             parse_quote! {
    |             ^^^^^^^^^^^
    |
    = note: import resolution is stuck, try simplifying macro imports

error[E0425]: cannot find function `parse_str` in crate `syn`
  --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/database/mod.rs:18:14
   |
18 |         syn::parse_str(Self::DATABASE_PATH).unwrap()
   |              ^^^^^^^^^ not found in `syn`

error[E0425]: cannot find function `parse_str` in crate `syn`
  --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/database/mod.rs:22:14
   |
22 |         syn::parse_str(Self::ROW_PATH).unwrap()
   |              ^^^^^^^^^ not found in `syn`

error[E0425]: cannot find function `parse_str` in crate `syn`
   --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/query/output.rs:270:22
    |
270 |                 syn::parse_str(remainder)?
    |                      ^^^^^^^^^ not found in `syn`

error[E0425]: cannot find function `parse_str` in crate `syn`
   --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/query/output.rs:325:33
    |
325 |         if let Ok(ident) = syn::parse_str(&ident) {
    |                                 ^^^^^^^^^ not found in `syn`

error[E0425]: cannot find function `parse_str` in crate `syn`
   --> /home/bagol/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-macros-0.6.2/src/query/mod.rs:350:46
    |
350 |                 let record_name: Type = syn::parse_str("Record").unwrap();
    |                                              ^^^^^^^^^ not found in `syn`

Some errors have detailed explanations: E0425, E0432, E0433.
For more information about an error, try `rustc --explain E0425`.
error: could not compile `sqlx-macros` due to 62 previous errors
@arch-mage arch-mage added the bug label Mar 21, 2023
@abonander
Copy link
Collaborator

Two incompatible versions of syn are being included here. We for sure link 1.x: https://github.com/launchbadge/sqlx/blob/v0.6.2/sqlx-macros/Cargo.toml#L83

   Compiling syn v2.0.4
   Compiling syn v1.0.109

This shouldn't be happening. Can you post the generated Cargo.lock?

@arch-mage
Copy link
Author

# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3

[[package]]
name = "ahash"
version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47"
dependencies = [
 "getrandom",
 "once_cell",
 "version_check",
]

[[package]]
name = "atoi"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7c57d12312ff59c811c0643f4d80830505833c9ffaebd193d819392b265be8e"
dependencies = [
 "num-traits",
]

[[package]]
name = "autocfg"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"

[[package]]
name = "base64"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"

[[package]]
name = "base64"
version = "0.21.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a"

[[package]]
name = "bitflags"
version = "1.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"

[[package]]
name = "block-buffer"
version = "0.10.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
dependencies = [
 "generic-array",
]

[[package]]
name = "bugtest"
version = "0.1.0"
dependencies = [
 "sqlx",
]

[[package]]
name = "bumpalo"
version = "3.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535"

[[package]]
name = "byteorder"
version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"

[[package]]
name = "bytes"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be"

[[package]]
name = "cc"
version = "1.0.79"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"

[[package]]
name = "cfg-if"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"

[[package]]
name = "cpufeatures"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320"
dependencies = [
 "libc",
]

[[package]]
name = "crossbeam-queue"
version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add"
dependencies = [
 "cfg-if",
 "crossbeam-utils",
]

[[package]]
name = "crossbeam-utils"
version = "0.8.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b"
dependencies = [
 "cfg-if",
]

[[package]]
name = "crypto-common"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
dependencies = [
 "generic-array",
 "typenum",
]

[[package]]
name = "digest"
version = "0.10.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f"
dependencies = [
 "block-buffer",
 "crypto-common",
 "subtle",
]

[[package]]
name = "dirs"
version = "4.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059"
dependencies = [
 "dirs-sys",
]

[[package]]
name = "dirs-sys"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6"
dependencies = [
 "libc",
 "redox_users",
 "winapi",
]

[[package]]
name = "dotenvy"
version = "0.15.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03d8c417d7a8cb362e0c37e5d815f5eb7c37f79ff93707329d5a194e42e54ca0"

[[package]]
name = "either"
version = "1.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91"

[[package]]
name = "event-listener"
version = "2.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0"

[[package]]
name = "form_urlencoded"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8"
dependencies = [
 "percent-encoding",
]

[[package]]
name = "futures-channel"
version = "0.3.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "164713a5a0dcc3e7b4b1ed7d3b433cabc18025386f9339346e8daf15963cf7ac"
dependencies = [
 "futures-core",
 "futures-sink",
]

[[package]]
name = "futures-core"
version = "0.3.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "86d7a0c1aa76363dac491de0ee99faf6941128376f1cf96f07db7603b7de69dd"

[[package]]
name = "futures-intrusive"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a604f7a68fbf8103337523b1fadc8ade7361ee3f112f7c680ad179651616aed5"
dependencies = [
 "futures-core",
 "lock_api",
 "parking_lot",
]

[[package]]
name = "futures-sink"
version = "0.3.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec93083a4aecafb2a80a885c9de1f0ccae9dbd32c2bb54b0c3a65690e0b8d2f2"

[[package]]
name = "futures-task"
version = "0.3.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fd65540d33b37b16542a0438c12e6aeead10d4ac5d05bd3f805b8f35ab592879"

[[package]]
name = "futures-util"
version = "0.3.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3ef6b17e481503ec85211fed8f39d1970f128935ca1f814cd32ac4a6842e84ab"
dependencies = [
 "futures-core",
 "futures-sink",
 "futures-task",
 "pin-project-lite",
 "pin-utils",
]

[[package]]
name = "generic-array"
version = "0.14.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9"
dependencies = [
 "typenum",
 "version_check",
]

[[package]]
name = "getrandom"
version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31"
dependencies = [
 "cfg-if",
 "libc",
 "wasi",
]

[[package]]
name = "hashbrown"
version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
dependencies = [
 "ahash",
]

[[package]]
name = "hashlink"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69fe1fcf8b4278d860ad0548329f892a3631fb63f82574df68275f34cdbe0ffa"
dependencies = [
 "hashbrown",
]

[[package]]
name = "heck"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
dependencies = [
 "unicode-segmentation",
]

[[package]]
name = "hermit-abi"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7"
dependencies = [
 "libc",
]

[[package]]
name = "hex"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"

[[package]]
name = "hkdf"
version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437"
dependencies = [
 "hmac",
]

[[package]]
name = "hmac"
version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
dependencies = [
 "digest",
]

[[package]]
name = "idna"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6"
dependencies = [
 "unicode-bidi",
 "unicode-normalization",
]

[[package]]
name = "indexmap"
version = "1.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399"
dependencies = [
 "autocfg",
 "hashbrown",
]

[[package]]
name = "instant"
version = "0.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c"
dependencies = [
 "cfg-if",
]

[[package]]
name = "itertools"
version = "0.10.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
dependencies = [
 "either",
]

[[package]]
name = "itoa"
version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6"

[[package]]
name = "js-sys"
version = "0.3.61"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730"
dependencies = [
 "wasm-bindgen",
]

[[package]]
name = "libc"
version = "0.2.140"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"

[[package]]
name = "lock_api"
version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df"
dependencies = [
 "autocfg",
 "scopeguard",
]

[[package]]
name = "log"
version = "0.4.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e"
dependencies = [
 "cfg-if",
]

[[package]]
name = "md-5"
version = "0.10.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6365506850d44bff6e2fbcb5176cf63650e48bd45ef2fe2665ae1570e0f4b9ca"
dependencies = [
 "digest",
]

[[package]]
name = "memchr"
version = "2.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d"

[[package]]
name = "minimal-lexical"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"

[[package]]
name = "mio"
version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9"
dependencies = [
 "libc",
 "log",
 "wasi",
 "windows-sys",
]

[[package]]
name = "nom"
version = "7.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
dependencies = [
 "memchr",
 "minimal-lexical",
]

[[package]]
name = "num-traits"
version = "0.2.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
dependencies = [
 "autocfg",
]

[[package]]
name = "num_cpus"
version = "1.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b"
dependencies = [
 "hermit-abi",
 "libc",
]

[[package]]
name = "once_cell"
version = "1.17.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3"

[[package]]
name = "parking_lot"
version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99"
dependencies = [
 "instant",
 "lock_api",
 "parking_lot_core",
]

[[package]]
name = "parking_lot_core"
version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc"
dependencies = [
 "cfg-if",
 "instant",
 "libc",
 "redox_syscall",
 "smallvec",
 "winapi",
]

[[package]]
name = "paste"
version = "1.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79"

[[package]]
name = "percent-encoding"
version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e"

[[package]]
name = "pin-project-lite"
version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116"

[[package]]
name = "pin-utils"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"

[[package]]
name = "ppv-lite86"
version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"

[[package]]
name = "proc-macro2"
version = "1.0.52"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d0e1ae9e836cc3beddd63db0df682593d7e2d3d891ae8c9083d2113e1744224"
dependencies = [
 "unicode-ident",
]

[[package]]
name = "quote"
version = "1.0.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc"
dependencies = [
 "proc-macro2",
]

[[package]]
name = "rand"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
dependencies = [
 "libc",
 "rand_chacha",
 "rand_core",
]

[[package]]
name = "rand_chacha"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
dependencies = [
 "ppv-lite86",
 "rand_core",
]

[[package]]
name = "rand_core"
version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
dependencies = [
 "getrandom",
]

[[package]]
name = "redox_syscall"
version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
dependencies = [
 "bitflags",
]

[[package]]
name = "redox_users"
version = "0.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b"
dependencies = [
 "getrandom",
 "redox_syscall",
 "thiserror",
]

[[package]]
name = "ring"
version = "0.16.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc"
dependencies = [
 "cc",
 "libc",
 "once_cell",
 "spin",
 "untrusted",
 "web-sys",
 "winapi",
]

[[package]]
name = "rustls"
version = "0.20.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f"
dependencies = [
 "log",
 "ring",
 "sct",
 "webpki",
]

[[package]]
name = "rustls-pemfile"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b"
dependencies = [
 "base64 0.21.0",
]

[[package]]
name = "ryu"
version = "1.0.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041"

[[package]]
name = "scopeguard"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"

[[package]]
name = "sct"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4"
dependencies = [
 "ring",
 "untrusted",
]

[[package]]
name = "serde"
version = "1.0.158"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "771d4d9c4163ee138805e12c710dd365e4f44be8be0503cb1bb9eb989425d9c9"
dependencies = [
 "serde_derive",
]

[[package]]
name = "serde_derive"
version = "1.0.158"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e801c1712f48475582b7696ac71e0ca34ebb30e09338425384269d9717c62cad"
dependencies = [
 "proc-macro2",
 "quote",
 "syn 2.0.4",
]

[[package]]
name = "serde_json"
version = "1.0.94"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1c533a59c9d8a93a09c6ab31f0fd5e5f4dd1b8fc9434804029839884765d04ea"
dependencies = [
 "itoa",
 "ryu",
 "serde",
]

[[package]]
name = "sha1"
version = "0.10.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3"
dependencies = [
 "cfg-if",
 "cpufeatures",
 "digest",
]

[[package]]
name = "sha2"
version = "0.10.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0"
dependencies = [
 "cfg-if",
 "cpufeatures",
 "digest",
]

[[package]]
name = "smallvec"
version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0"

[[package]]
name = "socket2"
version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662"
dependencies = [
 "libc",
 "winapi",
]

[[package]]
name = "spin"
version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"

[[package]]
name = "sqlformat"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c12bc9199d1db8234678b7051747c07f517cdcf019262d1847b94ec8b1aee3e"
dependencies = [
 "itertools",
 "nom",
 "unicode_categories",
]

[[package]]
name = "sqlx"
version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9249290c05928352f71c077cc44a464d880c63f26f7534728cca008e135c0428"
dependencies = [
 "sqlx-core",
 "sqlx-macros",
]

[[package]]
name = "sqlx-core"
version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dcbc16ddba161afc99e14d1713a453747a2b07fc097d2009f4c300ec99286105"
dependencies = [
 "ahash",
 "atoi",
 "base64 0.13.1",
 "bitflags",
 "byteorder",
 "bytes",
 "crossbeam-queue",
 "dirs",
 "dotenvy",
 "either",
 "event-listener",
 "futures-channel",
 "futures-core",
 "futures-intrusive",
 "futures-util",
 "hashlink",
 "hex",
 "hkdf",
 "hmac",
 "indexmap",
 "itoa",
 "libc",
 "log",
 "md-5",
 "memchr",
 "once_cell",
 "paste",
 "percent-encoding",
 "rand",
 "rustls",
 "rustls-pemfile",
 "serde",
 "serde_json",
 "sha1",
 "sha2",
 "smallvec",
 "sqlformat",
 "sqlx-rt",
 "stringprep",
 "thiserror",
 "tokio-stream",
 "url",
 "webpki-roots",
 "whoami",
]

[[package]]
name = "sqlx-macros"
version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b850fa514dc11f2ee85be9d055c512aa866746adfacd1cb42d867d68e6a5b0d9"
dependencies = [
 "dotenvy",
 "either",
 "heck",
 "once_cell",
 "proc-macro2",
 "quote",
 "sqlx-core",
 "sqlx-rt",
 "syn 1.0.109",
 "url",
]

[[package]]
name = "sqlx-rt"
version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24c5b2d25fa654cc5f841750b8e1cdedbe21189bf9a9382ee90bfa9dd3562396"
dependencies = [
 "once_cell",
 "tokio",
 "tokio-rustls",
]

[[package]]
name = "stringprep"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ee348cb74b87454fff4b551cbf727025810a004f88aeacae7f85b87f4e9a1c1"
dependencies = [
 "unicode-bidi",
 "unicode-normalization",
]

[[package]]
name = "subtle"
version = "2.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601"

[[package]]
name = "syn"
version = "1.0.109"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
dependencies = [
 "proc-macro2",
 "quote",
 "unicode-ident",
]

[[package]]
name = "syn"
version = "2.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2c622ae390c9302e214c31013517c2061ecb2699935882c60a9b37f82f8625ae"
dependencies = [
 "proc-macro2",
 "quote",
 "unicode-ident",
]

[[package]]
name = "thiserror"
version = "1.0.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac"
dependencies = [
 "thiserror-impl",
]

[[package]]
name = "thiserror-impl"
version = "1.0.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f"
dependencies = [
 "proc-macro2",
 "quote",
 "syn 2.0.4",
]

[[package]]
name = "tinyvec"
version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50"
dependencies = [
 "tinyvec_macros",
]

[[package]]
name = "tinyvec_macros"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"

[[package]]
name = "tokio"
version = "1.26.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64"
dependencies = [
 "autocfg",
 "bytes",
 "libc",
 "memchr",
 "mio",
 "num_cpus",
 "pin-project-lite",
 "socket2",
 "windows-sys",
]

[[package]]
name = "tokio-rustls"
version = "0.23.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59"
dependencies = [
 "rustls",
 "tokio",
 "webpki",
]

[[package]]
name = "tokio-stream"
version = "0.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8fb52b74f05dbf495a8fba459fdc331812b96aa086d9eb78101fa0d4569c3313"
dependencies = [
 "futures-core",
 "pin-project-lite",
 "tokio",
]

[[package]]
name = "typenum"
version = "1.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba"

[[package]]
name = "unicode-bidi"
version = "0.3.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460"

[[package]]
name = "unicode-ident"
version = "1.0.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4"

[[package]]
name = "unicode-normalization"
version = "0.1.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921"
dependencies = [
 "tinyvec",
]

[[package]]
name = "unicode-segmentation"
version = "1.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36"

[[package]]
name = "unicode_categories"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e"

[[package]]
name = "untrusted"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a"

[[package]]
name = "url"
version = "2.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643"
dependencies = [
 "form_urlencoded",
 "idna",
 "percent-encoding",
]

[[package]]
name = "version_check"
version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"

[[package]]
name = "wasi"
version = "0.11.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"

[[package]]
name = "wasm-bindgen"
version = "0.2.84"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b"
dependencies = [
 "cfg-if",
 "wasm-bindgen-macro",
]

[[package]]
name = "wasm-bindgen-backend"
version = "0.2.84"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9"
dependencies = [
 "bumpalo",
 "log",
 "once_cell",
 "proc-macro2",
 "quote",
 "syn 1.0.109",
 "wasm-bindgen-shared",
]

[[package]]
name = "wasm-bindgen-macro"
version = "0.2.84"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5"
dependencies = [
 "quote",
 "wasm-bindgen-macro-support",
]

[[package]]
name = "wasm-bindgen-macro-support"
version = "0.2.84"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6"
dependencies = [
 "proc-macro2",
 "quote",
 "syn 1.0.109",
 "wasm-bindgen-backend",
 "wasm-bindgen-shared",
]

[[package]]
name = "wasm-bindgen-shared"
version = "0.2.84"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d"

[[package]]
name = "web-sys"
version = "0.3.61"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97"
dependencies = [
 "js-sys",
 "wasm-bindgen",
]

[[package]]
name = "webpki"
version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd"
dependencies = [
 "ring",
 "untrusted",
]

[[package]]
name = "webpki-roots"
version = "0.22.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87"
dependencies = [
 "webpki",
]

[[package]]
name = "whoami"
version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2c70234412ca409cc04e864e89523cb0fc37f5e1344ebed5a3ebf4192b6b9f68"
dependencies = [
 "wasm-bindgen",
 "web-sys",
]

[[package]]
name = "winapi"
version = "0.3.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
dependencies = [
 "winapi-i686-pc-windows-gnu",
 "winapi-x86_64-pc-windows-gnu",
]

[[package]]
name = "winapi-i686-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"

[[package]]
name = "winapi-x86_64-pc-windows-gnu"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"

[[package]]
name = "windows-sys"
version = "0.45.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
dependencies = [
 "windows-targets",
]

[[package]]
name = "windows-targets"
version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071"
dependencies = [
 "windows_aarch64_gnullvm",
 "windows_aarch64_msvc",
 "windows_i686_gnu",
 "windows_i686_msvc",
 "windows_x86_64_gnu",
 "windows_x86_64_gnullvm",
 "windows_x86_64_msvc",
]

[[package]]
name = "windows_aarch64_gnullvm"
version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"

[[package]]
name = "windows_aarch64_msvc"
version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"

[[package]]
name = "windows_i686_gnu"
version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"

[[package]]
name = "windows_i686_msvc"
version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"

[[package]]
name = "windows_x86_64_gnu"
version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"

[[package]]
name = "windows_x86_64_gnullvm"
version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"

[[package]]
name = "windows_x86_64_msvc"
version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"

@abonander
Copy link
Collaborator

Does cargo clean fix the problem?

@abonander
Copy link
Collaborator

This is definitely weird cause it's showing the correct version here:


[[package]]
name = "sqlx-macros"
version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b850fa514dc11f2ee85be9d055c512aa866746adfacd1cb42d867d68e6a5b0d9"
dependencies = [
 "dotenvy",
 "either",
 "heck",
 "once_cell",
 "proc-macro2",
 "quote",
 "sqlx-core",
 "sqlx-rt",
 "syn 1.0.109",
 "url",
]

@arch-mage
Copy link
Author

Nope. I've tried removing $HOME/.cargo directory. I've tried compiling inside a docker container. It keeps failing to compile.

@abonander
Copy link
Collaborator

It's the features we enable. full is not sufficient:

To fix, just add syn = "1" to your dependencies. It'll force those features on and SQLx will compile.

We're in the middle of an alpha cycle for 0.7.0, I'll make sure to fix it for that release but I don't have the bandwidth to backport right now.

@arch-mage
Copy link
Author

No Problem, no need to rush.

Anyway, syn = "1" does not solve the problem. I've updated Cargo.toml to:

[package]
name = "bugtest"
version = "0.1.0"
edition = "2021"

[dependencies]
sqlx = { version = "0.6.2", default-features = false, features = ["runtime-tokio-rustls", "postgres"] }
syn = "1"

It still won't compile.

@abonander
Copy link
Collaborator

Same errors?

@arch-mage
Copy link
Author

Yes. Exactly the same errors.

@abonander
Copy link
Collaborator

Try

[build-dependencies]
syn = "1"

@arch-mage
Copy link
Author

It compiles. Thanks.

By the way. I didn't know there is a [build-dependencies] thing.

@abonander
Copy link
Collaborator

I'd like to leave this open until I have a fix in for 0.7.0, as a reminder.

@abonander abonander reopened this Mar 21, 2023
@abonander abonander changed the title Unable to compile because sqlx-macros dependencies are wrong. sqlx-macros disables default features of syn but doesn't enable required features Mar 21, 2023
@abonander
Copy link
Collaborator

Released 0.6.3 with a hotfix, I figured due to the likely widespread impact of the issue I should address it ASAP: https://github.com/launchbadge/sqlx/blob/v0.6.3/CHANGELOG.md#063---2023-03-21

Still leaving this open until I verify that either 0.7.0 is not affected or I've committed a fix.

@abonander
Copy link
Collaborator

Heh, it appears I already fixed this as part of my big refactors. I remember some funny compilation errors while working on that but didn't think to check if it affected 0.6 as well: https://github.com/launchbadge/sqlx/blame/main/sqlx-macros-core/Cargo.toml#L57

@dayo777
Copy link

dayo777 commented Aug 10, 2023

I just experienced this issue on sqlx@0.5; I now used the latest version which is @0.7.1; I think the issue is fixed now.

e-t-u added a commit to e-t-u/elering-nps-price-grabber that referenced this issue Oct 16, 2023
… to add the following lines to the Cargo.toml file:

[build-dependencies]
syn = "1" # temporary fix, launchbadge/sqlx#2418
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants