Skip to content

Commit bcc7760

Browse files
committed
upgrade the NounTree proto format to include the Phylum.DeclFlags
1 parent b2124d4 commit bcc7760

27 files changed

+365
-128
lines changed

Sources/SwiftinitPages/CanonicalVersion.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,22 +62,22 @@ extension CanonicalVersion
6262
switch vertex
6363
{
6464
case .article(let vertex):
65-
target = .article(Swiftinit.Docs[volumeOfLatest, vertex.shoot])
65+
target = .article(Swiftinit.Docs[volumeOfLatest, vertex.route])
6666

6767
case .culture(let vertex):
68-
target = .culture(Swiftinit.Docs[volumeOfLatest, vertex.shoot])
68+
target = .culture(Swiftinit.Docs[volumeOfLatest, vertex.route])
6969

7070
case .decl(let vertex):
71-
target = .decl(Swiftinit.Docs[volumeOfLatest, vertex.shoot])
71+
target = .decl(Swiftinit.Docs[volumeOfLatest, vertex.route])
7272

7373
case .file:
7474
return nil
7575

7676
case .product(let vertex):
77-
target = .product(Swiftinit.Docs[volumeOfLatest, vertex.shoot])
77+
target = .product(Swiftinit.Docs[volumeOfLatest, vertex.route])
7878

7979
case .foreign(let vertex):
80-
target = .foreign(Swiftinit.Docs[volumeOfLatest, vertex.shoot])
80+
target = .foreign(Swiftinit.Docs[volumeOfLatest, vertex.route])
8181

8282
case .global:
8383
target = .global

Sources/SwiftinitPages/Contexts/IdentifiablePageContext.Cache.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ extension IdentifiablePageContext.Cache where ID:Swiftinit.VertexPageIdentifier
5454
{
5555
if case .culture(let vertex)? = self.vertices[scalar]
5656
{
57-
(vertex, self.load(scalar) { Swiftinit.Docs[$0, vertex.shoot] })
57+
(vertex, self.load(scalar) { Swiftinit.Docs[$0, vertex.route] })
5858
}
5959
else
6060
{
@@ -69,7 +69,7 @@ extension IdentifiablePageContext.Cache where ID:Swiftinit.VertexPageIdentifier
6969
{
7070
if case .article(let vertex)? = self.vertices[scalar]
7171
{
72-
(vertex, self.load(scalar) { Swiftinit.Docs[$0, vertex.shoot] })
72+
(vertex, self.load(scalar) { Swiftinit.Docs[$0, vertex.route] })
7373
}
7474
else
7575
{
@@ -84,7 +84,7 @@ extension IdentifiablePageContext.Cache where ID:Swiftinit.VertexPageIdentifier
8484
{
8585
if case .decl(let vertex)? = self.vertices[scalar]
8686
{
87-
(vertex, self.load(scalar) { Swiftinit.Docs[$0, vertex.shoot] })
87+
(vertex, self.load(scalar) { Swiftinit.Docs[$0, vertex.route] })
8888
}
8989
else
9090
{
@@ -106,12 +106,12 @@ extension IdentifiablePageContext.Cache where ID:Swiftinit.VertexPageIdentifier
106106
{
107107
switch vertex
108108
{
109-
case .article(let vertex): Swiftinit.Docs[$0, vertex.shoot]
110-
case .culture(let vertex): Swiftinit.Docs[$0, vertex.shoot]
111-
case .decl(let vertex): Swiftinit.Docs[$0, vertex.shoot]
109+
case .article(let vertex): Swiftinit.Docs[$0, vertex.route]
110+
case .culture(let vertex): Swiftinit.Docs[$0, vertex.route]
111+
case .decl(let vertex): Swiftinit.Docs[$0, vertex.route]
112112
case .file: nil
113-
case .product(let vertex): Swiftinit.Docs[$0, vertex.shoot]
114-
case .foreign(let vertex): Swiftinit.Docs[$0, vertex.shoot]
113+
case .product(let vertex): Swiftinit.Docs[$0, vertex.route]
114+
case .foreign(let vertex): Swiftinit.Docs[$0, vertex.route]
115115
case .global: Swiftinit.Docs[$0]
116116
}
117117
}

Sources/SwiftinitPages/Contexts/IdentifiablePageContext.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ extension IdentifiablePageContext where ID:Swiftinit.VertexPageIdentifier
106106
extension IdentifiablePageContext where ID:Swiftinit.VertexPageIdentifier
107107
{
108108
/// Generates a subdomain header for a module using its shoot.
109-
func subdomain(_ module:Unidoc.Shoot) -> Unidoc.VolumeMetadata.Subdomain?
109+
func subdomain(_ module:Unidoc.Route) -> Unidoc.VolumeMetadata.Subdomain?
110110
{
111111
let module:HTML.Link<Substring> = .init(display: module.stem.first,
112112
target: "\(Swiftinit.Docs[self.volume, module])")

Sources/SwiftinitPages/Surfaces/Swiftinit.VertexLayer.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ extension Swiftinit.VertexLayer
3636
}
3737

3838
static
39-
subscript(volume:Unidoc.VolumeMetadata, shoot:Unidoc.Shoot) -> URI
39+
subscript(volume:Unidoc.VolumeMetadata, route:Unidoc.Route) -> URI
4040
{
4141
var uri:URI = Self[volume]
4242

43-
uri.path += shoot.stem
44-
uri["hash"] = shoot.hash?.description
43+
uri.path += route.stem
44+
uri["hash"] = route.hash?.description
4545

4646
return uri
4747
}

Sources/SwiftinitPages/Surfaces/Vertices/Swiftinit.Docs.ArticlePage.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ extension Swiftinit.Docs.ArticlePage:Swiftinit.RenderablePage
5050
}
5151
extension Swiftinit.Docs.ArticlePage:Swiftinit.StaticPage
5252
{
53-
var location:URI { Swiftinit.Docs[self.volume, self.vertex.shoot] }
53+
var location:URI { Swiftinit.Docs[self.volume, self.vertex.route] }
5454
}
5555
extension Swiftinit.Docs.ArticlePage:Swiftinit.ApplicationPage
5656
{

Sources/SwiftinitPages/Surfaces/Vertices/Swiftinit.Docs.DeclPage.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ extension Swiftinit.Docs.DeclPage:Swiftinit.RenderablePage
7777
}
7878
extension Swiftinit.Docs.DeclPage:Swiftinit.StaticPage
7979
{
80-
var location:URI { Swiftinit.Docs[self.volume, self.vertex.shoot] }
80+
var location:URI { Swiftinit.Docs[self.volume, self.vertex.route] }
8181
}
8282
extension Swiftinit.Docs.DeclPage:Swiftinit.ApplicationPage
8383
{

Sources/SwiftinitPages/Surfaces/Vertices/Swiftinit.Docs.ForeignPage.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ extension Swiftinit.Docs.ForeignPage:Swiftinit.RenderablePage
5757
}
5858
extension Swiftinit.Docs.ForeignPage:Swiftinit.StaticPage
5959
{
60-
var location:URI { Swiftinit.Docs[self.volume, self.vertex.shoot] }
60+
var location:URI { Swiftinit.Docs[self.volume, self.vertex.route] }
6161
}
6262
extension Swiftinit.Docs.ForeignPage:Swiftinit.ApplicationPage
6363
{

Sources/SwiftinitPages/Surfaces/Vertices/Swiftinit.Docs.ModulePage.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ extension Swiftinit.Docs.ModulePage:Swiftinit.RenderablePage
7171
}
7272
extension Swiftinit.Docs.ModulePage:Swiftinit.StaticPage
7373
{
74-
var location:URI { Swiftinit.Docs[self.volume, self.vertex.shoot] }
74+
var location:URI { Swiftinit.Docs[self.volume, self.vertex.route] }
7575
}
7676
extension Swiftinit.Docs.ModulePage:Swiftinit.ApplicationPage
7777
{
@@ -164,7 +164,7 @@ extension Swiftinit.Docs.ModulePage:Swiftinit.VertexPage
164164
}
165165

166166
$0[.div] { $0.class = "more" } = Swiftinit.StatsThumbnail.init(
167-
target: Swiftinit.Stats[self.volume, self.vertex.shoot],
167+
target: Swiftinit.Stats[self.volume, self.vertex.route],
168168
census: self.vertex.census,
169169
domain: self.name,
170170
title: "Module stats and coverage details")

Sources/SwiftinitPages/Surfaces/Vertices/Swiftinit.Docs.MultipleFoundPage.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,7 @@ extension Swiftinit.Docs.MultipleFoundPage:Swiftinit.RenderablePage
4848
}
4949
extension Swiftinit.Docs.MultipleFoundPage:Swiftinit.StaticPage
5050
{
51-
var location:URI
52-
{
53-
Swiftinit.Docs[self.volume, .init(stem: self.identity, hash: nil)]
54-
}
51+
var location:URI { Swiftinit.Docs[self.volume, .bare(self.identity)] }
5552
}
5653
extension Swiftinit.Docs.MultipleFoundPage:Swiftinit.ApplicationPage
5754
{

Sources/SwiftinitPages/Surfaces/Vertices/Swiftinit.Docs.ProductPage.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ extension Swiftinit.Docs.ProductPage:Swiftinit.RenderablePage
5050
}
5151
extension Swiftinit.Docs.ProductPage:Swiftinit.StaticPage
5252
{
53-
var location:URI { Swiftinit.Docs[self.volume, self.vertex.shoot] }
53+
var location:URI { Swiftinit.Docs[self.volume, self.vertex.route] }
5454
}
5555
extension Swiftinit.Docs.ProductPage:Swiftinit.ApplicationPage
5656
{
@@ -106,7 +106,7 @@ extension Swiftinit.Docs.ProductPage:Swiftinit.VertexPage
106106
$0 += " package also contains "
107107
$0[.a]
108108
{
109-
$0.href = "\(Swiftinit.Docs[self.volume, vertex.shoot])"
109+
$0.href = "\(Swiftinit.Docs[self.volume, vertex.route])"
110110
} = "a module"
111111
$0 += " with the same name."
112112
}
@@ -165,7 +165,7 @@ extension Swiftinit.Docs.ProductPage:Swiftinit.VertexPage
165165
{
166166
$0[.a]
167167
{
168-
$0.href = "\(Swiftinit.Docs[self.volume, vertex.shoot])"
168+
$0.href = "\(Swiftinit.Docs[self.volume, vertex.route])"
169169
} = vertex.module.name
170170
}
171171
$0[.td]
@@ -186,7 +186,7 @@ extension Swiftinit.Docs.ProductPage:Swiftinit.VertexPage
186186
{
187187
$0[.a]
188188
{
189-
$0.href = "\(Swiftinit.Docs[volume, vertex.shoot])"
189+
$0.href = "\(Swiftinit.Docs[volume, vertex.route])"
190190
} = vertex.symbol
191191
}
192192

0 commit comments

Comments
 (0)