gradle / gradle/gradle-native

Gradle should detect when Xcode is missing

Open
#286 0 comments 0 reactions 0 assignees View on GitHub
a:feature in:xcode
Dominant language
No language data
Stars
94
Forks
7
PR merge metrics
No merged PRs in 30d

Description

When only the Xcode Command Line Tools are installed, presumably via `xcode-select --install` when the user most likely installed Homebrew or similar, Gradle fail with a cryptic error:
```
:compileTestSwift FAILED
xcrun: error: unable to lookup item 'PlatformPath' from command line tools installation
xcrun: error: unable to lookup item 'PlatformPath' in SDK '/'
```

In this case, `xcode-select -p` returns `/Library/Developer/CommandLineTools` vs `/Applications/Xcode.app/Contents/Developer` when Xcode is installed.

### Expected Behavior
Compiling Swift code without Xcode installed should give a meaningful error.

Contributor guide

Open the contributing guide

Research direction

Reproduce the compileTestSwift failure with only the Xcode Command Line Tools installed, then inspect how the build checks xcode-select -p and handles the xcrun error. Done means compiling Swift without Xcode produces a meaningful error instead of the cryptic PlatformPath failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, swift
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.