Skip to content

Commit cff9ae4

Browse files
committed
refactor: simplify API by using concrete IRI types only
Remove IRI.Representable generic initializers in favor of concrete RFC_3987.IRI types for better usability: - Link, Feed, Entry, Content, Generator, Category, Person, Source: Removed duplicate IRI.Representable generic initializers - Keep only concrete IRI type initializers - String literals work via IRI's ExpressibleByStringLiteral conformance - Eliminates generic type inference issues - Cleaner, simpler API with one initializer per type Breaking changes: - Foundation URL types must be explicitly converted to IRI before passing to initializers Benefits: - No generic type inference issues with nil parameters - Simpler API documentation - Clearer type requirements - Better error messages All tests pass (22/22)
0 parents  commit cff9ae4

27 files changed

+1810
-0
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"

.github/workflows/ci.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
macos:
11+
name: macOS (Xcode 16.0, Swift 6.0)
12+
runs-on: macos-15
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Select Xcode 16.0
16+
run: sudo xcode-select -s /Applications/Xcode_16.0.app
17+
- name: Swift version
18+
run: swift --version
19+
- name: Build
20+
run: swift build
21+
- name: Run tests
22+
run: swift test
23+
24+
macos-swift-6-2:
25+
name: macOS (Xcode 16.2, Swift 6.2)
26+
runs-on: macos-15
27+
steps:
28+
- uses: actions/checkout@v4
29+
- name: Select Xcode 16.2
30+
run: sudo xcode-select -s /Applications/Xcode_16.2.app
31+
- name: Swift version
32+
run: swift --version
33+
- name: Build
34+
run: swift build
35+
- name: Run tests
36+
run: swift test
37+
38+
linux:
39+
name: Linux (Swift 6.0)
40+
runs-on: ubuntu-latest
41+
container: swift:6.0
42+
steps:
43+
- uses: actions/checkout@v4
44+
- name: Swift version
45+
run: swift --version
46+
- name: Build
47+
run: swift build
48+
- name: Run tests
49+
run: swift test
50+
51+
windows:
52+
name: Windows (Swift 6.0)
53+
runs-on: windows-latest
54+
steps:
55+
- uses: actions/checkout@v4
56+
- uses: compnerd/gha-setup-swift@main
57+
with:
58+
branch: swift-6.0-release
59+
tag: 6.0-RELEASE
60+
- name: Swift version
61+
run: swift --version
62+
- name: Build
63+
run: swift build
64+
- name: Run tests
65+
run: swift test

.github/workflows/swift-format.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Swift Format
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
swift-format:
11+
name: Swift Format Check
12+
runs-on: macos-15
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Select Xcode 16.0
16+
run: sudo xcode-select -s /Applications/Xcode_16.0.app
17+
- name: Install swift-format
18+
run: |
19+
brew install swift-format
20+
- name: Run swift-format
21+
run: |
22+
swift-format lint --recursive Sources Tests

.github/workflows/swiftlint.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: SwiftLint
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
swiftlint:
11+
name: SwiftLint Check
12+
runs-on: macos-15
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Install SwiftLint
16+
run: brew install swiftlint
17+
- name: Run SwiftLint
18+
run: swiftlint lint --strict

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.build/

.swift-format

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"version": 1,
3+
"lineLength": 100,
4+
"indentation": {
5+
"spaces": 4
6+
},
7+
"maximumBlankLines": 1,
8+
"respectsExistingLineBreaks": true,
9+
"lineBreakBeforeControlFlowKeywords": false,
10+
"lineBreakBeforeEachArgument": false
11+
}

.swiftlint.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
disabled_rules:
2+
- trailing_comma
3+
- todo
4+
- line_length
5+
6+
opt_in_rules:
7+
- empty_count
8+
- empty_string
9+
10+
excluded:
11+
- .build
12+
- .swiftpm
13+
14+
line_length:
15+
warning: 120
16+
error: 200
17+
18+
identifier_name:
19+
min_length:
20+
warning: 1
21+
error: 1

.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>SchemeUserState</key>
6+
<dict>
7+
<key>swift-rfc-4287.xcscheme_^#shared#^_</key>
8+
<dict>
9+
<key>orderHint</key>
10+
<integer>0</integer>
11+
</dict>
12+
</dict>
13+
</dict>
14+
</plist>

0 commit comments

Comments
 (0)