dub.sdlsdl · 36 linesall
name "versions"
description "Design-by-Introspection versioning library (SemVer, DMD, CalVer, ...)"
authors "Petar Kirov"
copyright "Copyright © 2026, Petar Kirov"
license "BSL-1.0"

targetPath "build"

importPaths "src"

dflags "-preview=in" "-preview=dip1000"

dependency "expected" version="~>0.4.1"

configuration "library" {
    targetType "library"
    dependency "sparkles:base" path="../.."
}

configuration "unittest" {
    // Fast path: depend on the runner shim (pulls the prebuilt impl library),
    // so `dub test` recompiles only this package, not the runner sources.
    dependency "sparkles:test-runner" path="../.."
    dependency "sparkles:base" path="../.."

    dflags "-checkaction=context" "-allinst"
    dflags "-defaultlib=libphobos2.so" "-L-fuse-ld=gold" platform="linux-dmd"
    dflags "--link-defaultlib-shared" "--linker=gold" platform="linux-ldc"
    lflags "--export-dynamic" platform="linux-ldc"
}
// Optimised, assertions live, `debug {}` blocks out — the build every nix
// artifact uses. Neither `debug` (which compiles those blocks in) nor
// `release` (which deletes assert *expressions*, side effects included).
buildType "checked" {
    buildOptions "optimize" "inline" "debugInfo"
}