Skip to content

fix(macos): cargo xtask ci passes on macOS - #1317

Closed
mattsivak wants to merge 1 commit into
storytold:mainfrom
mattsivak:fix/macos-ci
Closed

mattsivak wants to merge 1 commit into
storytold:mainfrom
mattsivak:fix/macos-ci

Conversation

@mattsivak

Copy link
Copy Markdown
Contributor

On macOS, cargo xtask ci fails on main (0.7.1, rustc 1.99, APFS) in four places. None of them are seen by CI, which doesn't build macOS. This fixes all four; Linux and Windows behave as before.

  • crates/pipeline/src/spots.rs: clippy's chunks_exact_to_as_chunks lint now uses out.as_chunks::<3>(). That's stable since Rust 1.88, and the workspace MSRV is 1.90.
  • crates/catalog/src/tests_lock.rs: the spawn loop ran /bin/true, which macOS doesn't have (it's /usr/bin/true), so it now runs true from PATH.
  • crates/engine/src/tests_lightroom_folder.rs: APFS refuses non-UTF-8 file names with EILSEQ (os error 92). The non-UTF-8 checks now run only where the file system can create such a name. Any other error still fails the test, and the symlink checks always run.
  • crates/ui-egui/src/tests_dialog_fit.rs: on macOS the Export dialog is 876 pt tall, because of the macOS-only "Add to Apple Photos" row (+30). Elsewhere the test still expects 846.

The on_exit(self, None) build fix is already in 0.7.1 (701f78e).

Testing: cargo xtask ci passes all 8 steps on macOS (Apple M4 Max).

Note for macOS contributors: the engine sidecar::tests_repair_* tests create a.xmp and A.XMP side by side, so they need a case-sensitive TMPDIR. They fail on the default case-insensitive APFS volume. I ran CI with TMPDIR on a case-sensitive disk image:

hdiutil create -size 4g -type SPARSE -fs 'Case-sensitive APFS' -volname cs /tmp/cs.sparseimage
hdiutil attach /tmp/cs.sparseimage -mountpoint /tmp/cs -nobrowse
TMPDIR=/tmp/cs/ cargo xtask ci

This PR leaves those tests alone. Making them skip on case-insensitive file systems could be a follow-up.

Four macOS-only failures on 0.7.1 (rustc 1.99, APFS):
- pipeline/spots.rs: clippy's chunks_exact_to_as_chunks (as_chunks::<3>, stable since 1.88;
  MSRV is 1.90).
- catalog tests_lock: the spawn loop ran /bin/true, which macOS doesn't have; run `true` from
  PATH.
- engine tests_lightroom_folder: APFS refuses non-UTF-8 file names (EILSEQ). Those checks run
  only where the folder can be made; any other error still fails the test. The symlink checks
  always run.
- ui-egui tests_dialog_fit: on macOS the Export dialog is 876 tall (the macOS-only "Add to Apple
  Photos" row adds 30); elsewhere it stays 846.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@FredApps FredApps left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code review only; I'm on Linux, so I couldn't run it on macOS. On Linux, the touched crates' tests pass at 9aaeb91 (see below).

  • tests_lock.rs: Command::new("true") resolves through PATH, which is fine on macOS (/usr/bin/true) and Linux.
  • tests_lightroom_folder.rs: skipping the non-UTF-8 part only when the file system rejects the name (EILSEQ 92 on macOS, or InvalidFilename/InvalidInput), and panicking on anything else, keeps the Linux coverage. The symlink checks now use a plain catalogs folder, so they run everywhere.
  • tests_dialog_fit.rs: cfg!(target_os = "macos") for the 30 pt Apple Photos row works, but it couples the test to that row's height. Computing the expected height from the row's registered rect would hold up better if the row changes.
  • spots.rs: the as_chunks change is the same as in #997, #1104 (4b1c5b4), #1308 and #1286 (ad7b302). Whichever lands first, the others should take its version.

Approving.

Tests: On Linux: catalog, engine and pipeline pass; ui-egui 739 passed. The only failures are the 6 tests_model_setup tests, which need the denoise feature; they fail the same way on every PR when ui-egui is tested without the app crate. I couldn't run anything on macOS.

@bflatastic

Copy link
Copy Markdown
Member

These four fixes landed separately: #997 (batch 32a) and #990, #1003, #1018 (in #1431). cargo xtask ci passes on main again. Closing as covered. Thank you for the work, @mattsivak!


Generated by Claude Code

@bflatastic bflatastic closed this Oct 13, 2026
AlexChambers added a commit to AlexChambers/lightcraft that referenced this pull request Nov 14, 2026
… Z 7 lens modes (storytold/craft-libs#1314)

craft-raw, craft-tiff, craft-crw, craft-metadata and craft-image-codecs move together from f0f4758c0, because they
share types. a207d20 is the merge of storytold#1314; no craft-libs main commit has storytold#1314 without the same-day changes before
it, so these come along in the crates LightCraft uses: image-codecs keeps unmarked CMYK JPEG samples and fixes their
polarity (storytold#1317), adds jpeg_info and its coefficient counts, and lists InkSet and ExtraSamples on TiffPage (storytold#1307);
craft-jpeg gains an optimized baseline encoder (storytold#1298). The b77af389f pins have no change up to a207d20 and stay.
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