-
Notifications
You must be signed in to change notification settings - Fork 5
Description
What happened?
I use time instead of chrono with sqlx, and apalis doesn't seem to like that very much. I've attached an example error log that happens when I try to compile apalis with apalis-cron and apalis-postgres.
Expected behavior
It should compile
Steps to reproduce
It happens for me in my repo. It's hard for me to generate an MSRV, since I'll have to isolate all the dependencies. If you can confirm that this is not trivial and it needs an MSRV, I'd be happy to do so. However, if you do happen to know the exact issue with just the error message, it would save me the trouble of isolating all my dependencies. Do let me know if you'd like an MSRV.
Alternatively, my repository is open source anyway, so I'd be happy to link to the repo for you to be able to dig around. Let me know if you would prefer that.
Minimal code example
Version
1.0.0-rc.x
Environment
- OS: macOS 26.2
- Rust version: Latest nightly (1.93)
- Cargo version: Latest nightly (1.93)
Relevant log output
error[E0277]: the trait bound `std::option::Option<DateTime<Utc>>: From<std::option::Option<OffsetDateTime>>` is not satisfied
--> /Users/rakshith/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/apalis-postgres-1.0.0-rc.1/src/queries/list_workers.rs:64:27
|
64 | let workers = sqlx::query_file_as!(
| ___________________________^
65 | | WorkerRow,
66 | | "queries/backend/list_all_workers.sql",
67 | | limit,
68 | | offset
69 | | )
| |_____________^ the trait `From<std::option::Option<OffsetDateTime>>` is not implemented for `std::option::Option<DateTime<Utc>>`
|
= help: the following other types implement trait `From<T>`:
`std::option::Option<&T>` implements `From<&std::option::Option<T>>`
`std::option::Option<&mut T>` implements `From<&mut std::option::Option<T>>`
`std::option::Option<&tracing_core::metadata::Metadata<'_>>` implements `From<&tracing_core::span::Current>`
`std::option::Option<&tracing_core::span::Id>` implements `From<&tracing::span::EnteredSpan>`
`std::option::Option<&tracing_core::span::Id>` implements `From<&tracing::span::Span>`
`std::option::Option<&tracing_core::span::Id>` implements `From<&tracing_core::span::Current>`
`std::option::Option<T>` implements `From<T>`
`std::option::Option<T>` implements `From<subtle::CtOption<T>>`
and 19 others
= note: required for `std::option::Option<OffsetDateTime>` to implement `Into<std::option::Option<DateTime<Utc>>>`
= note: this error originates in the macro `$crate::sqlx_macros::expand_query` which comes from the expansion of the macro `sqlx::query_file_as` (in Nightly builds, run with -Z macro-backtrace for more info)Additional context
No response