Skip to content

Commit 83522ee

Browse files
committed
add single-use logic for rescaling the SymbolGraph ABI versions back to major version zero. luckily, we should only need to do this once...
1 parent cd388c0 commit 83522ee

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

Sources/SymbolGraphs/SymbolGraphABI.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ import SemanticVersions
33
@frozen public
44
enum SymbolGraphABI
55
{
6-
@inlinable public static var version:PatchVersion { .v(8, 9, 0) }
6+
@inlinable public static var version:PatchVersion { .v(0, 8, 10) }
77
}

Sources/UnidocDB/UnidocDatabase.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,18 @@ extension UnidocDatabase
319319
}
320320

321321
var snapshot:Unidoc.Snapshot = stored
322+
323+
// Single-use migration: we need to scale the ABI version numbers by one component.
324+
// No way to do this in an aggregation or an update, it turns it into a double!
325+
if snapshot.metadata.abi.components.major > 0
326+
{
327+
snapshot.metadata.abi = .v(
328+
0,
329+
UInt16.init(snapshot.metadata.abi.components.major),
330+
snapshot.metadata.abi.components.minor)
331+
}
332+
// END hack.
333+
322334
let volume:Unidoc.Volume = try await self.link(&snapshot,
323335
realm: package.realm,
324336
with: session)

0 commit comments

Comments
 (0)