launchbadge / sqlx

🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, and SQLite.
Apache License 2.0
13.48k stars 1.28k forks source link

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

Closed oleggtro closed 2 months ago

oleggtro commented 2 months ago

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

oleggtro commented 2 months ago

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.

CommanderStorm commented 2 months ago

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 https://github.com/launchbadge/sqlx/pull/3457 has proposed is reasonable. @mallo-c: was closing the PRs (#3457, #3456) intentional?

mallo-c commented 2 months ago

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.