diff options
author | Philip DeMonaco <phil@demona.co> | 2020-08-29 12:47:13 -0400 |
---|---|---|
committer | Georgy Yakovlev <gyakovlev@gentoo.org> | 2021-06-19 15:33:47 -0700 |
commit | 148fc783d6c6d00ea35e56e861cb5bc42d8a49c2 (patch) | |
tree | 6df1f70940961d1b62a2d2fbcd29be60007143ea | |
parent | Merge pull request #42 from telans/ebuild (diff) | |
download | cargo-ebuild-148fc783d6c6d00ea35e56e861cb5bc42d8a49c2.tar.gz cargo-ebuild-148fc783d6c6d00ea35e56e861cb5bc42d8a49c2.tar.bz2 cargo-ebuild-148fc783d6c6d00ea35e56e861cb5bc42d8a49c2.zip |
feat: include all features when pulling metadata
Optional package dependencies are not included when pulling metadata. In
some cases these packages are still required to actually build even when
those flags are turned off.
This change effectively adds `--all-features` to the call of cargo
metadata.
I don't know if this is due to a change in behavior from cargo build,
however, it seems prudent to include all possible dependencies.
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
-rw-r--r-- | src/lib.rs | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -13,6 +13,7 @@ mod metadata; use anyhow::{format_err, Context, Result}; use cargo_lock::Lockfile; use cargo_metadata::MetadataCommand; +use cargo_metadata::CargoOpt; use std::collections::BTreeSet; use std::fs::OpenOptions; use std::io::Write; @@ -56,6 +57,8 @@ fn generate_lockfile(manifest_path: Option<PathBuf>) -> Result<()> { pub fn gen_ebuild_data(manifest_path: Option<PathBuf>) -> Result<EbuildConfig> { let mut cmd = MetadataCommand::new(); + cmd.features(CargoOpt::AllFeatures); + if let Some(path) = manifest_path.as_ref() { cmd.manifest_path(path); } |