Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit c3f476d

Browse files
authored
Add support for Swift 5.4 / Xcode 12.5 (#252)
* Add Brewfile.lock.json file * Update dependencies Fix CommonMark version specifier * Add version-specific manifest for Swift 5.4 * Change minimum Swift version requirements to version 5.3+ * Fix failing tests
1 parent 5f57067 commit c3f476d

File tree

12 files changed

+152
-111
lines changed

12 files changed

+152
-111
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ jobs:
1313
strategy:
1414
matrix:
1515
xcode:
16-
- "11.7" # Swift 5.2
17-
- "12.2" # Swift 5.3
16+
- "12.4" # Swift 5.3
1817

1918
name: "macOS Big Sur (Xcode ${{ matrix.xcode }})"
2019

@@ -42,8 +41,7 @@ jobs:
4241
strategy:
4342
matrix:
4443
xcode:
45-
- "11.7" # Swift 5.2
46-
- "12" # Swift 5.3
44+
- "12.4" # Swift 5.3
4745

4846
name: "macOS Catalina (Xcode ${{ matrix.xcode }})"
4947

@@ -70,7 +68,7 @@ jobs:
7068

7169
strategy:
7270
matrix:
73-
swift: ["5.3", "5.2"]
71+
swift: ["5.3"]
7472

7573
name: "Linux (Swift ${{ matrix.swift }})"
7674

Brewfile.lock.json

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,30 @@
22
"entries": {
33
"brew": {
44
"graphviz": {
5-
"version": "2.47.0",
5+
"version": "2.47.1",
66
"bottle": {
77
"rebuild": 0,
8-
"cellar": "/usr/local/Cellar",
9-
"prefix": "/usr/local",
10-
"root_url": "https://homebrew.bintray.com/bottles",
8+
"root_url": "https://ghcr.io/v2/homebrew/core",
119
"files": {
1210
"arm64_big_sur": {
13-
"url": "https://homebrew.bintray.com/bottles/graphviz-2.47.0.arm64_big_sur.bottle.tar.gz",
14-
"sha256": "e4263e38be3d51648bffba45b0572dafd16254ce27fc3d1b13c555dff1110d5a"
11+
"cellar": "/opt/homebrew/Cellar",
12+
"url": "https://ghcr.io/v2/homebrew/core/graphviz/blobs/sha256:d9830966d41ef07d40f0a269597051dc3bd317f1f834f8eebf220d7fee6e06cb",
13+
"sha256": "d9830966d41ef07d40f0a269597051dc3bd317f1f834f8eebf220d7fee6e06cb"
1514
},
1615
"big_sur": {
17-
"url": "https://homebrew.bintray.com/bottles/graphviz-2.47.0.big_sur.bottle.tar.gz",
18-
"sha256": "7972126b79753efa1f0c3519d6a063079cb1ff02c69759864a865e4ae6b4f193"
16+
"cellar": "/usr/local/Cellar",
17+
"url": "https://ghcr.io/v2/homebrew/core/graphviz/blobs/sha256:41c4fe36cca429a201173d6f282bbc3e12ac9ae397736da75f2beb5c4c0d2e33",
18+
"sha256": "41c4fe36cca429a201173d6f282bbc3e12ac9ae397736da75f2beb5c4c0d2e33"
1919
},
2020
"catalina": {
21-
"url": "https://homebrew.bintray.com/bottles/graphviz-2.47.0.catalina.bottle.tar.gz",
22-
"sha256": "e5d3b7b652e5cf828c0a2afc2fadb31090f3d7f10389766857404b4359b695e3"
21+
"cellar": "/usr/local/Cellar",
22+
"url": "https://ghcr.io/v2/homebrew/core/graphviz/blobs/sha256:4010170a67db373c8aaf6d2d4cc4767ed74963fbedf33641e672414f49af6a9b",
23+
"sha256": "4010170a67db373c8aaf6d2d4cc4767ed74963fbedf33641e672414f49af6a9b"
2324
},
2425
"mojave": {
25-
"url": "https://homebrew.bintray.com/bottles/graphviz-2.47.0.mojave.bottle.tar.gz",
26-
"sha256": "d045a9a68315b4e3fa61c7a0a813da345be8197892d070162d909f4985ff3bd7"
26+
"cellar": "/usr/local/Cellar",
27+
"url": "https://ghcr.io/v2/homebrew/core/graphviz/blobs/sha256:a6dfb7964c7776134a100467120aa190fe45415b53a704b2a372d0b82e1d2bc6",
28+
"sha256": "a6dfb7964c7776134a100467120aa190fe45415b53a704b2a372d0b82e1d2bc6"
2729
}
2830
}
2931
}
@@ -66,6 +68,14 @@
6668
"CLT": "12.4.0.0.1.1610135815",
6769
"Xcode": "12.4",
6870
"macOS": "10.15.7"
71+
},
72+
"big_sur": {
73+
"HOMEBREW_VERSION": "3.1.3",
74+
"HOMEBREW_PREFIX": "/usr/local",
75+
"Homebrew/homebrew-core": "f668b627f8d03499447661e6f87c7c15bb597ab8",
76+
"CLT": "12.4.0.0.1.1610135815",
77+
"Xcode": "12.5",
78+
"macOS": "11.2.3"
6979
}
7080
}
7181
}

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM swift:5.2 as builder
1+
FROM swift:5.3 as builder
22
WORKDIR /swiftdoc
33
COPY . .
44
RUN apt-get -qq update && apt-get install -y libxml2-dev && rm -r /var/lib/apt/lists/*

Package.resolved

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
"repositoryURL": "https://github.com/SwiftDocOrg/CommonMark.git",
77
"state": {
88
"branch": null,
9-
"revision": "62176a332884826997928ba578d9d322c16772fb",
10-
"version": "0.4.0"
9+
"revision": "1c8f3983c12b848e0d84b3a7a1d6f9a735e6661a",
10+
"version": "0.5.0"
1111
}
1212
},
1313
{
1414
"package": "GraphViz",
1515
"repositoryURL": "https://github.com/SwiftDocOrg/GraphViz.git",
1616
"state": {
1717
"branch": null,
18-
"revision": "cf52b27bf7086e9ca5665cef0de57d0481bbab41",
19-
"version": "0.3.0"
18+
"revision": "e9a73a30755c3c5b26ba7c73312b1f2ccb9a1a30",
19+
"version": "0.4.0"
2020
}
2121
},
2222
{
@@ -42,17 +42,17 @@
4242
"repositoryURL": "https://github.com/apple/swift-argument-parser.git",
4343
"state": {
4444
"branch": null,
45-
"revision": "92646c0cdbaca076c8d3d0207891785b3379cbff",
46-
"version": "0.3.1"
45+
"revision": "9564d61b08a5335ae0a36f789a7d71493eacadfc",
46+
"version": "0.3.2"
4747
}
4848
},
4949
{
5050
"package": "cmark",
5151
"repositoryURL": "https://github.com/SwiftDocOrg/swift-cmark.git",
5252
"state": {
5353
"branch": null,
54-
"revision": "2a766030bee955b4806044fd7aca1b6884475138",
55-
"version": "0.28.3+20200110.2a76603"
54+
"revision": "9c8096a23f44794bde297452d87c455fc4f76d42",
55+
"version": "0.29.0+20210102.9c8096a"
5656
}
5757
},
5858
{
@@ -87,25 +87,25 @@
8787
"repositoryURL": "https://github.com/SwiftDocOrg/SwiftMarkup.git",
8888
"state": {
8989
"branch": null,
90-
"revision": "7915d17608dd32434dc8abb95156f70367f38a5a",
91-
"version": "0.2.1"
90+
"revision": "bc71bde93b5217833c8ed13d5cf1e0c60f1367a7",
91+
"version": "0.3.0"
9292
}
9393
},
9494
{
9595
"package": "SwiftSemantics",
9696
"repositoryURL": "https://github.com/SwiftDocOrg/SwiftSemantics.git",
9797
"state": {
9898
"branch": null,
99-
"revision": "4fdc48bddbbb8311079ed111e5a4f2b92423b05c",
100-
"version": "0.1.0"
99+
"revision": "2f571ccc67e0789d23f8adbccb6a18a6ff3b166c",
100+
"version": "0.3.0"
101101
}
102102
},
103103
{
104104
"package": "SwiftSyntaxHighlighter",
105105
"repositoryURL": "https://github.com/NSHipster/SwiftSyntaxHighlighter.git",
106106
"state": {
107-
"branch": "1.1.3",
108-
"revision": "b086ef5066b6f799f9c7d6d7fc1553581b55ef1e",
107+
"branch": "1.2.2",
108+
"revision": "175923d005df00dc76c3c191bd7977c066a5288c",
109109
"version": null
110110
}
111111
}

Package.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ let package = Package(
1414
],
1515
dependencies: [
1616
.package(name: "SwiftSyntax", url: "https://github.com/apple/swift-syntax.git", .revision("0.50300.0")),
17-
.package(url: "https://github.com/SwiftDocOrg/SwiftSemantics.git", .upToNextMinor(from: "0.1.0")),
18-
.package(url: "https://github.com/SwiftDocOrg/CommonMark.git", .upToNextMinor(from: "0.4.0")),
19-
.package(url: "https://github.com/SwiftDocOrg/SwiftMarkup.git", .upToNextMinor(from: "0.2.1")),
20-
.package(url: "https://github.com/SwiftDocOrg/GraphViz.git", .upToNextMinor(from: "0.3.0")),
17+
.package(url: "https://github.com/SwiftDocOrg/SwiftSemantics.git", .upToNextMinor(from: "0.3.0")),
18+
.package(url: "https://github.com/SwiftDocOrg/CommonMark.git", .upToNextMinor(from: "0.5.0")),
19+
.package(url: "https://github.com/SwiftDocOrg/SwiftMarkup.git", .upToNextMinor(from: "0.3.0")),
20+
.package(url: "https://github.com/SwiftDocOrg/GraphViz.git", .upToNextMinor(from: "0.4.0")),
2121
.package(url: "https://github.com/NSHipster/HypertextLiteral.git", .upToNextMinor(from: "0.0.2")),
2222
.package(url: "https://github.com/SwiftDocOrg/Markup.git", .upToNextMinor(from: "0.0.3")),
23-
.package(url: "https://github.com/NSHipster/SwiftSyntaxHighlighter.git", .revision("1.1.3")),
23+
.package(url: "https://github.com/NSHipster/SwiftSyntaxHighlighter.git", .revision("1.2.2")),
2424
.package(url: "https://github.com/apple/swift-argument-parser.git", .upToNextMinor(from: "0.3.1")),
2525
.package(url: "https://github.com/apple/swift-log.git", .upToNextMinor(from: "1.4.2")),
2626
.package(name: "LoggingGitHubActions", url: "https://github.com/NSHipster/swift-log-github-actions.git", .upToNextMinor(from: "0.0.1")),

[email protected]

Lines changed: 0 additions & 51 deletions
This file was deleted.

[email protected]

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
// swift-tools-version:5.3
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
4+
import PackageDescription
5+
6+
let package = Package(
7+
name: "swift-doc",
8+
platforms: [
9+
.macOS(.v11)
10+
],
11+
products: [
12+
.executable(name: "swift-doc", targets: ["swift-doc"]),
13+
.library(name: "SwiftDoc", targets: ["SwiftDoc"])
14+
],
15+
dependencies: [
16+
.package(name: "SwiftSyntax", url: "https://github.com/apple/swift-syntax.git", .revision("release/5.4")),
17+
.package(url: "https://github.com/SwiftDocOrg/SwiftSemantics.git", .revision("0.3.0")),
18+
.package(url: "https://github.com/SwiftDocOrg/CommonMark.git", .upToNextMinor(from: "0.5.0")),
19+
.package(url: "https://github.com/SwiftDocOrg/SwiftMarkup.git", .upToNextMinor(from: "0.3.0")),
20+
.package(url: "https://github.com/SwiftDocOrg/GraphViz.git", .upToNextMinor(from: "0.4.0")),
21+
.package(url: "https://github.com/NSHipster/HypertextLiteral.git", .upToNextMinor(from: "0.0.2")),
22+
.package(url: "https://github.com/SwiftDocOrg/Markup.git", .upToNextMinor(from: "0.0.3")),
23+
.package(url: "https://github.com/NSHipster/SwiftSyntaxHighlighter.git", .revision("1.2.2")),
24+
.package(url: "https://github.com/apple/swift-argument-parser.git", .upToNextMinor(from: "0.3.1")),
25+
.package(url: "https://github.com/apple/swift-log.git", .upToNextMinor(from: "1.4.2")),
26+
.package(name: "LoggingGitHubActions", url: "https://github.com/NSHipster/swift-log-github-actions.git", .upToNextMinor(from: "0.0.1")),
27+
],
28+
targets: [
29+
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
30+
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
31+
.target(
32+
name: "swift-doc",
33+
dependencies: [
34+
.target(name: "SwiftDoc"),
35+
.target(name: "DCOV"),
36+
.product(name: "ArgumentParser", package: "swift-argument-parser"),
37+
.product(name: "SwiftSemantics", package: "SwiftSemantics"),
38+
.product(name: "SwiftMarkup", package: "SwiftMarkup"),
39+
.product(name: "CommonMarkBuilder", package: "CommonMark"),
40+
.product(name: "HypertextLiteral", package: "HypertextLiteral"),
41+
.product(name: "Markup", package: "Markup"),
42+
.product(name: "GraphViz", package: "GraphViz"),
43+
.product(name: "SwiftSyntaxHighlighter", package: "SwiftSyntaxHighlighter"),
44+
.product(name: "Logging", package: "swift-log"),
45+
.product(name: "LoggingGitHubActions", package: "LoggingGitHubActions")
46+
]
47+
),
48+
.target(
49+
name: "DCOV",
50+
dependencies: []
51+
),
52+
.target(
53+
name: "SwiftDoc",
54+
dependencies: [
55+
.product(name: "SwiftSyntax", package: "SwiftSyntax"),
56+
.product(name: "SwiftSemantics", package: "SwiftSemantics"),
57+
.product(name: "SwiftMarkup", package: "SwiftMarkup"),
58+
.product(name: "SwiftSyntaxHighlighter", package: "SwiftSyntaxHighlighter")
59+
]
60+
),
61+
.testTarget(
62+
name: "SwiftDocTests",
63+
dependencies: [
64+
.target(name: "SwiftDoc"),
65+
.product(name: "SwiftSyntax", package: "SwiftSyntax"),
66+
.product(name: "SwiftSemantics", package: "SwiftSemantics"),
67+
.product(name: "SwiftMarkup", package: "SwiftMarkup")
68+
]
69+
),
70+
.testTarget(
71+
name: "EndToEndTests",
72+
dependencies: [
73+
.target(name: "swift-doc"),
74+
]
75+
),
76+
]
77+
)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ as well as top-level type aliases, functions, and variables.
1616

1717
## Requirements
1818

19-
- Swift 5.3
19+
- Swift 5.3+
2020
- [libxml2][libxml2]
2121
- [GraphViz][graphviz] _(optional)_
2222

Sources/swift-doc/Supporting Types/Components/Abstract.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ struct Abstract: Component {
4848
</a>
4949
</dt>
5050
<dd>
51-
\#(commonmark: symbol.documentation?.summary ?? "")
51+
\#(commonmark: symbol.documentation?.summary?.description ?? "")
5252
</dd>
5353
"""#
5454
}

0 commit comments

Comments
 (0)