Skip to content

Conversation

@Darksonn
Copy link
Contributor

@Darksonn Darksonn commented Aug 28, 2025

When the condition for waker/pipe.rs and the condition for selector/kqueue.rs are triggered at the same time, then there is a compilation failure unless os-ext is enabled because Selector::register is unavailable. Fix selector/kqueue.rs by making Selector::register available unconditionally, which matches the other selector implementations.

Also, when os-ext is enabled, and sys/unix is used, but cfg(unix) is false, there is a build failure because reregister is gated behind all(unix, feature="os-ext") which should be simplified to feature="os-ext". This is because sys/unix/sourcefd.rs is always used with os-ext and it always needs reregister. To fix this, cfg_io_source! is replaced with cfg_any_os_ext!.

As for wasi, a dummy selector needs to be enabled also when net is enabled without os-ext. To fix that, replace cfg_os_ext! with cfg_any_os_ext! in the shell selector.

The espidf build is failing due to rust-lang/rust#145746. The haiku build is failing due to rust-lang/rust#145952.

@Darksonn Darksonn changed the title Fix broken pipe waker Fix broken pipe waker with kqueue selector without os-ext Aug 28, 2025
@Darksonn Darksonn force-pushed the fix-pipe-waker branch 2 times, most recently from 55030d4 to 3e0689d Compare August 28, 2025 08:49
@Darksonn Darksonn changed the title Fix broken pipe waker with kqueue selector without os-ext Fix various build errors Aug 28, 2025
reregister is used by sourcefd, which is always available under os-ext,
so selectors should always provide reregister when os-ext is enabled
even if cfg(unix) fails
Copy link
Collaborator

@Thomasdezeeuw Thomasdezeeuw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these macros and features are becoming such a pain. Anyway, thanks for fixing this

@Thomasdezeeuw Thomasdezeeuw merged commit 80896b3 into master Aug 28, 2025
56 checks passed
@Darksonn Darksonn deleted the fix-pipe-waker branch August 28, 2025 11:08
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.

3 participants