Skip to content

Conversation

@csmulhern
Copy link
Contributor

This cleans up some warnings from the earlier version of the repo, though unfortunately it adds a couple of others.

It also marks swift_argument_parser as a dev dependency, as it's only used in tests.

Before:

[#DeprecatedDeclaration]: <https://docs.swift.org/compiler/documentation/diagnostics/deprecated-declaration>
INFO: From Compiling Swift module @@swift_argument_parser+//:ArgumentParser [for tool]:
external/swift_argument_parser+/Sources/ArgumentParser/Parsable Types/CommandConfiguration.swift:50:14: warning: stored property 'subcommands' of 'Sendable'-conforming struct 'CommandConfiguration' contains non-Sendable type 'any ParsableCommand.Type'
 48 |
 49 |   /// An array of the types that define subcommands for this command.
 50 |   public var subcommands: [ParsableCommand.Type]
    |              `- warning: stored property 'subcommands' of 'Sendable'-conforming struct 'CommandConfiguration' contains non-Sendable type 'any ParsableCommand.Type'
 51 |
 52 |   /// The default command type to run if no subcommand is given.

external/swift_argument_parser+/Sources/ArgumentParser/Parsable Types/CommandConfiguration.swift:53:14: warning: stored property 'defaultSubcommand' of 'Sendable'-conforming struct 'CommandConfiguration' contains non-Sendable type 'any ParsableCommand.Type'
 51 |
 52 |   /// The default command type to run if no subcommand is given.
 53 |   public var defaultSubcommand: ParsableCommand.Type?
    |              `- warning: stored property 'defaultSubcommand' of 'Sendable'-conforming struct 'CommandConfiguration' contains non-Sendable type 'any ParsableCommand.Type'
 54 |
 55 |   /// Flag names to be used for help.

external/swift_argument_parser+/Sources/ArgumentParser/Parsable Types/ParsableArgumentsValidation.swift:26:7: warning: stored property 'parsableArgumentsType' of 'Sendable'-conforming struct 'ParsableArgumentsValidationError' has non-Sendable type 'any ParsableArguments.Type'
 24 |
 25 | struct ParsableArgumentsValidationError: Error, CustomStringConvertible {
 26 |   let parsableArgumentsType: ParsableArguments.Type
    |       `- warning: stored property 'parsableArgumentsType' of 'Sendable'-conforming struct 'ParsableArgumentsValidationError' has non-Sendable type 'any ParsableArguments.Type'
 27 |   let underlayingErrors: [Error]
 28 |   var description: String {

external/swift_argument_parser+/Sources/ArgumentParser/Parsable Types/ParsableArgumentsValidation.swift:177:9: warning: stored property 'type' of 'Sendable'-conforming struct 'InvalidDecoderError' has non-Sendable type 'any ParsableArguments.Type'
175 |
176 |   struct InvalidDecoderError: ParsableArgumentsValidatorError, CustomStringConvertible {
177 |     let type: ParsableArguments.Type
    |         `- warning: stored property 'type' of 'Sendable'-conforming struct 'InvalidDecoderError' has non-Sendable type 'any ParsableArguments.Type'
178 |
179 |     var description: String {

external/swift_argument_parser+/Sources/ArgumentParser/Parsing/CommandParser.swift:13:7: warning: stored property 'commandStack' of 'Sendable'-conforming struct 'CommandError' contains non-Sendable type 'any ParsableCommand.Type'
 11 |
 12 | struct CommandError: Error {
 13 |   var commandStack: [ParsableCommand.Type]
    |       `- warning: stored property 'commandStack' of 'Sendable'-conforming struct 'CommandError' contains non-Sendable type 'any ParsableCommand.Type'
 14 |   var parserError: ParserError
 15 | }

external/swift_argument_parser+/Sources/ArgumentParser/Utilities/Tree.swift:102:10: warning: associated value 'recursiveSubcommand' of 'Sendable'-conforming enum 'InitializationError' has non-Sendable type 'any ParsableCommand.Type'
100 |
101 |   enum InitializationError: Error {
102 |     case recursiveSubcommand(ParsableCommand.Type)
    |          `- warning: associated value 'recursiveSubcommand' of 'Sendable'-conforming enum 'InitializationError' has non-Sendable type 'any ParsableCommand.Type'
103 |   }
104 | }

After:

external/swift_argument_parser+/Sources/ArgumentParser/Parsable Types/ParsableArguments.swift:76:8: warning: '_errorLabel' is deprecated: Use _errorPrefix instead. [#DeprecatedDeclaration]
 74 |   /// Defaults to `"\(_errorLabel): "`.
 75 |   public static var _errorPrefix: String {
 76 |     "\(_errorLabel): "
    |        `- warning: '_errorLabel' is deprecated: Use _errorPrefix instead. [#DeprecatedDeclaration]
 77 |   }
 78 | }

external/swift_argument_parser+/Sources/ArgumentParser/Usage/DumpHelpGenerator.swift:209:15: warning: 'customDeprecated' is deprecated: Use custom instead. [#DeprecatedDeclaration]
207 |       self = .customAsync
208 |     case .customDeprecated(_):
209 |       self = .customDeprecated
    |               `- warning: 'customDeprecated' is deprecated: Use custom instead. [#DeprecatedDeclaration]
210 |     }
211 |   }

@aaronsky
Copy link
Contributor

aaronsky commented Jan 1, 2026

afaik test_discoverer isn’t a dev dependency tool

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.

2 participants