apple / apple/swift-argument-parser

cannot find type SendableMetatype in scope

Open
#827 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
3.8k
Forks
411
Avg merge
7d 14h
Merged PRs (30d)
15

Description

I cannot compile this package (specifically the bash completion step) with the latest swift compiler available from the CLT and the `SDKROOT` set to `/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk`, like homebrew does.

**ArgumentParser version:** `1.6.1`
**Swift version:**
```
swift-driver version: 1.127.14.1
Apple Swift version 6.2 (swiftlang-6.2.0.19.9 clang-1700.3.19.1)
Target: x86_64-apple-macosx15.0
```
**CLT version:** `26.0.0.0.1.1757719676`
**macOS version:** `15.7.1 (24G231)`

### Checklist
- [ ] If possible, I've reproduced the issue using the `main` branch of this package
- [x] I've searched for [existing GitHub issues](https://github.com/apple/swift-argument-parser/issues)

### Steps to Reproduce
```
git clone git@github.com:CamJN/aliasPath.git
cd aliasPath
export SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX15.sdk
make
```

### Expected behaviour
`swift-argument-parser` can compile with swift 6.2 compiler, and macOS 15 SDK.

### Actual behaviour
```
...snip
23 [8/10] Compiling ArgumentParser BashCompletionsGenerator.swift
24 /private/tmp/alias-path-20251013-91126-xovrpd/aliasPath-1.0.0/.build/checkouts/swift-argument-parser/Sources/ArgumentParser/Utilities/SwiftExtensions.swift:14:45: error: cannot find type 'SendableMetatype' in scope
25 12 | #if compiler(>=6.2)
26 13 | /// Designates a type as having a sendable metatype.
27 14 | @_marker public protocol _SendableMetatype: SendableMetatype {}
28 | `- error: cannot find type 'SendableMetatype' in scope
29 15 | #else
30 16 | @_marker public protocol _SendableMetatype {}
31 make: *** [/private/tmp/alias-path-20251013-91126-xovrpd/aliasPath-1.0.0/.build/x86_64-apple-macosx/release/aliasPath] Error 1
32
```

Contributor guide

Open the contributing guide

Research direction

Start with Sources/ArgumentParser/Utilities/SwiftExtensions.swift and reproduce using the supplied SDKROOT, Swift 6.2 toolchain, and make command. Inspect the compiler-version conditional around _SendableMetatype and verify the bash-completion build; done means swift-argument-parser compiles successfully in that environment.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
build-system, cli
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.