From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 9507D1382C5 for ; Sat, 19 Jun 2021 22:34:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AC08EE0837; Sat, 19 Jun 2021 22:34:24 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8F268E0837 for ; Sat, 19 Jun 2021 22:34:24 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 448373405BB for ; Sat, 19 Jun 2021 22:34:23 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C93E273A for ; Sat, 19 Jun 2021 22:34:21 +0000 (UTC) From: "Georgy Yakovlev" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Georgy Yakovlev" Message-ID: <1624142027.148fc783d6c6d00ea35e56e861cb5bc42d8a49c2.gyakovlev@gentoo> Subject: [gentoo-commits] proj/cargo-ebuild:master commit in: src/ X-VCS-Repository: proj/cargo-ebuild X-VCS-Files: src/lib.rs X-VCS-Directories: src/ X-VCS-Committer: gyakovlev X-VCS-Committer-Name: Georgy Yakovlev X-VCS-Revision: 148fc783d6c6d00ea35e56e861cb5bc42d8a49c2 X-VCS-Branch: master Date: Sat, 19 Jun 2021 22:34:21 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: fa7e3cd4-fabc-4c7c-a41b-9d58faa74f52 X-Archives-Hash: 5776d929497321349f817a04362207e3 commit: 148fc783d6c6d00ea35e56e861cb5bc42d8a49c2 Author: Philip DeMonaco demona co> AuthorDate: Sat Aug 29 16:47:13 2020 +0000 Commit: Georgy Yakovlev gentoo org> CommitDate: Sat Jun 19 22:33:47 2021 +0000 URL: https://gitweb.gentoo.org/proj/cargo-ebuild.git/commit/?id=148fc783 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 gentoo.org> src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 637846e..b7616b7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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) -> Result<()> { pub fn gen_ebuild_data(manifest_path: Option) -> Result { let mut cmd = MetadataCommand::new(); + cmd.features(CargoOpt::AllFeatures); + if let Some(path) = manifest_path.as_ref() { cmd.manifest_path(path); }