Don't lock versions into compiled constants, underpinning shared lib could be

updated and we'd never know.

FossilOrigin-Name: bb2f3334eee618c651acc8cd9859554f97ac29589145b17ac5d41b0f8bbada70
This commit is contained in:
mahlon 2025-03-31 23:15:45 +00:00
parent b40af50154
commit 5847c8dbf0
5 changed files with 9 additions and 11 deletions

View file

@ -31,14 +31,14 @@ include
proc kuzuVersionCompatible*(): bool =
## Returns true if the system installed Kuzu library
## is the expected version of this library wrapper.
result = KUZU_EXPECTED_LIBVERSION == KUZU_LIBVERSION
result = KUZU_EXPECTED_LIBVERSION == $kuzuGetVersion()
when isMainModule:
echo "Nim-Kuzu version: ", KUZU_VERSION,
". Expected library version: ", KUZU_EXPECTED_LIBVERSION, "."
echo "Installed Kuzu library version ", KUZU_LIBVERSION,
" (storage version ", KUZU_STORAGE_VERSION, ")"
echo "Installed Kuzu library version ", kuzuGetVersion(),
" (storage version ", kuzuGetStorageVersion(), ")"
if kuzuVersionCompatible():
echo "Versions match!"
else: