-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
fix(es/plugin): use #[cfg] to avoid compilation error
#11316
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
fix(es/plugin): use #[cfg] to avoid compilation error
#11316
Conversation
🦋 Changeset detectedLatest commit: 15789f7 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a compilation error caused by incorrect use of cfg!() macro instead of #[cfg] attributes for conditional compilation. The issue occurs when both plugin and manual-tokio-runtime features are enabled together, causing the code to reference SHARED_RUNTIME which is only defined when manual-tokio-runtime is not enabled.
- Replaced runtime
cfg!()macro check with compile-time#[cfg]attributes - Reorganized imports and variable declarations to be scoped within the appropriate feature flag blocks
- Maintained error handling context for the non-manual runtime path
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
CodSpeed Performance ReportMerging #11316 will not alter performanceComparing Summary
Footnotes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Binary Sizes
Commit: af8b34c |
Description:
#11267 introduced this mistake.
SHARED_RUNTIME.block_on(fut)is enabled with#[cfg(feature = "plugin")]SHARED_RUNTIMEis enabled with#[cfg(all(feature = "plugin", not(feature = "manual-tokio-runtime")))]The problem is that cfg! doesn't remove the code actually.
#[cfg]is needed here