tustvold opened a new pull request, #1822:
URL: https://github.com/apache/arrow-rs/pull/1822
# Which issue does this PR close?
Closes #1630
# Rationale for this change
We continue to have issues with various feature flag combinations resulting
in compile errors. A particularly pernicious variant of this occurs you need to
enable a feature of an optional dependency for tests, for example, arrow
prettyprint within parquet. To do this you add the dependency as a
dev-dependency, with the feature enabled.
However, the way feature resolution traditionally works, is that even when
building the library crate on its own, it would take into account features
enabled by the dev-dependencies. This would mask issues with feature flags. The
previous solution to this has been to have `test/dependency` crates that simply
depend on the library, without the dev-dependencies.
# What changes are included in this PR?
https://github.com/rust-lang/cargo/issues/7916 added an option to skip using
dev-dependencies when resolving features, and this was stabilised in [feature
resolver
v2](https://doc.rust-lang.org/nightly/cargo/reference/features.html#feature-resolver-version-2)
which was released in Rust 1.51. In particular with the new feature resolver
>
[Dev-dependencies](https://doc.rust-lang.org/nightly/cargo/reference/specifying-dependencies.html#development-dependencies)
do not activate features unless building a target that needs them (like tests
or examples).
This PR therefore:
* Switches to using the new feature resolver
* Uses this to test different feature flag combinations in CI
* Removes the old `test/dependency` workaround
* Fixes the bugs this turned up
Thanks to @carols10cents for the pointer :heart:
# Are there any user-facing changes?
No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]