Skip to content

Conversation

@neonichu
Copy link
Contributor

We have been seeing this issue for a while when using SwiftPM from the CommandLineTools package:

❯ /usr/bin/xcrun --sdk macosx --show-sdk-platform-path
xcrun: error: unable to lookup item 'PlatformPath' from command line tools installation
xcrun: error: unable to lookup item 'PlatformPath' in SDK '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk'

This changes SwiftPM to handle this gracefully during builds (a warning gets emitted) and to fail properly when running swift test.

rdar://107479428

(cherry picked from commit 3ab568e)

We have been seeing this issue for a while when using SwiftPM from the
CommandLineTools package:

```
❯ /usr/bin/xcrun --sdk macosx --show-sdk-platform-path
xcrun: error: unable to lookup item 'PlatformPath' from command line tools installation
xcrun: error: unable to lookup item 'PlatformPath' in SDK '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk'
```

This changes SwiftPM to handle this gracefully during builds (a warning
gets emitted) and to fail properly when running `swift test`.

rdar://107479428

(cherry picked from commit 3ab568e)
@neonichu neonichu added the swift 5.9 This PR targets the 5.9 branch label Oct 11, 2023
@neonichu neonichu self-assigned this Oct 11, 2023
@neonichu
Copy link
Contributor Author

@swift-ci please test

@neonichu neonichu changed the title Handle macOS CLT --show-sdk-platform-path issues [5.9] Handle macOS CLT --show-sdk-platform-path issues Oct 11, 2023
@neonichu neonichu merged commit 732d540 into release/5.9 Oct 12, 2023
@neonichu neonichu deleted the handle-no-PlatformPath-5.9 branch October 12, 2023 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

swift 5.9 This PR targets the 5.9 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants