File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Sources/UnidocDB/Packages Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -88,9 +88,11 @@ extension PackageDatabase.Editions
88
88
package : Int32 ,
89
89
with session: Mongo . Session ) async throws -> Int32 ?
90
90
{
91
+ // We use the SHA-1 hash as “proof” that the edition has at least one symbol graph.
92
+ // Therefore, merely registering tags does not update hashes.
91
93
let placement : Placement = try await self . register ( package : package ,
92
94
refname: tag. name,
93
- sha1: tag . hash ,
95
+ sha1: nil ,
94
96
with: session)
95
97
96
98
return placement. new ? placement. coordinate : nil
Original file line number Diff line number Diff line change @@ -96,6 +96,9 @@ extension PackageDatabase
96
96
else if case . swift = docs. metadata. package ,
97
97
let tagname: String = docs. metadata. commit? . refname
98
98
{
99
+ /// Standard library symbol graphs don’t come with hashes, so we can’t efficiently
100
+ /// “prove” that a particular edition has at least one symbol graph. But we don’t
101
+ /// need to query that in the first place.
99
102
let placement : Editions . Placement = try await self . editions. register (
100
103
package : placement. coordinate,
101
104
refname: tagname,
You can’t perform that action at this time.
0 commit comments