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

Feature not properly Guarded #2863

Open
MTaliancich opened this issue May 16, 2024 · 1 comment
Open

Feature not properly Guarded #2863

MTaliancich opened this issue May 16, 2024 · 1 comment

Comments

@MTaliancich
Copy link

MTaliancich commented May 16, 2024

The following line causes a compile failure with the Client and (native_tls_backend or rustls_backend) options selected:

use crate::gateway::ActivityData;

Cargo.toml snippit:
serenity = { version = "0.12", default-features = false, features = ["client", "rustls_backend"] }

The line below it has a guard for the import:

#[cfg(feature = "gateway")]

This is just one example, I have now found several areas that cause issues when compiling due to an unguarded area of code. Perhaps it is intended that enabling the feature was supposed to toggle these other features as-well but was forgotten.

@GnomedDev
Copy link
Member

Overall the serenity feature situation is a mess, we will accept PRs to current to fix it but I'm planning on removing a lot of feature guards in 0.13 so it becomes feasible to run cargo hack --feature-superset check to check all feature combinations compile.

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

No branches or pull requests

2 participants