Skip to content

Building v0.8.1 fails with feature "postgres" enabled #3460

Description

@oleggtro

Bug Description

On enabling the "postgres" feature building of the sqlx-postgres crate fails.

Minimal Reproduction

Add sqlx v0.8.1 with feature "postgres" enabled in your Cargo.toml and try building.

Info

  • SQLx version: 0.8.1
  • SQLx features enabled: ["postgres", "chrono", "macros", "migrate", "tls-rustls", "uuid", "derive", "runtime-tokio"]
  • Database server and version: Postgres
  • Operating system: macOS Sonoma 14.6.1
  • rustc --version: rustc 1.79.0 (129f3b996 2024-06-10)

Activity

  1. oleggtro commented on Aug 24, 2024

    @oleggtro
    Author

    okay nevermind, building with rustc 1.80.1 succeeds.
    It failed with some error having to to with some size_of::<>() function, I don't remember exactly.

    So for anyone reading this: Try running rustup update to update your toolchain and then it should work fine.

  2. CommanderStorm commented on Aug 24, 2024

    @CommanderStorm
    Contributor

    The reason for this is that size_of was added to the prelude in 1.80.0

    Note

    Relevant disclaimer about MSRV of sqlx.

    Given that this is a quite simple fix, I think changing what #3457 has proposed is reasonable.
    @mallo-c: was closing the PRs (#3457, #3456) intentional?

  3. mallo-c commented on Sep 1, 2024

    @mallo-c

    was closing the PRs (#3457, #3456) intentional?

    Yes. I did rustup update and the problem disappeared so I thought that sqlx should work on latest Rustc and there is no guarantee that sqlx will work on the older versions. Sorry for my confusion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions