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 with feature postgres and runtime-tokio fails to build. #3480

Closed
xelox opened this issue Sep 3, 2024 · 2 comments
Closed

Sqlx with feature postgres and runtime-tokio fails to build. #3480

xelox opened this issue Sep 3, 2024 · 2 comments
Labels

Comments

@xelox
Copy link

xelox commented Sep 3, 2024

Bug Description

I actually solved my issue by reverting to v0.8.0 from v0.8.1. It failed to compile with this error:

sqlx-postgres-0.8.1/src/types/cube.rs:307:33
    |
307 |     const PACKED_WIDTH: usize = size_of::<u32>();
    |                                 ^^^^^^^ not found in this scope
    |

Minimal Reproduction

A code snippet shouldn't be necessary, the bug prevents the crate from building before starting to compile my project itself.

Info

  • SQLx version: 0.8.1
  • SQLx features enabled: postgres, runtime-tokio
  • Database server and version: [REQUIRED] Postgres 16.3
  • Operating system: Arch Linux x86_64 6.10.7-arch1-1
  • rustc --version: 1.79.0
@xelox xelox added the bug label Sep 3, 2024
@tveness
Copy link

tveness commented Sep 3, 2024

I was just encountering this myself. It looks like it has been resolved in PR3459, and this code is yet to make it into a released version yet (as it is also still v0.8.1). So hopefully the next release should be free of this error! Possibly helpful to pin your code to 0.8.0 in the meantime? e.g.

sqlx = { version = "=0.8.0", features = ["postgres", "runtime-tokio"] }

@xelox
Copy link
Author

xelox commented Sep 3, 2024

@tveness Yes that's indeed what solved the issue for me! I didn't find PR3459 so I was just reporting the bug. I'm closing this now 👍

@xelox xelox closed this as completed Sep 3, 2024
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

2 participants