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

Add a feature to explicitly enable "std" #145

Merged
merged 2 commits into from
Sep 1, 2020

Conversation

cuviper
Copy link
Member

@cuviper cuviper commented Aug 6, 2020

If you know you need "std", e.g. relying on default S = RandomState,
then you can enable this feature to force it on, bypassing target
detection. This may help scenarios where autocfg fails detection, like
issue #144, but at the very least it will speed up the build script by
avoiding extra rustc invocations.

If you know you need "std", e.g. relying on default `S = RandomState`,
then you can enable this feature to force it on, bypassing target
detection. This may help scenarios where `autocfg` fails detection, like
issue indexmap-rs#144, but at the very least it will speed up the build script by
avoiding extra `rustc` invocations.
@cuviper
Copy link
Member Author

cuviper commented Sep 1, 2020

OK, I'm going to release this as 1.5.2.

@cuviper cuviper merged commit e53a6c0 into indexmap-rs:master Sep 1, 2020
carols10cents added a commit to integer32llc/arrow-rs that referenced this pull request Dec 3, 2021
The indexmap crate uses the autocfg crate to do target detection to
determine whether `std` is available. Arrow isn't targeting `no_std`
environments, so the target detection isn't necessary. This might save
some build time.

indexmap-rs/indexmap#145
carols10cents added a commit to integer32llc/arrow-rs that referenced this pull request Dec 3, 2021
The indexmap crate uses the autocfg crate to do target detection to
determine whether `std` is available. Arrow isn't targeting `no_std`
environments, so the target detection isn't necessary. This might save
some build time.

indexmap-rs/indexmap#145
alamb pushed a commit to apache/arrow-rs that referenced this pull request Dec 4, 2021
* Disable default features of chrono; only enable features needed

Chrono's default features contain "oldtime", which is deprecated.
According to [the docs](https://docs.rs/chrono/0.4.19/chrono/#duration),

> new code should disable the oldtime feature and use the
> chrono::Duration type instead. The oldtime feature is enabled by
> default for backwards compatibility, but future versions of Chrono
> are likely to remove the feature entirely.

so follow that recommendation by setting default-features to false. And
actually, only Arrow needs the "clock" feature, so all the other
features can stay off too to minimize the feature set that projects
depending on arrow or parquet are forced to enable.

* Explicitly enable indexmap's "std" feature

The indexmap crate uses the autocfg crate to do target detection to
determine whether `std` is available. Arrow isn't targeting `no_std`
environments, so the target detection isn't necessary. This might save
some build time.

indexmap-rs/indexmap#145
alamb pushed a commit to apache/arrow-rs that referenced this pull request Dec 9, 2021
* Disable default features of chrono; only enable features needed

Chrono's default features contain "oldtime", which is deprecated.
According to [the docs](https://docs.rs/chrono/0.4.19/chrono/#duration),

> new code should disable the oldtime feature and use the
> chrono::Duration type instead. The oldtime feature is enabled by
> default for backwards compatibility, but future versions of Chrono
> are likely to remove the feature entirely.

so follow that recommendation by setting default-features to false. And
actually, only Arrow needs the "clock" feature, so all the other
features can stay off too to minimize the feature set that projects
depending on arrow or parquet are forced to enable.

* Explicitly enable indexmap's "std" feature

The indexmap crate uses the autocfg crate to do target detection to
determine whether `std` is available. Arrow isn't targeting `no_std`
environments, so the target detection isn't necessary. This might save
some build time.

indexmap-rs/indexmap#145
@cuviper cuviper deleted the explicit-std branch July 18, 2023 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants