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

request: some sort of argument to add "optional" deps as features #28

Closed
kentfredric opened this issue Mar 14, 2020 · 1 comment · Fixed by #34
Closed

request: some sort of argument to add "optional" deps as features #28

kentfredric opened this issue Mar 14, 2020 · 1 comment · Fixed by #34
Labels
A-features Area: features (--feature-powerset, --each-feature, etc.) C-enhancement Category: A new feature or an improvement for an existing one

Comments

@kentfredric
Copy link

Any time an optional dependency is specified, that internally becomes visible as a feature flag, eg:

[dependencies.foo]
version = "1.0"
optional = true

Can of course, be enabled with --features foo

And rust code can check for it with

#[cfg(feature = "foo")]

And code can activate that path via

[dependencies.bar]
features = ["foo"]

Subsequently, it would be nice to have, at least as an option, these hidden features in --each-feature and --feature-powerset to test for this case.

@taiki-e taiki-e added the C-enhancement Category: A new feature or an improvement for an existing one label Mar 19, 2020
bors bot added a commit that referenced this issue Apr 23, 2020
34: Add --optional-deps flag r=taiki-e a=taiki-e

```txt
--optional-deps             Use optional dependencies as features,
                            this flag can only be used with either
                            `--each-feature` or `--feature-powerset`
```

Closes #28


Co-authored-by: Taiki Endo <[email protected]>
bors bot added a commit that referenced this issue Apr 23, 2020
34: Add --optional-deps flag r=taiki-e a=taiki-e

```txt
--optional-deps             Use optional dependencies as features,
                            this flag can only be used with either
                            `--each-feature` or `--feature-powerset`
```

Closes #28


Co-authored-by: Taiki Endo <[email protected]>
@bors bors bot closed this as completed in d08fe29 Apr 23, 2020
@bors bors bot closed this as completed in #34 Apr 23, 2020
@taiki-e
Copy link
Owner

taiki-e commented Apr 24, 2020

Added in 0.3.5 (#34).

@taiki-e taiki-e added the A-features Area: features (--feature-powerset, --each-feature, etc.) label Oct 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-features Area: features (--feature-powerset, --each-feature, etc.) C-enhancement Category: A new feature or an improvement for an existing one
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants