diff options
| author | Ralph Amissah <ralph.amissah@gmail.com> | 2026-05-25 11:33:14 -0400 |
|---|---|---|
| committer | Ralph Amissah <ralph.amissah@gmail.com> | 2026-05-25 12:21:38 -0400 |
| commit | 6ce2e8efb3a81b724840c06d62d5c8379992f7f0 (patch) | |
| tree | 4112c585d0f907d905ffde4d4887587e6fffea0d | |
| parent | ocda + outputs split: module/import + dub.json fixups (diff) | |
Three small follow-ups to the ocda/outputs split:
1. Add src/sisudoc/ocda/package.d (module sisudoc.ocda) as a 2-line
public re-export of sisudoc.ocda.abstraction. Provides downstream
consumers with a canonical "import sisudoc.ocda;" entry point and
a stable handle for eventual peer-repo packaging of the
abstraction library.
2. Fix the D import-path root in dub.json so it matches the declared
module names:
- spine:abstraction sub-package
"importPaths": [ "./src/sisudoc" ] -> [ "./src" ]
- main package buildTypes (dmd, ldc2, ldmd2, gdc, gdmd)
"-I=src/sisudoc" -> "-I=src"
The modules are named sisudoc.ocda.* / sisudoc.outputs.* /
sisudoc.* so the filesystem-based resolver needs to see
./src as the root (so <root>/sisudoc/ocda/X.d resolves).
3. Replace dyaml sub-package's destructive preGenerateCommands
("rm -rf ./src/ext_depends/D-YAML/{examples,testsuite}") with
declarative excludedSourceFiles globs. The two directories do
not exist in the vendored D-YAML tree, so the rm was a no-op
in practice; the glob form is defensive (would silently skip
them if they were ever re-introduced) and removes the
destructive side-effect from every build.
(assisted by Claude-Code)
| -rw-r--r-- | dub.json | 18 | ||||
| -rw-r--r-- | flake.lock | 6 | ||||
| -rw-r--r-- | org/config_dub.org | 18 | ||||
| -rw-r--r-- | org/ocda.org | 30 | ||||
| -rw-r--r-- | src/sisudoc/ocda/package.d | 68 |
5 files changed, 118 insertions, 22 deletions
@@ -17,27 +17,27 @@ "targetType": "executable", "buildTypes": { "dmd": { - "dflags": [ "-O", "-J=views", "-I=src/sisudoc" ], + "dflags": [ "-O", "-J=views", "-I=src" ], "buildOptions": [ "inline", "verbose" ], "buildRequirements": [ "allowWarnings" ] }, "ldc2": { - "lflags": [ "-O2", "-I=src/sisudoc" ], + "lflags": [ "-O2", "-I=src" ], "buildOptions": [ "optimize", "inline", "verbose" ], "buildRequirements": [ "allowWarnings" ] }, "ldmd2": { - "dflags": [ "-O", "-J=views", "-I=src/sisudoc" ], + "dflags": [ "-O", "-J=views", "-I=src" ], "buildOptions": [ "optimize", "inline", "verbose" ], "buildRequirements": [ "allowWarnings" ] }, "gdc": { - "lflags": [ "-O2", "-J=views", "-I=src/sisudoc" ], + "lflags": [ "-O2", "-J=views", "-I=src" ], "buildOptions": [ "optimize", "inline" ], "buildRequirements": [ "allowWarnings" ] }, "gdmd": { - "dflags": [ "-O", "-J=views", "-I=src/sisudoc" ], + "dflags": [ "-O", "-J=views", "-I=src" ], "buildOptions": [ "optimize", "inline" ], "buildRequirements": [ "allowWarnings" ] } @@ -58,7 +58,7 @@ "license": "AGPL-3.0+", "targetType": "library", "sourcePaths": [ "./src/sisudoc/ocda" ], - "importPaths": [ "./src/sisudoc" ], + "importPaths": [ "./src" ], "buildRequirements": [ "allowWarnings" ], "dependencies": { "spine:dyaml": "*", @@ -110,9 +110,9 @@ "./src/ext_depends/D-YAML/source", "./src/ext_depends/tinyendian/source" ], - "preGenerateCommands": [ - "rm -rf ./src/ext_depends/D-YAML/examples", - "rm -rf ./src/ext_depends/D-YAML/testsuite" + "excludedSourceFiles": [ + "./src/ext_depends/D-YAML/examples/**", + "./src/ext_depends/D-YAML/testsuite/**" ] } ], @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1779536132, - "narHash": "sha256-q+fF42iv/geEbHfgSzy3tS0FF/EyD6XTZ98E6yxiBO8=", + "lastModified": 1779593580, + "narHash": "sha256-le3WvQyzAQjBZnb7q2c8C5Fk2c9LgN/Oq+b0KiD4fM4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3d8f0f3f72a6cd4d93d0ad13203f2ea1cb7e1456", + "rev": "d849bb215dcdf71bce3e686839ccdb4219e84b2f", "type": "github" }, "original": { diff --git a/org/config_dub.org b/org/config_dub.org index d82a5ac..10dd6e5 100644 --- a/org/config_dub.org +++ b/org/config_dub.org @@ -54,27 +54,27 @@ "targetType": "executable", "buildTypes": { "dmd": { - "dflags": [ "-O", "-J=views", "-I=src/sisudoc" ], + "dflags": [ "-O", "-J=views", "-I=src" ], "buildOptions": [ "inline", "verbose" ], "buildRequirements": [ "allowWarnings" ] }, "ldc2": { - "lflags": [ "-O2", "-I=src/sisudoc" ], + "lflags": [ "-O2", "-I=src" ], "buildOptions": [ "optimize", "inline", "verbose" ], "buildRequirements": [ "allowWarnings" ] }, "ldmd2": { - "dflags": [ "-O", "-J=views", "-I=src/sisudoc" ], + "dflags": [ "-O", "-J=views", "-I=src" ], "buildOptions": [ "optimize", "inline", "verbose" ], "buildRequirements": [ "allowWarnings" ] }, "gdc": { - "lflags": [ "-O2", "-J=views", "-I=src/sisudoc" ], + "lflags": [ "-O2", "-J=views", "-I=src" ], "buildOptions": [ "optimize", "inline" ], "buildRequirements": [ "allowWarnings" ] }, "gdmd": { - "dflags": [ "-O", "-J=views", "-I=src/sisudoc" ], + "dflags": [ "-O", "-J=views", "-I=src" ], "buildOptions": [ "optimize", "inline" ], "buildRequirements": [ "allowWarnings" ] } @@ -95,7 +95,7 @@ "license": "AGPL-3.0+", "targetType": "library", "sourcePaths": [ "./src/sisudoc/ocda" ], - "importPaths": [ "./src/sisudoc" ], + "importPaths": [ "./src" ], "buildRequirements": [ "allowWarnings" ], "dependencies": { "spine:dyaml": "*", @@ -147,9 +147,9 @@ "./src/ext_depends/D-YAML/source", "./src/ext_depends/tinyendian/source" ], - "preGenerateCommands": [ - "rm -rf ./src/ext_depends/D-YAML/examples", - "rm -rf ./src/ext_depends/D-YAML/testsuite" + "excludedSourceFiles": [ + "./src/ext_depends/D-YAML/examples/**", + "./src/ext_depends/D-YAML/testsuite/**" ] } ], diff --git a/org/ocda.org b/org/ocda.org index a24e335..d5651cc 100644 --- a/org/ocda.org +++ b/org/ocda.org @@ -22,7 +22,35 @@ - Process markup document, create document abstraction -** library template :module:metadoc_from_src: +** library templates +*** ocda package.d + +#+HEADER: :tangle "../src/sisudoc/ocda/package.d" +#+HEADER: :noweb yes +#+BEGIN_SRC d +<<doc_header_including_copyright_and_license>> +/++ + sisudoc.ocda - canonical entry point of the document-abstraction + library. + + Pipeline position: markup -> abstraction -> output. This package is + the abstraction stage; the output stage lives in + sisudoc.outputs.io_out and consumes the values produced here. + + This file re-exports sisudoc.ocda.abstraction (the documented public + API surface) so that consumers can write + import sisudoc.ocda; + and reach the entry points (spineAbstraction!(), docAbstraction!(), + spineAbstractionTxt) without depending on spine's directory layout. + + No logic lives here. ++/ +module sisudoc.ocda; +@safe: +public import sisudoc.ocda.abstraction; +#+END_SRC + +*** ocda/abstraction package.d #+HEADER: :tangle "../src/sisudoc/ocda/abstraction/package.d" #+HEADER: :noweb yes diff --git a/src/sisudoc/ocda/package.d b/src/sisudoc/ocda/package.d new file mode 100644 index 0000000..7f32dfe --- /dev/null +++ b/src/sisudoc/ocda/package.d @@ -0,0 +1,68 @@ +/+ +- Name: SisuDoc Spine, Doc Reform [a part of] + - Description: documents, structuring, processing, publishing, search + - static content generator + + - Author: Ralph Amissah + [ralph.amissah@gmail.com] + + - Copyright: (C) 2015 (continuously updated, current 2026) Ralph Amissah, All Rights Reserved. + + - License: AGPL 3 or later: + + Spine (SiSU), a framework for document structuring, publishing and + search + + Copyright (C) Ralph Amissah + + This program is free software: you can redistribute it and/or modify it + under the terms of the GNU AFERO General Public License as published by the + Free Software Foundation, either version 3 of the License, or (at your + option) any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + more details. + + You should have received a copy of the GNU General Public License along with + this program. If not, see [https://www.gnu.org/licenses/]. + + If you have Internet connection, the latest version of the AGPL should be + available at these locations: + [https://www.fsf.org/licensing/licenses/agpl.html] + [https://www.gnu.org/licenses/agpl.html] + + - Spine (by Doc Reform, related to SiSU) uses standard: + - docReform markup syntax + - standard SiSU markup syntax with modified headers and minor modifications + - docReform object numbering + - standard SiSU object citation numbering & system + + - Homepages: + [https://www.sisudoc.org] + [https://www.doc-reform.org] + + - Git + [https://git.sisudoc.org/] + ++/ +/++ + sisudoc.ocda - canonical entry point of the document-abstraction + library. + + Pipeline position: markup -> abstraction -> output. This package is + the abstraction stage; the output stage lives in + sisudoc.outputs.io_out and consumes the values produced here. + + This file re-exports sisudoc.ocda.abstraction (the documented public + API surface) so that consumers can write + import sisudoc.ocda; + and reach the entry points (spineAbstraction!(), docAbstraction!(), + spineAbstractionTxt) without depending on spine's directory layout. + + No logic lives here. ++/ +module sisudoc.ocda; +@safe: +public import sisudoc.ocda.abstraction; |
