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

Workaround for https://github.com/rust-lang/cargo/issues/10788 #31

Merged

Conversation

dahlbaek
Copy link
Contributor

As described in Cargo Issue 10788, until Rust 1.71 there were cases where the dependency/feature syntax would not work correctly when used in combination with the dep:dependency syntax. Workarounds include adding an explicit feature

dependency = ["dep:dependency"]

but in many (most?) cases it is enough to only enable the dependency feature if the dependency is already enabled, via the dependency?/feature syntax.

For context, here are some workarounds employed by others:

As described in Cargo Issue 10788, until Rust 1.71 there were
cases where the dependency/feature syntax would not work correctly
when used in combination with the dep:dependency syntax. Workarounds
include adding an explicit feature

dependency = ["dep:dependency"]

but in many (most?) cases it is enough to only enable the dependency feature
if the dependency is already enabled, via the dependency?/feature
syntax.

For context, here are some workarounds employed by others:
- mstange/samply@89456d4
- alexrudy/tonic@f386954
- jwodder/confab@6f0e2fc
@dahlbaek dahlbaek changed the title Workaround for https://github.com/rust-lang/cargo/issues/10788 Workaround for cargo/issues/10788 May 17, 2024
@dahlbaek dahlbaek changed the title Workaround for cargo/issues/10788 Workaround for rust-lang/cargo/#10788 May 17, 2024
@dahlbaek dahlbaek changed the title Workaround for rust-lang/cargo/#10788 Workaround for rust-lang/cargo/issues/10788 May 17, 2024
@dahlbaek dahlbaek changed the title Workaround for rust-lang/cargo/issues/10788 Workaround for rust-lang/cargo#10788 May 17, 2024
@dahlbaek dahlbaek changed the title Workaround for rust-lang/cargo#10788 Workaround for https://github.com/rust-lang/cargo/issues/10788 May 17, 2024
@Seeker14491 Seeker14491 merged commit b6ead40 into Seeker14491:master May 18, 2024
5 checks passed
@Seeker14491
Copy link
Owner

Thanks! With the way I wrote these features, I've now discovered that we were pulling in the dbus crate by default, which is not intended; it's only supposed to be pulled in when enabling the reveal feature. This PR also fixes this regression.

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

Successfully merging this pull request may close these issues.

2 participants