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

Preserving manually selected features across updates #180

Closed
tranzystorekk opened this issue May 23, 2022 · 3 comments
Closed

Preserving manually selected features across updates #180

tranzystorekk opened this issue May 23, 2022 · 3 comments
Labels

Comments

@tranzystorekk
Copy link
Contributor

tranzystorekk commented May 23, 2022

Does cargo-update know about any features that were selected during install, or does it do updates with only the defaults?

Case in point: cargo-expand has the prettyplease feature that has to be enabled by hand, and I'm wondering if it's lost on each update?

@nabijaczleweli
Copy link
Owner

nabijaczleweli commented May 23, 2022

It doesn't, because, fundamentally, that is not saved anywhere in the Cargo metadata. You can run cargo install-update-config -f prettyplease cargo-expand which will also enable the feature on subsequent updates (i.e. by installing via cargo install --features=prettyplease cargo-expand).

@nabijaczleweli nabijaczleweli closed this as not planned Won't fix, can't repro, duplicate, stale May 23, 2022
@tranzystorekk
Copy link
Contributor Author

Thank you for the info!

@dotdash
Copy link

dotdash commented Sep 25, 2022

This information is present in the .crates2.json file, any chance that could be used?

  "sqlx-cli 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)": {
    "version_req": "0.6.0",
    "bins": [
      "cargo-sqlx",
      "sqlx"
    ],
    "features": [
      "postgres",
      "rustls"
    ],
    "all_features": false,
    "no_default_features": true,
    "profile": "release",
    "target": "x86_64-unknown-linux-gnu",
    "rustc": "rustc 1.64.0 (a55dd71d5 2022-09-19)\nbinary: rustc\ncommit-hash: a55dd71d5fb0ec5a6a3a9e8c27b2127ba491ce52\ncommit-date: 2022-09-19\nhost: x86_64-unknown-linux-gnu\nrelease: 1.64.0\nLLVM version: 14.0.6\n"
  },

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

No branches or pull requests

3 participants