-
Notifications
You must be signed in to change notification settings - Fork 146
Description
Describe the bug
When Tide is active on macOS and I enter a nix-shell, the prompt prints a warning at every redraw: warning: unhandled Platform key FamilyDisplayName
This only happens when the PATH inside nix-shell resolves xcrun to the Nix-provided xcbuild xcrun instead of Apple’s /usr/bin/xcrun. Tide appears to invoke xcrun (likely during a language/SDK probe) and the xcbuild version emits this warning repeatedly, making the prompt noisy. One extra prompt line for every new prompt line.
Expected: Tide should not emit warnings on every prompt redraw, and should either avoid calling noisy tools, ignore stderr from probes, cache results, or prefer /usr/bin/xcrun on macOS when available.
Steps to reproduce
- On macOS, install Nix via the official installer: sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install)|2. Use fish as your shell and enable Tide as the prompt.
- Enter a nix-shell whose PATH resolves the Nix xcbuild xcrun ahead of /usr/bin (to make reproduction deterministic, use a minimal shell.nix like):
- shell.nix:
with import <nixpkgs> {}; mkShell { buildInputs = [ xcbuild ]; }
- In the nix-shell, press Enter or start typing. Observe that the warning “unhandled Platform key FamilyDisplayName” appears at each prompt redraw.
- Confirm that replacing the prompt with a minimal fish_prompt suppresses the warning:
- function fish_prompt; echo '> '; end.
- function fish_right_prompt; end After this, the warning no longer appears.
Environment
Output of tide bug-report:
fish version: 4.1.2
tide version: 6.2.0
term: xterm-ghostty
os: macos tahoe 26.0.1
terminal emulator: ghostty
fish startup: 24.30 millis
fisher plugins: ilancosman/tide@v6 edc/bass patrickf1/colored_man_pages.fish patrickf1/fzf.fish
Additional context
The warning seems to originate from xcbuild’s xcrun parsing modern Xcode Platform plists and printing “unhandled Platform key FamilyDisplayName” on stderr. Because Tide runs its checks at each prompt redraw, the warning appears repeatedly.
Additional checks that demonstrate the PATH-based origin:
type -a xcruninside a nix0shell shows the Nix xcbuild xcrun before /usr/bin/xcrun
❯ type -a xcrun
xcrun is /nix/store/...-xcrun/bin/xcrun
xcrun is /usr/bin/xcrun
- The Nix xcbuild xcrun prints version 1 and cannot find the SDK:
/nix/store/...-xcbuild-...-xcrun/bin/xcrun --version -> “xcrun version 1 (xcbuild)”
/nix/store/...-xcbuild-...-xcrun/bin/xcrun --sdk macosx --show-sdk-version -> “error: unable to find sdk: 'macosx'” - Apple’s xcrun works and is quiet:
/usr/bin/xcrun --version -> “xcrun version 72.”
/usr/bin/xcrun --sdk macosx --show-sdk-version -> prints the SDK version without warnings.