From 09d1ec0f4e00f970b27d300706aff6b7dc83eaaa Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Sat, 23 May 2026 22:32:45 -0400 Subject: decouple abstraction phase2: dub sub-package split Declare sisudoc.abstraction as a dub sub-package (spine:abstraction) within the existing dub.json. The sub-package's sourcePaths cover exactly the abstraction-side clusters that were freed from io_out edges in phase 0 and phase 1: - src/sisudoc/abstraction (package surface + ssp serialiser) - src/sisudoc/meta (per-document abstraction) - src/sisudoc/io_in (file/pod ingress) Its declared dependencies are spine:dyaml and spine:imageformats only - no d2sqlite3, no io_out. The main "spine" package adds spine:abstraction to its dependencies and lists those three directories in excludedSourceFiles so dub does not compile the abstraction-side sources twice when the executable is built with --combined (as the nix derivation does). (assisted by Claude-Code) --- dub.json | 28 ++++++++++++++++++++++++++++ org/config_dub.org | 28 ++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) diff --git a/dub.json b/dub.json index 3fa9dae..0b5bddc 100644 --- a/dub.json +++ b/dub.json @@ -10,6 +10,11 @@ "license": "AGPL-3.0+", "targetPath": "./bin", "sourcePaths": [ "./src/sisudoc" ], + "excludedSourceFiles": [ + "src/sisudoc/abstraction/*", + "src/sisudoc/meta/*", + "src/sisudoc/io_in/*" + ], "importPaths": [ "./views" ], "stringImportPaths": [ "./views" ], "buildRequirements": [ "allowWarnings" ], @@ -42,11 +47,34 @@ } }, "dependencies": { + "spine:abstraction": "*", "spine:d2sqlite3": "*", "spine:imageformats": "*", "spine:dyaml": "*" }, "subPackages": [ + { + "name": "abstraction", + "description": "sisudoc-abstraction: in-memory document object model + .ssp serialisation (markup -> abstraction stage, independent of output formats)", + "homepage": "https://sisudoc.org", + "authors": [ "Ralph Amissah" ], + "copyright": "Copyright © 2015 - 2026 Ralph Amissah", + "license": "AGPL-3.0+", + "targetType": "library", + "sourcePaths": [ + "./src/sisudoc/abstraction", + "./src/sisudoc/meta", + "./src/sisudoc/io_in" + ], + "importPaths": [ + "./src/sisudoc" + ], + "buildRequirements": [ "allowWarnings" ], + "dependencies": { + "spine:dyaml": "*", + "spine:imageformats": "*" + } + }, { "name": "d2sqlite3", "description": "A thin wrapper around SQLite 3", diff --git a/org/config_dub.org b/org/config_dub.org index 27a9c22..b1700e5 100644 --- a/org/config_dub.org +++ b/org/config_dub.org @@ -47,6 +47,11 @@ "license": "AGPL-3.0+", "targetPath": "./bin", "sourcePaths": [ "./src/sisudoc" ], + "excludedSourceFiles": [ + "src/sisudoc/abstraction/*", + "src/sisudoc/meta/*", + "src/sisudoc/io_in/*" + ], "importPaths": [ "./views" ], "stringImportPaths": [ "./views" ], "buildRequirements": [ "allowWarnings" ], @@ -79,11 +84,34 @@ } }, "dependencies": { + "spine:abstraction": "*", "spine:d2sqlite3": "*", "spine:imageformats": "*", "spine:dyaml": "*" }, "subPackages": [ + { + "name": "abstraction", + "description": "sisudoc-abstraction: in-memory document object model + .ssp serialisation (markup -> abstraction stage, independent of output formats)", + "homepage": "https://sisudoc.org", + "authors": [ "Ralph Amissah" ], + "copyright": "Copyright © 2015 - 2026 Ralph Amissah", + "license": "AGPL-3.0+", + "targetType": "library", + "sourcePaths": [ + "./src/sisudoc/abstraction", + "./src/sisudoc/meta", + "./src/sisudoc/io_in" + ], + "importPaths": [ + "./src/sisudoc" + ], + "buildRequirements": [ "allowWarnings" ], + "dependencies": { + "spine:dyaml": "*", + "spine:imageformats": "*" + } + }, { "name": "d2sqlite3", "description": "A thin wrapper around SQLite 3", -- cgit v1.2.3