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

Stop enabling all features by default in libherokubuildpack #768

Open
edmorley opened this issue Feb 1, 2024 · 0 comments
Open

Stop enabling all features by default in libherokubuildpack #768

edmorley opened this issue Feb 1, 2024 · 0 comments
Labels
faster compiles Things that improve compile times libherokubuildpack

Comments

@edmorley
Copy link
Member

edmorley commented Feb 1, 2024

By default libherokubuildpack has all Cargo features enabled:

default = ["command", "download", "digest", "error", "log", "tar", "toml", "fs", "write"]

It's then up to consumers of the crate to know that they probably should disable features they aren't using, to save pulling in lots of unnecessary dependencies.

Whilst this reduces the confusion/friction for people who don't know how to enable a Cargo feature (since everything works out of the box), its very rare that anyone needs all features, so literally every consumer should really switch to default-features = false eventually.

Lots of consumers of the crate aren't doing this (even those maintained by experienced Rust users), eg:

And even the ones that are, often are doing so only because I fixed them:

We should either not enable any features by default, or only enable the most commonly used ones (eg logging).

@edmorley edmorley added the faster compiles Things that improve compile times label Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
faster compiles Things that improve compile times libherokubuildpack
Projects
None yet
Development

No branches or pull requests

1 participant