From 9f8c1233751d7f86872d497a1ef60c70a1d58c97 Mon Sep 17 00:00:00 2001 From: Andrew Roan Date: Fri, 18 Apr 2025 15:10:13 -0500 Subject: [PATCH 1/5] Update workflow feature/update-workflow --- .github/workflows/ci.yml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 557e3ba..26d14a5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ on: jobs: lint: - runs-on: macos-13 + runs-on: macos-latest environment: default steps: - uses: actions/checkout@v4 @@ -19,26 +19,22 @@ jobs: run: swiftformat --version - name: Format lint run: swiftformat --lint . + - name: Install SwiftLint + run: brew install swiftlint - name: SwiftLint version run: swiftlint --version - name: Lint run: swiftlint lint --quiet macos-test: - runs-on: macos-13 + runs-on: macos-latest environment: default - strategy: - matrix: - xcode: ["14.3", "15.0"] - # Swift: 5.8 , 5.9 steps: - uses: actions/checkout@v4 - - name: Select Xcode ${{ matrix.xcode }} - run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app - name: Run Tests run: swift test --enable-code-coverage --parallel - name: Swift Coverage Report run: xcrun llvm-cov export -format="lcov" .build/debug/swift-argument-encodingPackageTests.xctest/Contents/MacOS/swift-argument-encodingPackageTests -instr-profile .build/debug/codecov/default.profdata > coverage_report.lcov - - uses: codecov/codecov-action@v4 + - uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} fail_ci_if_error: true # optional (default = false) @@ -47,6 +43,6 @@ jobs: environment: default steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Run Tests run: swift test --parallel From b209b0c81d9d6f369ab22512ad5cf05901fcc4ce Mon Sep 17 00:00:00 2001 From: Andrew Roan Date: Fri, 18 Apr 2025 15:13:49 -0500 Subject: [PATCH 2/5] Update file header feature/update-workflow --- .swiftformat | 4 ++-- Examples/Sources/SwiftCommand/RunCommand.swift | 4 +--- Examples/Sources/SwiftCommand/SwiftCommand.swift | 4 +--- Examples/Sources/SwiftCommand/TestCommand.swift | 4 +--- Examples/Sources/SwiftCommand/main.swift | 4 +--- Sources/ArgumentEncoding/ArgumentGroup.swift | 4 +--- Sources/ArgumentEncoding/CaseConverter.swift | 4 +--- Sources/ArgumentEncoding/Command.swift | 4 +--- Sources/ArgumentEncoding/CommandRepresentable.swift | 4 +--- Sources/ArgumentEncoding/DecoderUserInfo+OptionHelpers.swift | 4 +--- .../ArgumentEncoding/DecoderUserInfo+OptionSetHelpers.swift | 4 +--- Sources/ArgumentEncoding/Flag.swift | 4 +--- Sources/ArgumentEncoding/FormatterNode.swift | 4 +--- Sources/ArgumentEncoding/Formatters.swift | 4 +--- Sources/ArgumentEncoding/Option.swift | 4 +--- Sources/ArgumentEncoding/OptionSet.swift | 4 +--- Sources/ArgumentEncoding/PositionalArgument.swift | 4 +--- Sources/ArgumentEncoding/StaticString+Constants.swift | 4 +--- Sources/ArgumentEncoding/TopLevelCommandRepresentable.swift | 4 +--- Tests/ArgumentEncodingTests/ArgumentGroupTests.swift | 4 +--- Tests/ArgumentEncodingTests/CommandRepresentableTests.swift | 4 +--- Tests/ArgumentEncodingTests/CommandTests.swift | 4 +--- Tests/ArgumentEncodingTests/FlagTests.swift | 4 +--- Tests/ArgumentEncodingTests/FormatterTests.swift | 4 +--- Tests/ArgumentEncodingTests/OptionDecodingTests.swift | 4 +--- Tests/ArgumentEncodingTests/OptionSetDecodingTests.swift | 4 +--- Tests/ArgumentEncodingTests/OptionSetTests.swift | 4 +--- Tests/ArgumentEncodingTests/OptionTests.swift | 4 +--- Tests/ArgumentEncodingTests/PositionalTests.swift | 4 +--- .../TopLevelCommandRepresentableTests.swift | 4 +--- 30 files changed, 31 insertions(+), 89 deletions(-) diff --git a/.swiftformat b/.swiftformat index 6e6a4c5..e9abaec 100644 --- a/.swiftformat +++ b/.swiftformat @@ -2,8 +2,8 @@ --redundanttype explicit --swiftversion 5.8 --maxwidth 120 ---header "{file}\nArgumentEncoding\n\nCopyright © {year} MFB Technologies, Inc. All rights reserved.\n\nThis source code is licensed under the MIT license found in the\nLICENSE file in the root directory of this source tree." +--header "{file}\nArgumentEncoding\n\nThis source code is licensed under the MIT License (MIT) found in the\nLICENSE file in the root directory of this source tree." --allman false --exclude **/output/**/*,.tuist-bin,**/.swiftpm/*,**/.build/* --wraparguments before-first ---wrapcollections before-first \ No newline at end of file +--wrapcollections before-first diff --git a/Examples/Sources/SwiftCommand/RunCommand.swift b/Examples/Sources/SwiftCommand/RunCommand.swift index 3279226..d126668 100644 --- a/Examples/Sources/SwiftCommand/RunCommand.swift +++ b/Examples/Sources/SwiftCommand/RunCommand.swift @@ -1,9 +1,7 @@ // RunCommand.swift // ArgumentEncoding // -// Copyright © 2024 MFB Technologies, Inc. All rights reserved. -// -// This source code is licensed under the MIT license found in the +// This source code is licensed under the MIT License (MIT) found in the // LICENSE file in the root directory of this source tree. import ArgumentEncoding diff --git a/Examples/Sources/SwiftCommand/SwiftCommand.swift b/Examples/Sources/SwiftCommand/SwiftCommand.swift index 2d24395..2bc69fe 100644 --- a/Examples/Sources/SwiftCommand/SwiftCommand.swift +++ b/Examples/Sources/SwiftCommand/SwiftCommand.swift @@ -1,9 +1,7 @@ // SwiftCommand.swift // ArgumentEncoding // -// Copyright © 2024 MFB Technologies, Inc. All rights reserved. -// -// This source code is licensed under the MIT license found in the +// This source code is licensed under the MIT License (MIT) found in the // LICENSE file in the root directory of this source tree. import ArgumentEncoding diff --git a/Examples/Sources/SwiftCommand/TestCommand.swift b/Examples/Sources/SwiftCommand/TestCommand.swift index 1b74d5c..ee89c65 100644 --- a/Examples/Sources/SwiftCommand/TestCommand.swift +++ b/Examples/Sources/SwiftCommand/TestCommand.swift @@ -1,9 +1,7 @@ // TestCommand.swift // ArgumentEncoding // -// Copyright © 2024 MFB Technologies, Inc. All rights reserved. -// -// This source code is licensed under the MIT license found in the +// This source code is licensed under the MIT License (MIT) found in the // LICENSE file in the root directory of this source tree. import ArgumentEncoding diff --git a/Examples/Sources/SwiftCommand/main.swift b/Examples/Sources/SwiftCommand/main.swift index 874b83d..234b1b4 100644 --- a/Examples/Sources/SwiftCommand/main.swift +++ b/Examples/Sources/SwiftCommand/main.swift @@ -1,9 +1,7 @@ // main.swift // ArgumentEncoding // -// Copyright © 2024 MFB Technologies, Inc. All rights reserved. -// -// This source code is licensed under the MIT license found in the +// This source code is licensed under the MIT License (MIT) found in the // LICENSE file in the root directory of this source tree. let test = SwiftCommand.test(TestCommand( diff --git a/Sources/ArgumentEncoding/ArgumentGroup.swift b/Sources/ArgumentEncoding/ArgumentGroup.swift index 14906ca..60a85d7 100644 --- a/Sources/ArgumentEncoding/ArgumentGroup.swift +++ b/Sources/ArgumentEncoding/ArgumentGroup.swift @@ -1,9 +1,7 @@ // ArgumentGroup.swift // ArgumentEncoding // -// Copyright © 2024 MFB Technologies, Inc. All rights reserved. -// -// This source code is licensed under the MIT license found in the +// This source code is licensed under the MIT License (MIT) found in the // LICENSE file in the root directory of this source tree. import Dependencies diff --git a/Sources/ArgumentEncoding/CaseConverter.swift b/Sources/ArgumentEncoding/CaseConverter.swift index 5275e07..0ca1d11 100644 --- a/Sources/ArgumentEncoding/CaseConverter.swift +++ b/Sources/ArgumentEncoding/CaseConverter.swift @@ -1,9 +1,7 @@ // CaseConverter.swift // ArgumentEncoding // -// Copyright © 2024 MFB Technologies, Inc. All rights reserved. -// -// This source code is licensed under the MIT license found in the +// This source code is licensed under the MIT License (MIT) found in the // LICENSE file in the root directory of this source tree. import Foundation diff --git a/Sources/ArgumentEncoding/Command.swift b/Sources/ArgumentEncoding/Command.swift index 40fbaef..96fce58 100644 --- a/Sources/ArgumentEncoding/Command.swift +++ b/Sources/ArgumentEncoding/Command.swift @@ -1,9 +1,7 @@ // Command.swift // ArgumentEncoding // -// Copyright © 2024 MFB Technologies, Inc. All rights reserved. -// -// This source code is licensed under the MIT license found in the +// This source code is licensed under the MIT License (MIT) found in the // LICENSE file in the root directory of this source tree. /// A command type argument with no nested or children arguments. diff --git a/Sources/ArgumentEncoding/CommandRepresentable.swift b/Sources/ArgumentEncoding/CommandRepresentable.swift index 4142055..5bf6504 100644 --- a/Sources/ArgumentEncoding/CommandRepresentable.swift +++ b/Sources/ArgumentEncoding/CommandRepresentable.swift @@ -1,9 +1,7 @@ // CommandRepresentable.swift // ArgumentEncoding // -// Copyright © 2024 MFB Technologies, Inc. All rights reserved. -// -// This source code is licensed under the MIT license found in the +// This source code is licensed under the MIT License (MIT) found in the // LICENSE file in the root directory of this source tree. import Dependencies diff --git a/Sources/ArgumentEncoding/DecoderUserInfo+OptionHelpers.swift b/Sources/ArgumentEncoding/DecoderUserInfo+OptionHelpers.swift index 416e2de..fe26cf7 100644 --- a/Sources/ArgumentEncoding/DecoderUserInfo+OptionHelpers.swift +++ b/Sources/ArgumentEncoding/DecoderUserInfo+OptionHelpers.swift @@ -1,9 +1,7 @@ // DecoderUserInfo+OptionHelpers.swift // ArgumentEncoding // -// Copyright © 2024 MFB Technologies, Inc. All rights reserved. -// -// This source code is licensed under the MIT license found in the +// This source code is licensed under the MIT License (MIT) found in the // LICENSE file in the root directory of this source tree. import Foundation diff --git a/Sources/ArgumentEncoding/DecoderUserInfo+OptionSetHelpers.swift b/Sources/ArgumentEncoding/DecoderUserInfo+OptionSetHelpers.swift index 2849332..6ed4730 100644 --- a/Sources/ArgumentEncoding/DecoderUserInfo+OptionSetHelpers.swift +++ b/Sources/ArgumentEncoding/DecoderUserInfo+OptionSetHelpers.swift @@ -1,9 +1,7 @@ // DecoderUserInfo+OptionSetHelpers.swift // ArgumentEncoding // -// Copyright © 2024 MFB Technologies, Inc. All rights reserved. -// -// This source code is licensed under the MIT license found in the +// This source code is licensed under the MIT License (MIT) found in the // LICENSE file in the root directory of this source tree. import Foundation diff --git a/Sources/ArgumentEncoding/Flag.swift b/Sources/ArgumentEncoding/Flag.swift index d3cce80..5bcea18 100644 --- a/Sources/ArgumentEncoding/Flag.swift +++ b/Sources/ArgumentEncoding/Flag.swift @@ -1,9 +1,7 @@ // Flag.swift // ArgumentEncoding // -// Copyright © 2024 MFB Technologies, Inc. All rights reserved. -// -// This source code is licensed under the MIT license found in the +// This source code is licensed under the MIT License (MIT) found in the // LICENSE file in the root directory of this source tree. import Dependencies diff --git a/Sources/ArgumentEncoding/FormatterNode.swift b/Sources/ArgumentEncoding/FormatterNode.swift index 3362390..3798450 100644 --- a/Sources/ArgumentEncoding/FormatterNode.swift +++ b/Sources/ArgumentEncoding/FormatterNode.swift @@ -1,9 +1,7 @@ // FormatterNode.swift // ArgumentEncoding // -// Copyright © 2024 MFB Technologies, Inc. All rights reserved. -// -// This source code is licensed under the MIT license found in the +// This source code is licensed under the MIT License (MIT) found in the // LICENSE file in the root directory of this source tree. /// A protocol that describes a type that defines how flags and options are formatted. Typically, `ArgumentGroup` diff --git a/Sources/ArgumentEncoding/Formatters.swift b/Sources/ArgumentEncoding/Formatters.swift index f73147f..617260d 100644 --- a/Sources/ArgumentEncoding/Formatters.swift +++ b/Sources/ArgumentEncoding/Formatters.swift @@ -1,9 +1,7 @@ // Formatters.swift // ArgumentEncoding // -// Copyright © 2024 MFB Technologies, Inc. All rights reserved. -// -// This source code is licensed under the MIT license found in the +// This source code is licensed under the MIT License (MIT) found in the // LICENSE file in the root directory of this source tree. import Dependencies diff --git a/Sources/ArgumentEncoding/Option.swift b/Sources/ArgumentEncoding/Option.swift index 3a3bc2c..29ab64a 100644 --- a/Sources/ArgumentEncoding/Option.swift +++ b/Sources/ArgumentEncoding/Option.swift @@ -1,9 +1,7 @@ // Option.swift // ArgumentEncoding // -// Copyright © 2024 MFB Technologies, Inc. All rights reserved. -// -// This source code is licensed under the MIT license found in the +// This source code is licensed under the MIT License (MIT) found in the // LICENSE file in the root directory of this source tree. import Dependencies diff --git a/Sources/ArgumentEncoding/OptionSet.swift b/Sources/ArgumentEncoding/OptionSet.swift index 0e28308..2efcffb 100644 --- a/Sources/ArgumentEncoding/OptionSet.swift +++ b/Sources/ArgumentEncoding/OptionSet.swift @@ -1,9 +1,7 @@ // OptionSet.swift // ArgumentEncoding // -// Copyright © 2024 MFB Technologies, Inc. All rights reserved. -// -// This source code is licensed under the MIT license found in the +// This source code is licensed under the MIT License (MIT) found in the // LICENSE file in the root directory of this source tree. import Dependencies diff --git a/Sources/ArgumentEncoding/PositionalArgument.swift b/Sources/ArgumentEncoding/PositionalArgument.swift index 99a2c5e..da6e91f 100644 --- a/Sources/ArgumentEncoding/PositionalArgument.swift +++ b/Sources/ArgumentEncoding/PositionalArgument.swift @@ -1,9 +1,7 @@ // PositionalArgument.swift // ArgumentEncoding // -// Copyright © 2024 MFB Technologies, Inc. All rights reserved. -// -// This source code is licensed under the MIT license found in the +// This source code is licensed under the MIT License (MIT) found in the // LICENSE file in the root directory of this source tree. import Foundation diff --git a/Sources/ArgumentEncoding/StaticString+Constants.swift b/Sources/ArgumentEncoding/StaticString+Constants.swift index 5275524..c40cd03 100644 --- a/Sources/ArgumentEncoding/StaticString+Constants.swift +++ b/Sources/ArgumentEncoding/StaticString+Constants.swift @@ -1,9 +1,7 @@ // StaticString+Constants.swift // ArgumentEncoding // -// Copyright © 2024 MFB Technologies, Inc. All rights reserved. -// -// This source code is licensed under the MIT license found in the +// This source code is licensed under the MIT License (MIT) found in the // LICENSE file in the root directory of this source tree. extension StaticString { diff --git a/Sources/ArgumentEncoding/TopLevelCommandRepresentable.swift b/Sources/ArgumentEncoding/TopLevelCommandRepresentable.swift index 6366d0d..427589d 100644 --- a/Sources/ArgumentEncoding/TopLevelCommandRepresentable.swift +++ b/Sources/ArgumentEncoding/TopLevelCommandRepresentable.swift @@ -1,9 +1,7 @@ // TopLevelCommandRepresentable.swift // ArgumentEncoding // -// Copyright © 2024 MFB Technologies, Inc. All rights reserved. -// -// This source code is licensed under the MIT license found in the +// This source code is licensed under the MIT License (MIT) found in the // LICENSE file in the root directory of this source tree. /// A type that represents a command type argument that is not a child of an `ArgumentGroup`. diff --git a/Tests/ArgumentEncodingTests/ArgumentGroupTests.swift b/Tests/ArgumentEncodingTests/ArgumentGroupTests.swift index 4d1b38f..0b2a0f7 100644 --- a/Tests/ArgumentEncodingTests/ArgumentGroupTests.swift +++ b/Tests/ArgumentEncodingTests/ArgumentGroupTests.swift @@ -1,9 +1,7 @@ // ArgumentGroupTests.swift // ArgumentEncoding // -// Copyright © 2024 MFB Technologies, Inc. All rights reserved. -// -// This source code is licensed under the MIT license found in the +// This source code is licensed under the MIT License (MIT) found in the // LICENSE file in the root directory of this source tree. import ArgumentEncoding diff --git a/Tests/ArgumentEncodingTests/CommandRepresentableTests.swift b/Tests/ArgumentEncodingTests/CommandRepresentableTests.swift index a17fdd6..0936dd9 100644 --- a/Tests/ArgumentEncodingTests/CommandRepresentableTests.swift +++ b/Tests/ArgumentEncodingTests/CommandRepresentableTests.swift @@ -1,9 +1,7 @@ // CommandRepresentableTests.swift // ArgumentEncoding // -// Copyright © 2024 MFB Technologies, Inc. All rights reserved. -// -// This source code is licensed under the MIT license found in the +// This source code is licensed under the MIT License (MIT) found in the // LICENSE file in the root directory of this source tree. import ArgumentEncoding diff --git a/Tests/ArgumentEncodingTests/CommandTests.swift b/Tests/ArgumentEncodingTests/CommandTests.swift index 0a393de..318b9b0 100644 --- a/Tests/ArgumentEncodingTests/CommandTests.swift +++ b/Tests/ArgumentEncodingTests/CommandTests.swift @@ -1,9 +1,7 @@ // CommandTests.swift // ArgumentEncoding // -// Copyright © 2024 MFB Technologies, Inc. All rights reserved. -// -// This source code is licensed under the MIT license found in the +// This source code is licensed under the MIT License (MIT) found in the // LICENSE file in the root directory of this source tree. import ArgumentEncoding diff --git a/Tests/ArgumentEncodingTests/FlagTests.swift b/Tests/ArgumentEncodingTests/FlagTests.swift index e0bfc47..55fa855 100644 --- a/Tests/ArgumentEncodingTests/FlagTests.swift +++ b/Tests/ArgumentEncodingTests/FlagTests.swift @@ -1,9 +1,7 @@ // FlagTests.swift // ArgumentEncoding // -// Copyright © 2024 MFB Technologies, Inc. All rights reserved. -// -// This source code is licensed under the MIT license found in the +// This source code is licensed under the MIT License (MIT) found in the // LICENSE file in the root directory of this source tree. import ArgumentEncoding diff --git a/Tests/ArgumentEncodingTests/FormatterTests.swift b/Tests/ArgumentEncodingTests/FormatterTests.swift index aaa32f9..acd7f99 100644 --- a/Tests/ArgumentEncodingTests/FormatterTests.swift +++ b/Tests/ArgumentEncodingTests/FormatterTests.swift @@ -1,9 +1,7 @@ // FormatterTests.swift // ArgumentEncoding // -// Copyright © 2024 MFB Technologies, Inc. All rights reserved. -// -// This source code is licensed under the MIT license found in the +// This source code is licensed under the MIT License (MIT) found in the // LICENSE file in the root directory of this source tree. import ArgumentEncoding diff --git a/Tests/ArgumentEncodingTests/OptionDecodingTests.swift b/Tests/ArgumentEncodingTests/OptionDecodingTests.swift index 2a969ee..d6a3813 100644 --- a/Tests/ArgumentEncodingTests/OptionDecodingTests.swift +++ b/Tests/ArgumentEncodingTests/OptionDecodingTests.swift @@ -1,9 +1,7 @@ // OptionDecodingTests.swift // ArgumentEncoding // -// Copyright © 2024 MFB Technologies, Inc. All rights reserved. -// -// This source code is licensed under the MIT license found in the +// This source code is licensed under the MIT License (MIT) found in the // LICENSE file in the root directory of this source tree. import ArgumentEncoding diff --git a/Tests/ArgumentEncodingTests/OptionSetDecodingTests.swift b/Tests/ArgumentEncodingTests/OptionSetDecodingTests.swift index 0d75f0d..29387f0 100644 --- a/Tests/ArgumentEncodingTests/OptionSetDecodingTests.swift +++ b/Tests/ArgumentEncodingTests/OptionSetDecodingTests.swift @@ -1,9 +1,7 @@ // OptionSetDecodingTests.swift // ArgumentEncoding // -// Copyright © 2024 MFB Technologies, Inc. All rights reserved. -// -// This source code is licensed under the MIT license found in the +// This source code is licensed under the MIT License (MIT) found in the // LICENSE file in the root directory of this source tree. import ArgumentEncoding diff --git a/Tests/ArgumentEncodingTests/OptionSetTests.swift b/Tests/ArgumentEncodingTests/OptionSetTests.swift index 31cf6d6..8c8219d 100644 --- a/Tests/ArgumentEncodingTests/OptionSetTests.swift +++ b/Tests/ArgumentEncodingTests/OptionSetTests.swift @@ -1,9 +1,7 @@ // OptionSetTests.swift // ArgumentEncoding // -// Copyright © 2024 MFB Technologies, Inc. All rights reserved. -// -// This source code is licensed under the MIT license found in the +// This source code is licensed under the MIT License (MIT) found in the // LICENSE file in the root directory of this source tree. import ArgumentEncoding diff --git a/Tests/ArgumentEncodingTests/OptionTests.swift b/Tests/ArgumentEncodingTests/OptionTests.swift index 7e87a9b..f50f063 100644 --- a/Tests/ArgumentEncodingTests/OptionTests.swift +++ b/Tests/ArgumentEncodingTests/OptionTests.swift @@ -1,9 +1,7 @@ // OptionTests.swift // ArgumentEncoding // -// Copyright © 2024 MFB Technologies, Inc. All rights reserved. -// -// This source code is licensed under the MIT license found in the +// This source code is licensed under the MIT License (MIT) found in the // LICENSE file in the root directory of this source tree. import ArgumentEncoding diff --git a/Tests/ArgumentEncodingTests/PositionalTests.swift b/Tests/ArgumentEncodingTests/PositionalTests.swift index 58ec216..3ccd60d 100644 --- a/Tests/ArgumentEncodingTests/PositionalTests.swift +++ b/Tests/ArgumentEncodingTests/PositionalTests.swift @@ -1,9 +1,7 @@ // PositionalTests.swift // ArgumentEncoding // -// Copyright © 2024 MFB Technologies, Inc. All rights reserved. -// -// This source code is licensed under the MIT license found in the +// This source code is licensed under the MIT License (MIT) found in the // LICENSE file in the root directory of this source tree. import ArgumentEncoding diff --git a/Tests/ArgumentEncodingTests/TopLevelCommandRepresentableTests.swift b/Tests/ArgumentEncodingTests/TopLevelCommandRepresentableTests.swift index 1072eef..6bf0731 100644 --- a/Tests/ArgumentEncodingTests/TopLevelCommandRepresentableTests.swift +++ b/Tests/ArgumentEncodingTests/TopLevelCommandRepresentableTests.swift @@ -1,9 +1,7 @@ // TopLevelCommandRepresentableTests.swift // ArgumentEncoding // -// Copyright © 2024 MFB Technologies, Inc. All rights reserved. -// -// This source code is licensed under the MIT license found in the +// This source code is licensed under the MIT License (MIT) found in the // LICENSE file in the root directory of this source tree. import ArgumentEncoding From 93abc9a35ec45f532d93494c1d4bb092e21fb8ba Mon Sep 17 00:00:00 2001 From: Andrew Roan Date: Fri, 18 Apr 2025 15:16:26 -0500 Subject: [PATCH 3/5] Raise swift version of dev container and format dev container config feature/update-workflow --- .devcontainer/devcontainer.json | 72 +++++++++++++++------------------ 1 file changed, 33 insertions(+), 39 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 9fdb7a4..5616eec 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,44 +1,38 @@ { - "name": "swift-argument-encoding", - "image": "swift:5.7", - "features": { - "ghcr.io/devcontainers/features/common-utils:2": { - "installZsh": "false", - "username": "vscode", - "userUid": "1000", - "userGid": "1000", - "upgradePackages": "false" - }, - "ghcr.io/devcontainers/features/git:1": { - "version": "os-provided", - "ppa": "false" - } + "name": "swift-argument-encoding", + "image": "swift:5.8", + "features": { + "ghcr.io/devcontainers/features/common-utils:2": { + "installZsh": "false", + "username": "vscode", + "userUid": "1000", + "userGid": "1000", + "upgradePackages": "false" }, - "runArgs": [ - "--cap-add=SYS_PTRACE", - "--security-opt", - "seccomp=unconfined" - ], - // Configure tool-specific properties. - "customizations": { - // Configure properties specific to VS Code. - "vscode": { - // Set *default* container specific settings.json values on container create. - "settings": { - "lldb.library": "/usr/lib/liblldb.so" - }, - // Add the IDs of extensions you want installed when the container is created. - "extensions": [ - "sswg.swift-lang" - ] - } - }, - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], + "ghcr.io/devcontainers/features/git:1": { + "version": "os-provided", + "ppa": "false" + } + }, + "runArgs": ["--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined"], + // Configure tool-specific properties. + "customizations": { + // Configure properties specific to VS Code. + "vscode": { + // Set *default* container specific settings.json values on container create. + "settings": { + "lldb.library": "/usr/lib/liblldb.so" + }, + // Add the IDs of extensions you want installed when the container is created. + "extensions": ["sswg.swift-lang"] + } + }, + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], - // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "swift --version", + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "swift --version", - // Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. - "remoteUser": "vscode" + // Set `remoteUser` to `root` to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. + "remoteUser": "vscode" } From 7c9a0d1cb21f7cb8c0228860e6722284e79b0577 Mon Sep 17 00:00:00 2001 From: Andrew Roan Date: Fri, 18 Apr 2025 15:33:46 -0500 Subject: [PATCH 4/5] Update swift plugin for vscode in dev container feature/update-workflow --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 5616eec..1be6808 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -24,7 +24,7 @@ "lldb.library": "/usr/lib/liblldb.so" }, // Add the IDs of extensions you want installed when the container is created. - "extensions": ["sswg.swift-lang"] + "extensions": ["swiftlang.swift-vscode"] } }, // Use 'forwardPorts' to make a list of ports inside the container available locally. From f55ba6130619e1b2c5bbc10344b25e228b4b42e4 Mon Sep 17 00:00:00 2001 From: Andrew Roan Date: Fri, 18 Apr 2025 16:38:31 -0500 Subject: [PATCH 5/5] Fix build error feature/update-workflow --- .../ArgumentGroupTests.swift | 30 +++++-------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/Tests/ArgumentEncodingTests/ArgumentGroupTests.swift b/Tests/ArgumentEncodingTests/ArgumentGroupTests.swift index 0b2a0f7..f10cc32 100644 --- a/Tests/ArgumentEncodingTests/ArgumentGroupTests.swift +++ b/Tests/ArgumentEncodingTests/ArgumentGroupTests.swift @@ -248,28 +248,14 @@ final class ArgumentGroupTests: XCTestCase { } } -#if swift(>=6) - extension Array: @retroactive ArgumentGroup, @retroactive FormatterNode { - public var flagFormatter: ArgumentEncoding.FlagFormatter { FlagFormatter(prefix: .doubleDash) } +extension Array: ArgumentGroup, FormatterNode { + public var flagFormatter: ArgumentEncoding.FlagFormatter { FlagFormatter(prefix: .doubleDash) } - public var optionFormatter: ArgumentEncoding.OptionFormatter { OptionFormatter(prefix: .doubleDash) } - } - - extension Dictionary: @retroactive ArgumentGroup, @retroactive FormatterNode { - public var flagFormatter: ArgumentEncoding.FlagFormatter { FlagFormatter(prefix: .doubleDash) } - - public var optionFormatter: ArgumentEncoding.OptionFormatter { OptionFormatter(prefix: .doubleDash) } - } -#else - extension Array: ArgumentGroup, FormatterNode { - public var flagFormatter: ArgumentEncoding.FlagFormatter { FlagFormatter(prefix: .doubleDash) } - - public var optionFormatter: ArgumentEncoding.OptionFormatter { OptionFormatter(prefix: .doubleDash) } - } + public var optionFormatter: ArgumentEncoding.OptionFormatter { OptionFormatter(prefix: .doubleDash) } +} - extension Dictionary: ArgumentGroup, FormatterNode { - public var flagFormatter: ArgumentEncoding.FlagFormatter { FlagFormatter(prefix: .doubleDash) } +extension Dictionary: ArgumentGroup, FormatterNode { + public var flagFormatter: ArgumentEncoding.FlagFormatter { FlagFormatter(prefix: .doubleDash) } - public var optionFormatter: ArgumentEncoding.OptionFormatter { OptionFormatter(prefix: .doubleDash) } - } -#endif + public var optionFormatter: ArgumentEncoding.OptionFormatter { OptionFormatter(prefix: .doubleDash) } +}