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

Disable default-features on stellar-xdr workspace dependency #559

Merged
merged 6 commits into from
Nov 3, 2022

Conversation

leighmcculloch
Copy link
Member

@leighmcculloch leighmcculloch commented Nov 3, 2022

What

Disable default-features on stellar-xdr workspace dependency..

Why

When I recently moved the dependencies to the workspace, I didn't realize that the workspace dependencies were additive in regards to features. This meant that default features, which includes the std feature in the stellar-xdr, are enabled unless the workspace dependency explicitly turns it off. The default features are enabled even for crates that explicitly turn them off, because features are always additive in a workspace.

I've introduced a test a crate that imports the common crate, and adds a panic handler, which is a hack to detect if std was imported or not, as a way to prevent this from accidentally happening again.

@leighmcculloch leighmcculloch requested a review from a team as a code owner November 3, 2022 00:58
@leighmcculloch leighmcculloch enabled auto-merge (squash) November 3, 2022 00:58
@leighmcculloch leighmcculloch enabled auto-merge (squash) November 3, 2022 03:23
@leighmcculloch leighmcculloch merged commit 744472c into main Nov 3, 2022
@leighmcculloch leighmcculloch deleted the calophyllum-compellably branch November 3, 2022 03:29
@leighmcculloch
Copy link
Member Author

Reported this issue to the cargo repo at rust-lang/cargo#11329.

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.

1 participant