Skip to content

fix(build): stop forcing a nonexistent DEVELOPER_DIR on Command Line Tools-only machines - #1457

Open
4ni1ak wants to merge 1 commit into
AprilNEA:masterfrom
4ni1ak:fix/cargo-developer-dir-clt-only
Open

4ni1ak wants to merge 1 commit into
AprilNEA:masterfrom
4ni1ak:fix/cargo-developer-dir-clt-only

Conversation

@4ni1ak

@4ni1ak 4ni1ak commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • .cargo/config.toml unconditionally set DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer (with force = false) for every macOS cargo invocation, meant as a "belt-and-suspenders" fallback for a contributor who has Xcode installed but xcode-select pointed at the Command Line Tools.
  • Cargo's [env] table is static TOML — there is no way to check whether that path actually exists before applying it. On a machine with only the Command Line Tools installed (no Xcode.app at all), or Xcode installed under a non-standard name like Xcode-beta.app, this pointed every dependency's build-script linker step at a path that doesn't exist. cargo build/check/test failed before compiling a single workspace crate — not just the GUI's Metal shader step this was meant to help.
  • force = false never protected against this: it only yields to a DEVELOPER_DIR already exported in the calling shell, which a plain xcode-select misconfiguration never sets on its own — so the override always won in exactly the broken case.

Changes

  • crates/.cargo/config.toml: removed the static [env] DEVELOPER_DIR block, replaced with a comment explaining why and pointing at the one-time system fix (sudo xcode-select -s /Applications/Xcode.app/Contents/Developer) for a contributor who does have Xcode but a misconfigured selector.

Testing

  • cargo fmt --all -- --check
  • RUSTFLAGS="-D warnings" cargo clippy --workspace --all-targets -- -D warnings
  • RUSTFLAGS="-D warnings" cargo test --workspace
  • RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --document-private-items --exclude openlogi-ui --exclude openlogi-desktop --exclude openlogi-overlay --exclude openlogi-agent
  • Full tier since .cargo/config.toml is a workspace-wide build input.
  • Verified devenv.nix sets its own DEVELOPER_DIR independently (its own hardcoded path plus a requireXcodeMetal check that fails loudly with an actionable message when Metal isn't available), and .github/workflows/build.yml/release.yml set their own DEVELOPER_DIR env at the workflow level — neither depends on the removed block, so devenv and CI builds are unaffected.
  • Not verified on a real Command-Line-Tools-only macOS machine (this box is Linux); the fix is a straightforward removal of a value that could only ever point at a wrong path in that exact environment, with no logic change for any other platform or workflow.

Fixes #1079

…Tools-only machines

Cargo's [env] table is static TOML with no way to check whether a path
exists, so the unconditional DEVELOPER_DIR override pointed every cargo
invocation -- not just the GUI's Metal shader compile it was meant to
help -- at /Applications/Xcode.app the moment that path didn't exist:
Command Line Tools-only installs, or Xcode under a non-standard name
like Xcode-beta.app. Every dependency's build script then failed to
link, so cargo build/check/test never got past compiling the workspace's
own crates.

force = false never prevented this: it only yields to a DEVELOPER_DIR
already exported in the calling shell, which a plain xcode-select
misconfiguration never sets on its own.

devenv (devenv.nix) and CI (.github/workflows/*.yml) already set their
own correct DEVELOPER_DIR independently of this file, so removing it
doesn't affect either. A contributor building the GUI outside devenv
with real Xcode installed but xcode-select pointed at the Command Line
Tools keeps the one-time system fix documented in the removed block's
replacement comment.

Fixes AprilNEA#1079
@4ni1ak
4ni1ak requested a review from AprilNEA as a code owner September 17, 2026 05:44
@greptile-apps

greptile-apps Bot commented Sep 17, 2026

Copy link
Copy Markdown

RetriggerConfidence Score: 4/5

The configuration change appears safe to merge, with a non-blocking documentation correction recommended for its description of macOS CI.

Fix All in CodexFindings

  1. P2 CI claim is inaccurate

Summary

Removes Cargo’s workspace-wide, hardcoded macOS DEVELOPER_DIR override so Command-Line-Tools-only machines and nonstandard Xcode installations are no longer directed to a nonexistent path.

  • Explains why force = false did not protect affected environments.
  • Retains guidance for correcting xcode-select when a full standard Xcode installation is available.
  • Contains one inaccurate documentation claim about all CI workflows setting DEVELOPER_DIR.

Reviews (1) · Last reviewed commit: "fix(build): stop forcing a nonexistent D..."

Comment thread .cargo/config.toml
Comment on lines +32 to +34
# sets. devenv (`devenv.nix`) and CI (`.github/workflows/*.yml`) already set
# their own correct `DEVELOPER_DIR` independently of this file, so removing
# it doesn't affect either. A contributor building the GUI outside devenv

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 CI claim is inaccurate

The comment says CI workflows set their own DEVELOPER_DIR, but the macOS checks and tests in .github/workflows/ci.yml do not set it and instead rely on the hosted runner’s selected Xcode. Narrow this statement to the build and release workflows so it does not mislead future build debugging.

Suggested change
# sets. devenv (`devenv.nix`) and CI (`.github/workflows/*.yml`) already set
# their own correct `DEVELOPER_DIR` independently of this file, so removing
# it doesn't affect either. A contributor building the GUI outside devenv
# sets. devenv (`devenv.nix`) and the build/release workflows set their own
# correct `DEVELOPER_DIR` independently of this file, so removing it doesn't
# affect those paths. A contributor building the GUI outside devenv

Fix in Codex Fix in Claude Code

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.

[Bug]: .cargo/config.toml pins DEVELOPER_DIR to Xcode, so a Command Line Tools-only machine cannot build the workspace at all

1 participant