Fix pixi environment solving on macOS (osx-arm64) #306
Conversation
|
Thanks for the PR! Fantastic that pixi can now be used for MacOS, this is awesome. It seems though the serial server changes cause a regression - the backend tests appear to be stuck on all platforms except MacOS. |
|
It works when I replace disconnect() by this on my Linux machine: Perhaps that also works for MacOS... |
|
ooh I'll try that! I'm currently fighting my Colima install, but nearly there I think |
|
Ok I have a fix I think... CORRECTION the guard clause is in telnet.py not test_telnet_transport.py, copied the wrong filename :/ |
- Scope libglvnd (X11-only) to linux-64; it has no osx-arm64 build and was blocking every environment from solving - Pin scipy/numpy to match requirements.txt and the linux-64 lock - Move libvips into the shared deps; pyvips needs it on every platform
Running tests via pixi on osx-arm64 for the first time surfaced bugs Linux CI never exercised: - SerialServerTransport closed its PTY slave fd immediately; macOS's PTY driver raises EIO on the master once no process holds the slave open, so keep our own fd open for the transport's lifetime - TelnetTransport.disconnect() double-fired DISCONNECTED, since cancelling the connection task doesn't raise CancelledError through it (the loop swallows it and exits normally) - Telnet integration tests asserted server-side state right after connect() returned; that ordering isn't guaranteed across event loop backends, so poll for it instead
- Correct the install guide's "Linux Only" admonition, which was false as of the previous commits in this branch - Add a macOS section to the developer setup guide, mirroring the existing Linux one
- The connection task can be cancelled before its first scheduling slot, so _manage_connection's finally block never runs and the writer is never closed - guard on self.writer instead of returning unconditionally, so cleanup happens exactly once either way - Catch OSError alongside ConnectionResetError on wait_closed() - Clear self._connection_task after handling it
249c908 to
22f3431
Compare
|
Yep, your approach is much cleaner than the disconnect() fallback. Thanks! |
Adds osx-arm64 to Pixi's supported platforms and fixes dependency solving so all four environments solve and
pixi run rayforgeruns on Apple Silicon. Running the test suite on macOS for the first time also surfaced two minor macOS-only bugs, now fixed.Changes
libglvnd(X11-only) tolinux-64; it has no osx-arm64 build and was blocking every environment from solvingscipy/numpyto matchrequirements.txtand the existing linux-64 locklibvipsinto the shared deps;pyvipsneeds it on every platformSerialServerTransportclosing its PTY slave fd immediately, which raises EIO on macOS once no process holds the slave openTelnetTransport.disconnect()double-firing DISCONNECTED, since cancelling the connection task doesn't raise CancelledError through itChecks