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

parquet does not compile with features=["zstd"] #1630

Closed
alamb opened this issue Apr 29, 2022 · 4 comments · Fixed by #1822
Closed

parquet does not compile with features=["zstd"] #1630

alamb opened this issue Apr 29, 2022 · 4 comments · Fixed by #1822
Assignees
Labels
bug parquet Changes to the parquet crate

Comments

@alamb
Copy link
Contributor

alamb commented Apr 29, 2022

reported by @zeroflaw

A project with

parquet = { version = "12.0.0", default-features = false, features = ["zstd"] }

Fails to compile with

format!("{}", dt.format("%Y-%m-%d %H:%M:%S %:z")) | ^^^^^^ method not found in DateTime<Utc>

chrono = { version = "0.4", default-features = false }

This should not have default-features = false

Originally posted by @zeroflaw in #1623 (comment)

@alamb alamb added parquet Changes to the parquet crate bug labels Apr 29, 2022
@alamb
Copy link
Contributor Author

alamb commented Apr 29, 2022

One way to work around this is to manually add a dependency on chrono with the correct features, such as

chrono = { version = "0.4" }
parquet = { version = "12.0.0", default-features = false, features = ["zstd"] }

@zeroflaw
Copy link

Thats what I did, but it was not required in version 11.
If a compile error is expected, then i'm happy with the solution.

@alamb
Copy link
Contributor Author

alamb commented Apr 29, 2022

If a compile error is expected, then i'm happy with the solution.

No I don't think a compile error is expected. This definitely seems like a bug -- I just wanted to document the issue (and solution) in case someone else ran into it as well

I am not sure removing default-features=false is the right fix -- I think that was changed to minimize the size of the arrow dependency stack -- done in #1000 by @carols10cents

More investigation is required to figure out the right fix I think

@asayers
Copy link
Contributor

asayers commented May 17, 2022

FWIW I've had this in my Cargo.toml since parquet-0.9:

# Chrono is not a direct dependency; it's a dependency of "parquet".  However,
# parquet's Cargo.toml is slightly buggy, so if we don't specify chrono here
# then parquet fails to compile.
chrono = { version = "0.4.19", default-features = false, features = ["clock"] }

@tustvold tustvold self-assigned this Jun 8, 2022
tustvold added a commit to tustvold/arrow-rs that referenced this issue Jun 8, 2022
tustvold added a commit to tustvold/arrow-rs that referenced this issue Jun 8, 2022
tustvold added a commit to tustvold/arrow-rs that referenced this issue Jun 8, 2022
tustvold added a commit that referenced this issue Jun 9, 2022
…I, fix errors (#1630) (#1822)

* Test more feature flag combinations in CI (#1630)

* Clippy lints

* Fix clippy fix

* Fix running examples from workspace root

* Format

* Fix arrow benchmark features

* Split up CI yaml

* Add docs

* Rework caching

* Use lockfile for cache key

Don't install unused components
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug parquet Changes to the parquet crate
Projects
None yet
4 participants