Skip to content

Commit d409af5

Browse files
committed
Remove @_implementationOnly imports
The `@_implementationOnly` attribute does not work correctly without library evolution enabled. The only possible client with this enabled is Apple, however they have updated to the Swift 6 compiler and can use `internal import` instead of this attribute. Therefore there is no need for this package to use the attribute anymore.
1 parent 1fdca83 commit d409af5

File tree

3 files changed

+6
-14
lines changed

3 files changed

+6
-14
lines changed

Sources/ArgumentParser/Usage/DumpHelpGenerator.swift

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,12 @@
99
//
1010
//===----------------------------------------------------------------------===//
1111

12-
#if swift(>=5.11)
12+
#if swift(>=6.0)
1313
internal import ArgumentParserToolInfo
1414
internal import class Foundation.JSONEncoder
15-
#elseif swift(>=5.10)
15+
#else
1616
import ArgumentParserToolInfo
1717
import class Foundation.JSONEncoder
18-
#else
19-
@_implementationOnly import ArgumentParserToolInfo
20-
@_implementationOnly import class Foundation.JSONEncoder
2118
#endif
2219

2320
internal struct DumpHelpGenerator {

Sources/ArgumentParser/Usage/MessageInfo.swift

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,12 @@
99
//
1010
//===----------------------------------------------------------------------===//
1111

12-
#if swift(>=5.11)
12+
#if swift(>=6.0)
1313
internal import protocol Foundation.LocalizedError
1414
internal import class Foundation.NSError
15-
#elseif swift(>=5.10)
15+
#else
1616
import protocol Foundation.LocalizedError
1717
import class Foundation.NSError
18-
#else
19-
@_implementationOnly import protocol Foundation.LocalizedError
20-
@_implementationOnly import class Foundation.NSError
2118
#endif
2219

2320
enum MessageInfo {

Sources/ArgumentParser/Usage/UsageGenerator.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@
99
//
1010
//===----------------------------------------------------------------------===//
1111

12-
#if swift(>=5.11)
12+
#if swift(>=6.0)
1313
internal import protocol Foundation.LocalizedError
14-
#elseif swift(>=5.10)
15-
import protocol Foundation.LocalizedError
1614
#else
17-
@_implementationOnly import protocol Foundation.LocalizedError
15+
import protocol Foundation.LocalizedError
1816
#endif
1917

2018
struct UsageGenerator {

0 commit comments

Comments
 (0)