From 58b75981558a6d73182cf322f93b1998b76c3c1d Mon Sep 17 00:00:00 2001 From: dimgigov Date: Sat, 16 May 2026 03:20:43 +0300 Subject: [PATCH] fix(dev): streamline build config for new contributors - Add --path:src and --threads:on to nim.cfg so tests compile without manual flags - Add tests/config.nims for automatic path resolution in test directory - Simplify nimble task definitions (remove redundant flags now in nim.cfg) - Fix Dockerfile.source comment: remove obsolete nimmax reference This makes 'nim c tests/test_all.nim' and 'nimble test' work out of the box. --- Dockerfile.source | 6 +++--- baradadb.nimble | 8 ++++---- nim.cfg | 2 ++ tests/config.nims | 1 + 4 files changed, 10 insertions(+), 7 deletions(-) create mode 100644 tests/config.nims diff --git a/Dockerfile.source b/Dockerfile.source index 96603a1..f2251fe 100644 --- a/Dockerfile.source +++ b/Dockerfile.source @@ -4,9 +4,9 @@ # └─────────────────────────────────────────────────────────┘ # # Този Dockerfile build-ва BaraDB от source код. -# ВНИМАНИЕ: Изисква локални nimble пакети (hunos, nimmax), които -# не са в публичния nimble repository. Преди build трябва да: -# 1. symlink-нете или копирате hunos/ и nimmax/ в проекта, или +# ВНИМАНИЕ: Изисква локален nimble пакет (hunos), който +# не е в публичния nimble repository. Преди build трябва да: +# 1. symlink-нете или копирате hunos/ в проекта, или # 2. копирате ~/.nimble/pkgs2 в builder стейджа. # # Build: diff --git a/baradadb.nimble b/baradadb.nimble index c1f5dd5..bd0622d 100644 --- a/baradadb.nimble +++ b/baradadb.nimble @@ -15,13 +15,13 @@ requires "checksums >= 0.2.0" # Tasks task build_debug, "Build debug version": - exec "nim c -d:ssl --threads:on --debugger:native --linedir:on -o:build/baradadb src/baradadb.nim" + exec "nim c --debugger:native --linedir:on -o:build/baradadb src/baradadb.nim" task build_release, "Build release version": - exec "nim c -d:ssl --threads:on -d:release --opt:speed -o:build/baradadb src/baradadb.nim" + exec "nim c -d:release --opt:speed -o:build/baradadb src/baradadb.nim" task test, "Run all tests": - exec "nim c --path:src -d:ssl --threads:on -r tests/test_all.nim" + exec "nim c -r tests/test_all.nim" task bench, "Run benchmarks": - exec "nim c --path:src -d:ssl --threads:on -d:release -r benchmarks/bench_all.nim" + exec "nim c -d:release -r benchmarks/bench_all.nim" diff --git a/nim.cfg b/nim.cfg index 521e21d..7a9fb50 100644 --- a/nim.cfg +++ b/nim.cfg @@ -1 +1,3 @@ -d:ssl +--threads:on +--path:"src" diff --git a/tests/config.nims b/tests/config.nims new file mode 100644 index 0000000..a119208 --- /dev/null +++ b/tests/config.nims @@ -0,0 +1 @@ +--path:"../src"