Skip to content

Commit 4bc5104

Browse files
authored
Prepared package for Swift 6.2 (#8)
1 parent f8b7c28 commit 4bc5104

46 files changed

Lines changed: 597 additions & 678 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/pull-request.yml

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,19 @@ concurrency:
1212
cancel-in-progress: true
1313

1414
env:
15-
XCODE_VERSION: "16.3"
15+
XCODE_VERSION: "26.1"
1616

1717
jobs:
1818
prepare:
19-
runs-on: macos-15
19+
runs-on: macos-26
2020
outputs:
2121
platforms: ${{ steps.platforms.outputs.platforms }}
2222
scheme: ${{ steps.scheme.outputs.scheme }}
2323
steps:
24-
- uses: actions/checkout@v4
24+
- uses: actions/checkout@v5
25+
with:
26+
submodules: true
27+
2528
- name: Setup Xcode
2629
run: sudo xcode-select -s /Applications/Xcode_$XCODE_VERSION.app
2730

@@ -31,6 +34,7 @@ jobs:
3134
run: |
3235
curl https://mise.run | sh
3336
mise install
37+
3438
- name: Run linters
3539
run: mise lint
3640

@@ -62,13 +66,16 @@ jobs:
6266
6367
build-and-test:
6468
needs: prepare
65-
runs-on: macos-15
69+
runs-on: macos-26
6670
strategy:
6771
fail-fast: false
6872
matrix:
6973
platform: ${{ fromJSON(needs.prepare.outputs.platforms) }}
7074
steps:
71-
- uses: actions/checkout@v4
75+
- uses: actions/checkout@v5
76+
with:
77+
submodules: true
78+
7279
- name: Setup Xcode
7380
run: sudo xcode-select -s /Applications/Xcode_$XCODE_VERSION.app
7481

@@ -81,16 +88,16 @@ jobs:
8188
destination="platform=macOS,variant=Mac Catalyst"
8289
;;
8390
ios)
84-
destination="platform=iOS Simulator,name=iPhone 16 Pro Max,OS=latest"
91+
destination="platform=iOS Simulator,name=iPhone 17 Pro Max,OS=26.1"
8592
;;
8693
tvos)
87-
destination="platform=tvOS Simulator,name=Apple TV 4K (3rd generation),OS=latest"
94+
destination="platform=tvOS Simulator,name=Apple TV 4K (3rd generation),OS=26.1"
8895
;;
8996
watchos)
90-
destination="platform=watchOS Simulator,name=Apple Watch Series 10 (46mm),OS=latest"
97+
destination="platform=watchOS Simulator,name=Apple Watch Series 11 (46mm),OS=26.1"
9198
;;
9299
visionos)
93-
destination="platform=visionOS Simulator,name=Apple Vision Pro,OS=latest"
100+
destination="platform=visionOS Simulator,name=Apple Vision Pro,OS=26.1"
94101
;;
95102
*)
96103
echo "Unknown platform: ${{ matrix.platform }}"
@@ -109,7 +116,8 @@ jobs:
109116
set -o pipefail
110117
xcodebuild build \
111118
-scheme ${{ needs.prepare.outputs.scheme }} \
112-
-destination "${{ steps.destination.outputs.destination }}" | \
119+
-destination "${{ steps.destination.outputs.destination }}" \
120+
-IDEPackageEnablePrebuilts=NO | \
113121
xcbeautify --renderer github-actions
114122
115123
- name: Test (SPM)
@@ -129,11 +137,12 @@ jobs:
129137
set -o pipefail
130138
xcodebuild test \
131139
-scheme ${{ needs.prepare.outputs.scheme }} \
132-
-destination "${{ steps.destination.outputs.destination }}" | \
140+
-destination "${{ steps.destination.outputs.destination }}" \
141+
-IDEPackageEnablePrebuilts=NO | \
133142
xcbeautify --renderer github-actions
134143
135144
- name: Check coverage (SPM)
136145
if: ${{ matrix.platform == 'macos' }}
137146
uses: codecov/codecov-action@v5
138147
with:
139-
fail_ci_if_error: true
148+
fail_ci_if_error: true

.github/workflows/release.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,17 @@ on:
66
- '*'
77

88
env:
9-
XCODE_VERSION: "16.3"
9+
XCODE_VERSION: "26.1"
1010

1111
jobs:
1212
release:
13-
runs-on: macos-15
13+
runs-on: macos-26
1414
steps:
15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@v5
1616
with:
17+
submodules: true
1718
fetch-depth: 0
19+
1820
- name: Setup Xcode
1921
run: sudo xcode-select -s /Applications/Xcode_$XCODE_VERSION.app
2022

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "Macros/Dependencies/PrincipleMacros"]
2+
path = Macros/Dependencies/PrincipleMacros
3+
url = https://github.com/NSFatalError/PrincipleMacros

.mise.toml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
[vars]
2-
sources = "Sources"
3-
tests = "Tests"
42
swiftlint = '~/.local/bin/mise x -- swiftlint'
53
swiftformat = '~/.local/bin/mise x -- swiftformat'
64

75
[tools]
8-
swiftlint = "0.58.2"
9-
swiftformat = "0.55.5"
6+
swiftlint = "0.62.2"
7+
swiftformat = "0.58.5"
108

119
[tasks.lint]
1210
description = 'Run all linters'
@@ -19,7 +17,7 @@ run = """
1917
{{ vars.swiftlint }} lint \
2018
--config .swiftlint.yml \
2119
--strict \
22-
{{ vars.sources }}
20+
Sources Macros
2321
"""
2422

2523
[tasks."swiftlint:tests"]
@@ -30,7 +28,7 @@ run = """
3028
--config .swiftlint.yml \
3129
--config .swiftlint.tests.yml \
3230
--strict \
33-
{{ vars.tests }}
31+
Tests
3432
"""
3533

3634
[tasks.swiftformat]

.swift-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.1
1+
6.2

.swiftformat

Lines changed: 114 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,125 @@
11
--acronyms ID,URL,UUID
22
--allman false
3-
--anonymousforeach convert
4-
--assetliterals visual-width
5-
--asynccapturing
6-
--beforemarks
7-
--binarygrouping 4,8
8-
--callsiteparen default
9-
--categorymark "MARK: %c"
10-
--classthreshold 0
11-
--closingparen default
12-
--closurevoid remove
13-
--commas inline
14-
--complexattrs prev-line
15-
--computedvarattrs prev-line
16-
--condassignment always
17-
--conflictmarkers reject
18-
--dateformat system
19-
--decimalgrouping 3,6
20-
--doccomments before-declarations
21-
--elseposition same-line
22-
--emptybraces no-space
23-
--enumnamespaces always
24-
--enumthreshold 0
25-
--exponentcase lowercase
26-
--exponentgrouping disabled
27-
--extensionacl on-declarations
28-
--extensionlength 0
29-
--extensionmark "MARK: - %t + %c"
30-
--fractiongrouping disabled
3+
--allow-partial-wrapping true
4+
--anonymous-for-each convert
5+
--asset-literals visual-width
6+
--async-capturing
7+
--before-marks
8+
--binary-grouping 4,8
9+
--blank-line-after-switch-case multiline-only
10+
--call-site-paren default
11+
--category-mark "MARK: %c"
12+
--class-threshold 0
13+
--closing-paren default
14+
--closure-void remove
15+
--complex-attributes prev-line
16+
--computed-var-attributes prev-line
17+
--conditional-assignment always
18+
--conflict-markers reject
19+
--date-format system
20+
--decimal-grouping 3,6
21+
--default-test-suite-attributes
22+
--doc-comments before-declarations
23+
--else-position same-line
24+
--empty-braces no-space
25+
--enum-namespaces always
26+
--enum-threshold 0
27+
--equatable-macro none
28+
--exponent-case lowercase
29+
--exponent-grouping disabled
30+
--extension-acl on-declarations
31+
--extension-mark "MARK: - %t + %c"
32+
--extension-threshold 0
33+
--file-macro "#file"
34+
--fraction-grouping disabled
3135
--fragment false
32-
--funcattributes prev-line
33-
--generictypes
34-
--groupblanklines true
35-
--groupedextension "MARK: %c"
36-
--guardelse next-line
36+
--func-attributes prev-line
37+
--generic-types
38+
--group-blank-lines true
39+
--grouped-extension "MARK: %c"
40+
--guard-else next-line
3741
--header ignore
38-
--hexgrouping 4,8
39-
--hexliteralcase uppercase
42+
--hex-grouping 4,8
43+
--hex-literal-case uppercase
4044
--ifdef indent
41-
--importgrouping testable-first
45+
--import-grouping testable-first
4246
--indent 4
43-
--indentcase false
44-
--indentstrings false
45-
--inferredtypes always
46-
--initcodernil false
47-
--inlinedforeach ignore
47+
--indent-case false
48+
--indent-strings false
49+
--inferred-types always
50+
--init-coder-nil false
4851
--lifecycle
49-
--lineaftermarks true
52+
--line-after-marks true
53+
--line-between-guards false
5054
--linebreaks lf
51-
--markcategories true
52-
--markextensions always
53-
--marktypes always
54-
--maxwidth none
55-
--modifierorder
56-
--nevertrailing
57-
--nilinit remove
58-
--noncomplexattrs
59-
--nospaceoperators
60-
--nowrapoperators
61-
--octalgrouping 4,8
62-
--operatorfunc spaced
63-
--organizationmode visibility
64-
--organizetypes actor,class,enum,struct
65-
--patternlet hoist
66-
--preservedecls
67-
--preservedsymbols Package
68-
--propertytypes inferred
55+
--mark-categories true
56+
--mark-class-threshold 0
57+
--mark-enum-threshold 0
58+
--mark-extension-threshold 0
59+
--mark-extensions always
60+
--mark-struct-threshold 0
61+
--mark-types always
62+
--markdown-files ignore
63+
--max-width none
64+
--modifier-order
65+
--never-trailing
66+
--nil-init remove
67+
--no-space-operators
68+
--no-wrap-operators
69+
--non-complex-attributes
70+
--octal-grouping 4,8
71+
--operator-func spaced
72+
--organization-mode visibility
73+
--organize-types actor,class,enum,struct
74+
--pattern-let hoist
75+
--preserve-acronyms
76+
--preserve-decls
77+
--preserved-property-types Package
78+
--property-types inferred
6979
--ranges spaced
80+
--redundant-async always
81+
--redundant-throws always
7082
--self init-only
71-
--selfrequired
72-
--semicolons inline
73-
--shortoptionals always
74-
--smarttabs enabled
75-
--someany true
76-
--sortedpatterns
77-
--storedvarattrs prev-line
78-
--stripunusedargs always
79-
--structthreshold 0
80-
--tabwidth unspecified
81-
--throwcapturing
83+
--self-required
84+
--semicolons inline-only
85+
--short-optionals always
86+
--single-line-for-each ignore
87+
--smart-tabs enabled
88+
--some-any true
89+
--sort-swiftui-properties none
90+
--sorted-patterns
91+
--stored-var-attributes prev-line
92+
--strip-unused-args always
93+
--struct-threshold 0
94+
--tab-width unspecified
95+
--throw-capturing
8296
--timezone system
83-
--trailingclosures
84-
--trimwhitespace always
85-
--typeattributes prev-line
86-
--typeblanklines preserve
87-
--typedelimiter space-after
88-
--typemark "MARK: - %t"
89-
--typemarks
90-
--typeorder
91-
--visibilitymarks
92-
--visibilityorder
93-
--voidtype void
94-
--wraparguments before-first
95-
--wrapcollections before-first
96-
--wrapconditions after-first
97-
--wrapeffects preserve
98-
--wrapenumcases always
99-
--wrapparameters before-first
100-
--wrapreturntype preserve
101-
--wrapternary before-operators
102-
--wraptypealiases after-first
103-
--xcodeindentation enabled
104-
--yodaswap always
105-
--disable enumNamespaces,fileHeader,headerFileName,redundantInternal,wrap,wrapMultilineStatementBraces,wrapSingleLineComments
106-
--enable acronyms,blankLinesBetweenImports,blockComments,docComments,isEmpty,propertyTypes,redundantProperty,sortSwitchCases,unusedPrivateDeclarations,wrapConditionalBodies,wrapEnumCases
97+
--trailing-closures
98+
--trailing-commas never
99+
--trim-whitespace always
100+
--type-attributes prev-line
101+
--type-blank-lines preserve
102+
--type-body-marks preserve
103+
--type-delimiter space-after
104+
--type-mark "MARK: - %t"
105+
--type-marks
106+
--type-order
107+
--url-macro none
108+
--visibility-marks
109+
--visibility-order
110+
--void-type Void
111+
--wrap-arguments before-first
112+
--wrap-collections before-first
113+
--wrap-conditions after-first
114+
--wrap-effects preserve
115+
--wrap-enum-cases always
116+
--wrap-parameters before-first
117+
--wrap-return-type preserve
118+
--wrap-string-interpolation default
119+
--wrap-ternary before-operators
120+
--wrap-type-aliases after-first
121+
--xcode-indentation enabled
122+
--xctest-symbols
123+
--yoda-swap always
124+
--disable fileHeader,headerFileName,redundantInternal,wrap,wrapMultilineStatementBraces,wrapSingleLineComments
125+
--enable acronyms,blankLinesBetweenImports,blockComments,docComments,emptyExtensions,environmentEntry,isEmpty,noForceTryInTests,noForceUnwrapInTests,noGuardInTests,propertyTypes,redundantAsync,redundantMemberwiseInit,redundantProperty,redundantThrows,singlePropertyPerLine,sortSwitchCases,unusedPrivateDeclarations,wrapConditionalBodies,wrapEnumCases,wrapMultilineFunctionChains

0 commit comments

Comments
 (0)