-
Notifications
You must be signed in to change notification settings - Fork 53
Create a special Xcode selector for macOS #317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Add a little documentation for the xcode toolchain selector Add tests for the xcode toolchain selector and version
@swift-ci test macOS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the question about whether we want to verify that we actually have and Xcode/CommandLineTools toolchain installed, LGTM.
@@ -49,8 +49,14 @@ public struct Config: Codable, Equatable, Sendable { | |||
} | |||
|
|||
public func listInstalledToolchains(selector: ToolchainSelector?) -> [ToolchainVersion] { | |||
#if os(macOS) | |||
let systemToolchains: [ToolchainVersion] = [.xcodeVersion] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is Xcode guaranteed to be installed where swiftly is installed? Should we query to ensure that there is a toolchain installed?
Add the feature of a special selector "xcode" that can be used like the other swiftly
selectors for some operations, such as
swiftly use
, andswiftly list
, but has noreal effect on other operations.
With this feature, you can
swiftly use xcode
and then when you run the proxies foritems like swift, clang, and other common toolchain binaries they will be run on the
Xcode toolchain.
When xcode is selected then
swiftly run
will run with the currently selected xcodetoolchain (or command-line tools) reported by
xcrun -f
as the toolchain on the path.When you run
swiftly list
there is a special entry for "xcode" that is decorated in asimilar way to indicate whether it is the (global) default, and/or in-use toolchain as a
result of the selection mechanism.