Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Proper conditional compile for dummy variant/function #3162

Open
NingLin-P opened this issue Oct 22, 2024 · 0 comments
Open

Proper conditional compile for dummy variant/function #3162

NingLin-P opened this issue Oct 22, 2024 · 0 comments
Labels

Comments

@NingLin-P
Copy link
Member

There is a lot of [cfg(any(feature = "std", feature = "runtime-benchmarks"))] in the codebase for dummy variants/functions that are only used for tests/benchmarks. Ideally, we should not use std but instead use #[cfg(any(test, feature = "runtime-benchmarks"))] but these items are used cross-crate and the crate is imported as production not test.

To handle them properly we need to add a new feature to the crate that contains these dummy variants/functions and add a new dependency with this feature under the [dev-dependencies] in all the crates that use it.

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

No branches or pull requests

2 participants