Skip to content

refactor(fspy): also gate ipc channel module out on android#329

Closed
branchseer wants to merge 1 commit intomainfrom
claude/gate-ipc-channel-android-musl
Closed

refactor(fspy): also gate ipc channel module out on android#329
branchseer wants to merge 1 commit intomainfrom
claude/gate-ipc-channel-android-musl

Conversation

@branchseer
Copy link
Copy Markdown
Member

Summary

Extend the not(target_env = "musl") gate on fspy_shared::ipc::channel (and all downstream ChannelConf/channel() references) to also exclude target_os = "android". On both musl and android, the preload library's IPC channel is unavailable, so the shared-memory channel module has no purpose there.

  • fspy_shared::ipc::channel module gated on all(not(target_os = "android"), not(target_env = "musl"))
  • fspy::ipc module (which re-exports OwnedReceiverLockGuard and SHM_CAPACITY) similarly gated
  • fspy::unix::SpyImpl::spawn channel creation, Payload::ipc_channel_conf field init, ipc_receiver_lock_guard creation and field, PathAccessIterable::iter() branch — all updated
  • Payload::ipc_channel_conf field and ChannelConf import in fspy_shared_unix::payload — updated

Preload-library gates (preload_path, NativeStr import, PRELOAD_CDYLIB_BINARY, fspy_preload_unix) are left untouched — they remain musl-only for this PR.

Test plan

  • cargo check --workspace --all-features --all-targets --locked on host (glibc)
  • cargo check --workspace --all-features --target x86_64-unknown-linux-musl
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo fmt --check
  • RUSTDOCFLAGS='-D warnings' cargo doc --no-deps --document-private-items
  • cargo test -p fspy --test node_fs (exercises full spawn + IPC pipeline, 8 pass)

https://claude.ai/code/session_01VqiMHiGeViu1pGhWwJ67Qc

Extend the `not(target_env = "musl")` gate on `fspy_shared::ipc::channel`
(and all downstream `ChannelConf`/`channel()` references) to also
exclude `target_os = "android"`.

https://claude.ai/code/session_01VqiMHiGeViu1pGhWwJ67Qc
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 340c663968

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +1 to 2
#[cfg(all(not(target_os = "android"), not(target_env = "musl")))]
pub mod channel;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Gate preload IPC references on Android

Excluding fspy_shared::ipc::channel for Android here leaves downstream Android builds with unresolved symbols: fspy_preload_unix still imports channel::Sender and accesses encoded_payload.payload.ipc_channel_conf unconditionally (crates/fspy_preload_unix/src/client/mod.rs, lines 11 and 48). On target_os="android" + non-musl, this commit removes the module/field definitions but does not gate or replace those call sites, so compiling the preload crate fails.

Useful? React with 👍 / 👎.

@branchseer branchseer closed this Apr 13, 2026
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.

2 participants