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

[BUG] plotters fails to compile in a workspace using chrono 0.4.31 #624

Closed
eric-seppanen opened this issue Aug 3, 2024 · 0 comments · Fixed by #625
Closed

[BUG] plotters fails to compile in a workspace using chrono 0.4.31 #624

eric-seppanen opened this issue Aug 3, 2024 · 0 comments · Fixed by #625
Labels
bug Something isn't working

Comments

@eric-seppanen
Copy link
Contributor

When adding a plotters 0.3.6 dependency to an existing workspace, it fails to compile:

error[E0368]: binary assignment operation `+=` cannot be applied to type `chrono::Duration`
   --> .cargo/registry/src/index.crates.io-6f17d22bba15001f/plotters-0.3.6/src/coord/ranged1d/types/datetime.rs:782:21
    |
782 |                     current += Duration::nanoseconds(period as i64);
    |                     -------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |                     |
    |                     cannot use `+=` on type `chrono::Duration`

error[E0368]: binary assignment operation `+=` cannot be applied to type `chrono::Duration`
   --> .cargo/registry/src/index.crates.io-6f17d22bba15001f/plotters-0.3.6/src/coord/ranged1d/types/datetime.rs:821:13
    |
821 |             current += Duration::days(i64::from(days_per_tick));
    |             -------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |             |
    |             cannot use `+=` on type `chrono::Duration`

The cause is that the existing workspace already uses chrono 0.4.31, and the plotters crate does not correctly specify the version it requires.

The plotters crate declares a dependency on chrono 0.4.20, but actually uses features that only exist in a later version (chrono >= 0.4.34).

This was previously noticed in #592, but is still unfixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant