Skip to content

Commit 93fab0d

Browse files
committed
move the phylum types from Unidoc to Symbols, and liberate SymbolGraphs and SymbolGraphParts from their Unidoc dependencies
1 parent f060c22 commit 93fab0d

File tree

61 files changed

+124
-136
lines changed

Some content is hidden

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

61 files changed

+124
-136
lines changed

Package.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ let package:Package = .init(
159159
[
160160
.target(name: "Codelinks"),
161161
.target(name: "Symbols"),
162+
// This dependency is present for (questionable?) performance reasons.
162163
.target(name: "Unidoc"),
163164
]),
164165

@@ -406,7 +407,6 @@ let package:Package = .init(
406407
.target(name: "MarkdownPluginSwift"),
407408
.target(name: "Signatures"),
408409
.target(name: "Symbols"),
409-
.target(name: "Unidoc"),
410410
]),
411411

412412
.target(name: "SymbolGraphs", dependencies:
@@ -416,7 +416,6 @@ let package:Package = .init(
416416
.target(name: "SHA1"),
417417
.target(name: "Signatures"),
418418
.target(name: "Symbols"),
419-
.target(name: "Unidoc"),
420419

421420
.product(name: "BSON", package: "swift-mongodb"),
422421
],

Sources/CodelinkResolution/Codelink.Filter (ext).swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import Codelinks
2-
import Unidoc
2+
import Symbols
33

44
extension Codelink.Filter
55
{
66
static
7-
func ~= (self:Self, phylum:Unidoc.Decl?) -> Bool
7+
func ~= (self:Self, phylum:Phylum.Decl?) -> Bool
88
{
99
guard
10-
let phylum:Unidoc.Decl
10+
let phylum:Phylum.Decl
1111
else
1212
{
1313
return false

Sources/CodelinkResolution/Codelink.Suffix.Legacy.Filter (ext).swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import Codelinks
2-
import Unidoc
2+
import Symbols
33

44
extension Codelink.Suffix.Legacy.Filter
55
{
66
static
7-
func ~= (self:Self, phylum:Unidoc.Decl?) -> Bool
7+
func ~= (self:Self, phylum:Phylum.Decl?) -> Bool
88
{
99
guard
10-
let phylum:Unidoc.Decl
10+
let phylum:Phylum.Decl
1111
else
1212
{
1313
return false

Sources/CodelinkResolution/CodelinkResolver.Overload.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import FNV1
2-
import Unidoc
2+
import Symbols
33

44
extension CodelinkResolver
55
{
@@ -11,12 +11,12 @@ extension CodelinkResolver
1111

1212
/// The phylum of the target, if it is a declaration. If a module, this is nil.
1313
public
14-
let phylum:Unidoc.Decl?
14+
let phylum:Phylum.Decl?
1515
public
1616
let hash:FNV24
1717

1818
@inlinable public
19-
init(target:Target, phylum:Unidoc.Decl?, hash:FNV24)
19+
init(target:Target, phylum:Phylum.Decl?, hash:FNV24)
2020
{
2121
self.target = target
2222
self.phylum = phylum

Sources/Codelinks/V3/CodelinkV3.Filter.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ extension CodelinkV3.Filter
2323
public
2424
init?(suffix:Substring)
2525
{
26-
// Very similar to the `Unidoc.Phylum` type, except no extensions.
26+
// Very similar to the `Phylum` type, except no extensions.
2727
switch suffix
2828
{
2929
case "swift.associatedtype": self = .associatedtype

Sources/SymbolGraphCompiler/Compiler/Compiler.VertexError.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ extension Compiler
1313
public
1414
let symbol:Symbol.USR
1515
public
16-
let phylum:Unidoc.Phylum
16+
let phylum:Phylum
1717

1818
public
19-
init(underlying:any Error, symbol:Symbol.USR, phylum:Unidoc.Phylum)
19+
init(underlying:any Error, symbol:Symbol.USR, phylum:Phylum)
2020
{
2121
self.underlying = underlying
2222
self.symbol = symbol

Sources/SymbolGraphCompiler/Declarations/Compiler.Decl.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ extension Compiler
2222
let location:SourceLocation<Symbol.File>?
2323

2424
public
25-
let phylum:Unidoc.Decl
25+
let phylum:Phylum.Decl
2626
public
2727
let path:UnqualifiedPath
2828

@@ -53,7 +53,7 @@ extension Compiler
5353
public internal(set)
5454
var origin:Symbol.Decl?
5555
public internal(set)
56-
var kinks:Unidoc.Decl.Kinks
56+
var kinks:Phylum.Decl.Kinks
5757

5858
public private(set)
5959
var comment:Doccomment?
@@ -63,7 +63,7 @@ extension Compiler
6363
init(_ id:Symbol.Decl,
6464
signature:Signature<Symbol.Decl>,
6565
location:SourceLocation<Symbol.File>?,
66-
phylum:Unidoc.Decl,
66+
phylum:Phylum.Decl,
6767
path:UnqualifiedPath)
6868
{
6969
self.id = id

Sources/SymbolGraphCompiler/Declarations/Compiler.DeclObject.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ extension Compiler.DeclObject
4949
self.value.id
5050
}
5151

52-
var kinks:Unidoc.Decl.Kinks
52+
var kinks:Phylum.Decl.Kinks
5353
{
5454
_read { yield self.value.kinks }
5555
_modify { yield &self.value.kinks }

Sources/SymbolGraphCompiler/Declarations/Compiler.Nomination.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ extension Compiler
99
@usableFromInline internal
1010
let name:String
1111
@usableFromInline internal
12-
let phylum:Unidoc.Decl
12+
let phylum:Phylum.Decl
1313

14-
init(_ name:String, phylum:Unidoc.Decl)
14+
init(_ name:String, phylum:Phylum.Decl)
1515
{
1616
self.name = name
1717
self.phylum = phylum

Sources/SymbolGraphCompiler/Declarations/Compiler.Nominations.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ extension Compiler
2020
extension Compiler.Nominations
2121
{
2222
@inlinable public
23-
subscript(feature scalar:Symbol.Decl) -> (name:String, phylum:Unidoc.Decl)?
23+
subscript(feature scalar:Symbol.Decl) -> (name:String, phylum:Phylum.Decl)?
2424
{
2525
self.nominations[scalar].map { ($0.name, $0.phylum) }
2626
}

0 commit comments

Comments
 (0)