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

Upgrading time crate to 0.3.35 #3189

Closed
billy1624 opened this issue Apr 10, 2024 · 4 comments · Fixed by #3190 or helius-labs/photon#75
Closed

Upgrading time crate to 0.3.35 #3189

billy1624 opened this issue Apr 10, 2024 · 4 comments · Fixed by #3190 or helius-labs/photon#75
Labels
enhancement New feature or request

Comments

@billy1624
Copy link
Contributor

The time crate released a new 0.3.35 version, and it introduced a few breaking changes, mainly in the module naming and re-export path. Resulting in compile error, if one depends on the latest time release.

error[E0432]: unresolved import `time::format_description::FormatItem`
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-sqlite-0.7.4/src/types/time.rs:192:72
    |
192 |     use time::format_description::{modifier, Component::*, FormatItem, FormatItem::*};
    |                                                                        ^^^^^^^^^^ `FormatItem` is a type alias, not a module

error[E0425]: cannot find function, tuple struct or tuple variant `Component` in this scope
   --> /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/sqlx-sqlite-0.7.4/src/types/time.rs:194:34
    |
194 |     const YEAR: FormatItem<'_> = Component(Year({
    |                                  ^^^^^^^^^ not found in this scope
    |
help: consider importing one of these items
    |
192 +     use time::format_description::BorrowedFormatItem::Component;
    |
192 +     use time::format_description::OwnedFormatItem::Component;
    |

Full log: https://github.com/SeaQL/sea-query/actions/runs/8626694053/job/23645278046#step:4:452

@abonander
Copy link
Collaborator

As a temporary workaround, just pin the version of time in your dependencies:

time = "=0.3.34"

Sorry @wyatt-herkamp, I'm sure you have the best of intentions, but given the recent attack on xz-utils, I don't think it's a good idea to recommend that people patch SQLx to a repository controlled by a third party.

@wyatt-herkamp
Copy link

wyatt-herkamp commented Apr 10, 2024

As a temporary workaround, just pin the version of time in your dependencies:

time = "=0.3.34"

Sorry @wyatt-herkamp, I'm sure you have the best of intentions, but given the recent attack on xz-utils, I don't think it's a good idea to recommend that people patch SQLx to a repository controlled by a third party.

I tried doing that. However, it was still erroring out. I completely understand. I am using this in a school project so it won't get near production.

Also I deleted the comment. I plan to delete the REPO as soon as an official fix has been released.

@gilgabo
Copy link

gilgabo commented Apr 10, 2024

Hi, all our pipelines are failing by this issue, any estimated deadline?

@billy1624
Copy link
Contributor Author

If anyone is still having the same issue, please upgrade your local time dependency to 0.3.36, just like:

The breaking change in time crate has been patched in 0.3.36 but not in 0.3.35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants