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

Compile error with --no-default-features -F chrono #897

Closed
oeb25 opened this issue Dec 28, 2023 · 0 comments · Fixed by #898
Closed

Compile error with --no-default-features -F chrono #897

oeb25 opened this issue Dec 28, 2023 · 0 comments · Fixed by #898

Comments

@oeb25
Copy link
Contributor

oeb25 commented Dec 28, 2023

When the chrono features is enabled and the time feature is not, the scylla-cql crate fails to compile with the following error:

❯ cargo check --no-default-features -F chrono
    Checking scylla-cql v0.0.11 (scylla-rust-driver/scylla-cql)
error[E0433]: failed to resolve: use of undeclared crate or module `time`
   --> scylla-cql/src/types/serialize/value.rs:176:23
    |
176 | impl SerializeCql for time::Date {
    |                       ^^^^ use of undeclared crate or module `time`

error[E0433]: failed to resolve: use of undeclared crate or module `time`
   --> scylla-cql/src/types/serialize/value.rs:183:23
    |
183 | impl SerializeCql for time::OffsetDateTime {
    |                       ^^^^ use of undeclared crate or module `time`

error[E0433]: failed to resolve: use of undeclared crate or module `time`
   --> scylla-cql/src/types/serialize/value.rs:190:23
    |
190 | impl SerializeCql for time::Time {
    |                       ^^^^ use of undeclared crate or module `time`

For more information about this error, try `rustc --explain E0433`.
error: could not compile `scylla-cql` (lib) due to 3 previous errors

These are all annotated with #[cfg(feature = "chrono")] which perhaps should have been #[cfg(feature = "time")]. Changing these to the latter makes the crate compile; #898 proposes these changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant