Skip to content

Commit d9a827b

Browse files
authored
Merge pull request #415 from tayloraswift/6.1
upgrade 6.0 → 6.1
2 parents c76deda + 9414bec commit d9a827b

23 files changed

+78
-50
lines changed

.github/workflows/Docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ jobs:
1919
- name: Install Swift
2020
uses: tayloraswift/swift-install-action@master
2121
with:
22-
swift-prefix: "swift-6.0.3-release/ubuntu2404/swift-6.0.3-RELEASE"
23-
swift-id: "swift-6.0.3-RELEASE-ubuntu24.04"
22+
swift-prefix: "swift-6.1-release/ubuntu2404/swift-6.1-RELEASE"
23+
swift-id: "swift-6.1-RELEASE-ubuntu24.04"
2424

2525
# This installs an older version of Unidoc, not the one we are testing.
2626
# We use `--static-swift-stdlib` so it doesn’t matter if the Unidoc binary was

.github/workflows/Test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
-v $PWD:/swift/swift-unidoc \
3535
-w /swift/swift-unidoc \
3636
-e SWIFT_INSTALLATION=/usr \
37-
swift:6.0.3-noble \
37+
swift:6.1-noble \
3838
/bin/bash Scripts/Linux/TestAll
3939
4040
linux:
@@ -47,8 +47,8 @@ jobs:
4747
- name: Install Swift
4848
uses: tayloraswift/swift-install-action@master
4949
with:
50-
swift-prefix: "swift-6.0.3-release/ubuntu2404/swift-6.0.3-RELEASE"
51-
swift-id: "swift-6.0.3-RELEASE-ubuntu24.04"
50+
swift-prefix: "swift-6.1-release/ubuntu2404/swift-6.1-RELEASE"
51+
swift-id: "swift-6.1-RELEASE-ubuntu24.04"
5252

5353
- name: Checkout repository
5454
uses: actions/checkout@v3

.mailmap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Dianna <kelvin13ma@gmail.com>
2-
Dianna <mdianna1989@gmail.com>
1+
Diana <kelvin13ma@gmail.com>
2+
Diana <mdianna1989@gmail.com>

Scripts/Linux/GeneratePackageSymbolGraphs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ ssgc slave https://github.com/swiftlang/swift-syntax.git 600.0.1 \
2323
-u $SWIFT_INSTALLATION \
2424
-o TestPackages/swift-syntax.bson
2525

26-
ssgc slave https://github.com/pointfreeco/swift-snapshot-testing.git 1.17.5 \
26+
ssgc slave https://github.com/pointfreeco/swift-snapshot-testing.git 1.18.3 \
2727
-u $SWIFT_INSTALLATION \
2828
-o TestPackages/swift-snapshot-testing.bson
2929

30-
ssgc slave https://github.com/swiftlang/indexstore-db.git swift-6.0-RELEASE \
30+
ssgc slave https://github.com/swiftlang/indexstore-db.git swift-6.1-RELEASE \
3131
-u $SWIFT_INSTALLATION \
3232
-o TestPackages/indexstore-db.bson \
3333
--Xcxx -I$SWIFT_INSTALLATION/lib/swift \

Scripts/Linux/x86_64/aarch64-jammy.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM tayloraswift/swift-cross-aarch64:6.0.3-jammy
1+
FROM tayloraswift/swift-cross-aarch64:6.1-jammy
22

33
# Only bash supports multiline strings
44
SHELL ["/bin/bash", "-c"]

Scripts/Linux/x86_64/aarch64-noble.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM tayloraswift/swift-cross-aarch64:6.0.3-noble
1+
FROM tayloraswift/swift-cross-aarch64:6.1-noble
22

33
# Only bash supports multiline strings
44
SHELL ["/bin/bash", "-c"]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM tayloraswift/swift-cross-aarch64:6.0.3-jammy
1+
FROM tayloraswift/swift-cross-aarch64:6.1-jammy
22

33
RUN apt update
44
RUN apt -y install libjemalloc-dev:amd64 libjemalloc2:amd64
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM tayloraswift/swift-cross-aarch64:6.0.3-noble
1+
FROM tayloraswift/swift-cross-aarch64:6.1-noble
22

33
RUN apt update
44
RUN apt -y install libjemalloc-dev:amd64 libjemalloc2:amd64

Sources/SymbolGraphCompiler/SSGC.SymbolDump.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ extension SSGC.SymbolDump
9494

9595
for j:Int in self.vertices.indices
9696
{
97-
try
9897
{
9998
// Deport foreign doccomments.
10099
if let doccomment:SymbolGraphPart.Vertex.Doccomment = $0.doccomment,
@@ -103,16 +102,18 @@ extension SSGC.SymbolDump
103102
$0.doccomment = nil
104103
}
105104
// Trim file path prefixes.
105+
// As of 6.1, symbolgraph-extract sometimes emits paths from inside the swift
106+
// installation directory.
106107
guard
107-
let base:Symbol.FileBase = copy base
108+
let base:Symbol.FileBase = copy base,
109+
let rebased:Symbol.File = try? $0.location?.file.rebased(against: base)
108110
else
109111
{
110112
$0.location = nil
111113
return
112114
}
113115

114-
try $0.location?.file.rebase(against: base)
115-
116+
$0.location?.file = rebased
116117
} (&self.vertices[j])
117118
}
118119
}

Sources/SymbolGraphPartTests/DocumentationInheritance.swift

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -132,36 +132,42 @@ struct DocumentationInheritance
132132
.intrinsicWitness(.init(
133133
_ : "s24DocumentationInheritance15OtherRefinementPAAE8protocolytvp",
134134
of: "s24DocumentationInheritance8ProtocolP8protocolytvp",
135-
origin: .init("s24DocumentationInheritance8ProtocolP8protocolytvp"))),
135+
origin: "s24DocumentationInheritance8ProtocolP8protocolytvp")),
136+
137+
.requirement(.init(
138+
_ : "s24DocumentationInheritance10RefinementP8protocolytvp",
139+
of: "s24DocumentationInheritance10RefinementP",
140+
origin: "s24DocumentationInheritance8ProtocolP8protocolytvp")),
141+
142+
.override(.init(
143+
_ : "s24DocumentationInheritance10RefinementP8protocolytvp",
144+
of: "s24DocumentationInheritance8ProtocolP8protocolytvp",
145+
origin: "s24DocumentationInheritance8ProtocolP8protocolytvp")),
136146

137147
.member(.init(
138148
_ : "s24DocumentationInheritance9ConformerV7nowhereytvp",
139149
in: .scalar("s24DocumentationInheritance9ConformerV"),
140-
origin: .init("s24DocumentationInheritance10RefinementP7nowhereytvp"))),
150+
origin: "s24DocumentationInheritance10RefinementP7nowhereytvp")),
141151

142152
.member(.init(
143153
_ : "s24DocumentationInheritance9ConformerV10refinementytvp",
144154
in: .scalar(.init("s:24DocumentationInheritance9ConformerV")!),
145-
origin: .init(.init(
146-
"s:24DocumentationInheritance10RefinementP10refinementytvp")!))),
155+
origin: "s24DocumentationInheritance10RefinementP10refinementytvp")),
147156

148157
.member(.init(
149158
_ : "s24DocumentationInheritance9ConformerV9conformerytvp",
150159
in: .scalar("s24DocumentationInheritance9ConformerV"),
151-
origin: .init(
152-
"s24DocumentationInheritance10RefinementP9conformerytvp"))),
160+
origin: "s24DocumentationInheritance10RefinementP9conformerytvp")),
153161

154162
.member(.init(
155163
_ : "s24DocumentationInheritance9ConformerV10everywhereytvp",
156164
in: .scalar("s24DocumentationInheritance9ConformerV"),
157-
origin: .init(
158-
"s24DocumentationInheritance10RefinementP10everywhereytvp"))),
165+
origin: "s24DocumentationInheritance10RefinementP10everywhereytvp")),
159166

160167
.member(.init(
161168
_ : "s24DocumentationInheritance9ConformerV8protocolytvp",
162169
in: .scalar("s24DocumentationInheritance9ConformerV"),
163-
origin: .init(
164-
"s24DocumentationInheritance8ProtocolP8protocolytvp"))),
170+
origin: "s24DocumentationInheritance8ProtocolP8protocolytvp")),
165171
])
166172
}
167173
}

Sources/SymbolGraphParts/Relationships/Symbol.AnyRelationship.swift

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,39 @@ extension Symbol
1616
case requirement (RequirementRelationship)
1717
}
1818
}
19+
extension Symbol.AnyRelationship:CustomStringConvertible
20+
{
21+
public
22+
var description:String
23+
{
24+
switch self
25+
{
26+
case .conformance (let self): self.description
27+
case .intrinsicWitness (let self): self.description
28+
case .extension (let self): self.description
29+
case .inheritance (let self): self.description
30+
case .feature (let self): self.description
31+
case .member (let self): self.description
32+
case .override (let self): self.description
33+
case .requirement (let self): self.description
34+
}
35+
}
36+
}
1937
extension Symbol.AnyRelationship
2038
{
2139
@inlinable public
2240
var existential:any SymbolRelationship
2341
{
2442
switch self
2543
{
26-
case .conformance (let relationship): relationship
27-
case .intrinsicWitness (let relationship): relationship
28-
case .extension (let relationship): relationship
29-
case .inheritance (let relationship): relationship
30-
case .feature (let relationship): relationship
31-
case .member (let relationship): relationship
32-
case .override (let relationship): relationship
33-
case .requirement (let relationship): relationship
44+
case .conformance (let self): self
45+
case .intrinsicWitness (let self): self
46+
case .extension (let self): self
47+
case .inheritance (let self): self
48+
case .feature (let self): self
49+
case .member (let self): self
50+
case .override (let self): self
51+
case .requirement (let self): self
3452
}
3553
}
3654

Sources/SymbolGraphParts/Relationships/Symbol.ConformanceRelationship.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ extension Symbol.ConformanceRelationship:CustomStringConvertible
3434
var description:String
3535
{
3636
"""
37-
(conformance: \(self.source), to: \(self.target))
37+
/\(self.source) CONFORMS TO \(self.target) \
38+
(\(self.conditions.count) condition(s), \(self.origin == nil ? 0 : 1) origin(s))/
3839
"""
3940
}
4041
}

Sources/SymbolGraphParts/Relationships/Symbol.ExtensionRelationship.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ extension Symbol.ExtensionRelationship:CustomStringConvertible
2929
var description:String
3030
{
3131
"""
32-
(extension: \(self.source), of: \(self.target))
32+
/\(self.source) EXTENDS \(self.target)/
3333
"""
3434
}
3535
}

Sources/SymbolGraphParts/Relationships/Symbol.FeatureRelationship.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ extension Symbol.FeatureRelationship:CustomStringConvertible
2929
var description:String
3030
{
3131
"""
32-
(feature: \(self.source), of: \(self.target))
32+
/\(self.source) INHERITED BY \(self.target) (\(self.origin == nil ? 0 : 1) origin(s))/
3333
"""
3434
}
3535
}

Sources/SymbolGraphParts/Relationships/Symbol.InheritanceRelationship.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ extension Symbol.InheritanceRelationship:CustomStringConvertible
5555
var description:String
5656
{
5757
"""
58-
(inheritance by: \(self.source), of: \(self.target))
58+
/\(self.source) INHERITS FROM \(self.target) (\(self.origin == nil ? 0 : 1) origin(s))/
5959
"""
6060
}
6161
}

Sources/SymbolGraphParts/Relationships/Symbol.IntrinsicWitnessRelationship.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ extension Symbol.IntrinsicWitnessRelationship:CustomStringConvertible
5757
var description:String
5858
{
5959
"""
60-
(default implementation: \(self.source), of: \(self.target))
60+
/\(self.source) IMPLEMENTS \(self.target) (\(self.origin == nil ? 0 : 1) origin(s))/
6161
"""
6262
}
6363
}

Sources/SymbolGraphParts/Relationships/Symbol.MemberRelationship.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ extension Symbol.MemberRelationship:CustomStringConvertible
5757
var description:String
5858
{
5959
"""
60-
(member: \(self.source), of: \(self.target))
60+
/\(self.source) MEMBER OF \(self.target) (\(self.origin == nil ? 0 : 1) origin(s))/
6161
"""
6262
}
6363
}

Sources/SymbolGraphParts/Relationships/Symbol.OverrideRelationship.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ extension Symbol.OverrideRelationship:CustomStringConvertible
5858
var description:String
5959
{
6060
"""
61-
(override: \(self.source), of: \(self.target))
61+
/\(self.source) OVERRIDES \(self.target) (\(self.origin == nil ? 0 : 1) origin(s))/
6262
"""
6363
}
6464
}

Sources/SymbolGraphParts/Relationships/Symbol.RequirementRelationship.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ extension Symbol
1414
public
1515
let optional:Bool
1616

17+
@inlinable public
1718
init(_ source:Symbol.Decl,
1819
of target:Symbol.Decl,
1920
origin:Symbol.Decl? = nil,
@@ -65,7 +66,8 @@ extension Symbol.RequirementRelationship:CustomStringConvertible
6566
var description:String
6667
{
6768
"""
68-
(\(self.optional ? "optional " : "")requirement: \(self.source), of: \(self.target))
69+
/\(self.source) REQUIRED BY \(self.target) \
70+
(\(self.origin == nil ? 0 : 1) origin(s), optional: \(self.optional))/
6971
"""
7072
}
7173
}

Sources/SymbolGraphValidationTests/Main.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ struct Precompiled
123123
$0.insert($1.package.name)
124124
}
125125

126-
#expect(dependencies == ["swift-syntax"])
126+
#expect(dependencies == ["swift-syntax", "swift-custom-dump", "xctest-dynamic-overlay"])
127127

128128
#expect(object.graph.cultures.count > 0)
129129
#expect(object.graph.decls.nodes.count > 0)

Sources/UnidocDBTests/PackageAliasing.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ struct PackageAliasing:Unidoc.TestBattery
4343
try await unidoc.alias(existing: "cc", package: "ccc")
4444
try await unidoc.alias(existing: "cc", package: "ccc")
4545

46-
for (queried, expected):
47-
(Symbol.Package, (symbol:Symbol.Package, id:Unidoc.Package)) in [
46+
for (queried, (symbol, id)):
47+
(Symbol.Package, (Symbol.Package, Unidoc.Package)) in [
4848
("a", ("a", 0)),
4949
("b", ("b", 1)),
5050
("c", ("c", 2)),
@@ -57,8 +57,8 @@ struct PackageAliasing:Unidoc.TestBattery
5757
let (package, new):(Unidoc.PackageMetadata, Bool) = try await unidoc.index(
5858
package: queried)
5959

60-
#expect(package.symbol == expected.symbol)
61-
#expect(package.id == expected.id)
60+
#expect(package.symbol == symbol)
61+
#expect(package.id == id)
6262
#expect(!new)
6363
}
6464
}

Sources/UnidocUI/Unidoc.RenderFormat (ext).swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ extension Unidoc.RenderFormat
1717

1818
var availableVersions:[String]
1919
{
20-
["6.0.3"]
20+
["6.1"]
2121
}
2222
}

Sources/unidocd/Main.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ struct Main
4242
name: [.customLong("swift-toolchain"), .customShort("u")],
4343
help: "The path to a Swift toolchain directory, usually ending in 'usr'",
4444
completion: .directory)
45-
var toolchain:FilePath.Directory = "/home/ubuntu/6.0.3/aarch64/usr"
45+
var toolchain:FilePath.Directory = "/home/ubuntu/6.1/aarch64/usr"
4646

4747
@Option(
4848
name: [.customLong("swift-sdk"), .customShort("k")],

0 commit comments

Comments
 (0)