Skip to content

fix build and run on mac osx#16

Open
gilwo wants to merge 3 commits into
199-biotechnologies:mainfrom
gilwo:main
Open

fix build and run on mac osx#16
gilwo wants to merge 3 commits into
199-biotechnologies:mainfrom
gilwo:main

Conversation

@gilwo

@gilwo gilwo commented Jun 15, 2026

Copy link
Copy Markdown

had couple of issues when trying to build on mac osx:

  • silence dead-code to build successfully
  • hang on SIGNINT when terminal is open on QR
  • crash when sending messages

gilwo added 3 commits June 14, 2026 20:09
The image-dimensions fast path is exercised only by tests, so the
production build flagged it as unused. Mark it #[allow(dead_code)]
to keep the API and its test coverage while restoring a warning-free
build. Cargo.lock picks up routine point-release dependency bumps
from the rebuild.

Powered-By: Claude Opus 4.8 (1M context)
The REPL spawns tokio::io::stdin(), which reads on a blocking
background thread parked in a read() syscall. On SIGINT the bridge
drained and main returned, but the runtime's drop blocked forever
waiting on that stuck reader whenever stdin stayed open (interactive
terminal or live pipe) — so the process only exited cleanly when
stdin was closed/redirected.

Make the REPL loop break on the cancel token via tokio::select!, and
exit explicitly with std::process::exit(0) after graceful shutdown
completes so the parked stdin thread can't keep the process alive.
Verified: SIGINT with stdin held open now exits in ~2s, code 0, no
kill -9 needed.

Powered-By: Claude Opus 4.8 (1M context)
handle_event (608 lines) → extract_content_inner (420 lines) generates
a massive async state machine that overflows tokio's default 2 MB worker
stack in debug builds, causing silent "stack overflow, aborting" crashes
whenever inbound WhatsApp messages arrive. Switching from #[tokio::main]
to a manual runtime builder with 8 MB stacks eliminates the overflow.

Powered-By: Claude Opus 4.8 (1M context)
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.

1 participant