Skip to content

Create a special xcode selector that will delegates to xcrun 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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

cmcgee1024
Copy link
Member

@cmcgee1024 cmcgee1024 commented Apr 11, 2025

Add the feature of a special selector "xcode" that can be used like the other swiftly
selectors for some operations, such as swiftly use, and swiftly list, but has no
real effect on other operations.

With this feature, you can swiftly use xcode and then when you run the proxies for
items like swift, clang, and other common toolchain binaries they will be run as the
equivalent xcrun command.

swift --version  => xcrun swift --version
clang foo.c => xcrun clang foo.c

When xcode is selected then swiftly run will run with the currently selected xcode
toolchain (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 a
similar way to indicate whether it is the (global) default, and/or in-use toolchain as a
result of the selection mechanism.

TODO:

  • Scan the toolchain on use and create necessary proxies

@cmcgee1024
Copy link
Member Author

@swift-ci test macOS

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.

1 participant