From 6ce2e8efb3a81b724840c06d62d5c8379992f7f0 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Mon, 25 May 2026 11:33:14 -0400 Subject: ocda public surface + dub.json import-path and dyaml cleanups 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 /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) --- dub.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'dub.json') diff --git a/dub.json b/dub.json index 429327c..7ae3419 100644 --- a/dub.json +++ b/dub.json @@ -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/**" ] } ], -- cgit v1.2.3