mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-08 00:43:06 +00:00
remove confutils dependency on the library
This commit is contained in:
parent
4b0ad9126d
commit
0438e71abd
@ -14,7 +14,7 @@ import
|
||||
libp2p/wire
|
||||
|
||||
import
|
||||
../wakunode2/cli_args,
|
||||
../../tools/confutils/cli_args,
|
||||
waku/[
|
||||
node/peer_manager,
|
||||
waku_lightpush/common,
|
||||
|
||||
@ -11,7 +11,7 @@ import
|
||||
confutils
|
||||
|
||||
import
|
||||
../wakunode2/cli_args,
|
||||
../../tools/confutils/cli_args,
|
||||
waku/[
|
||||
common/enr,
|
||||
common/logging,
|
||||
|
||||
@ -12,14 +12,9 @@ import
|
||||
secp256k1
|
||||
|
||||
import
|
||||
../wakunode2/cli_args,
|
||||
waku/[
|
||||
common/confutils/envvar/defs as confEnvvarDefs,
|
||||
common/confutils/envvar/std/net as confEnvvarNet,
|
||||
common/logging,
|
||||
waku_core,
|
||||
waku_core/topics/pubsub_topic,
|
||||
]
|
||||
../../tools/confutils/
|
||||
[cli_args, envvar as confEnvvarDefs, envvar_net as confEnvvarNet],
|
||||
waku/[common/logging, waku_core, waku_core/topics/pubsub_topic]
|
||||
|
||||
export confTomlDefs, confTomlNet, confEnvvarDefs, confEnvvarNet
|
||||
|
||||
|
||||
@ -9,9 +9,11 @@ import
|
||||
system/ansi_c,
|
||||
libp2p/crypto/crypto
|
||||
import
|
||||
./cli_args,
|
||||
../../tools/rln_keystore_generator/rln_keystore_generator,
|
||||
../../tools/rln_db_inspector/rln_db_inspector,
|
||||
../../tools/[
|
||||
rln_keystore_generator/rln_keystore_generator,
|
||||
rln_db_inspector/rln_db_inspector,
|
||||
confutils/cli_args,
|
||||
],
|
||||
waku/[
|
||||
common/logging,
|
||||
factory/waku,
|
||||
|
||||
@ -101,3 +101,6 @@ import ./factory/test_all
|
||||
|
||||
# Waku API tests
|
||||
import ./api/test_all
|
||||
|
||||
# Waku tools tests
|
||||
import ./tools/test_all
|
||||
|
||||
@ -2,9 +2,7 @@
|
||||
|
||||
import
|
||||
./test_base64_codec,
|
||||
./test_confutils_envvar,
|
||||
./test_enr_builder,
|
||||
./test_envvar_serialization,
|
||||
./test_protobuf_validation,
|
||||
./test_sqlite_migrations,
|
||||
./test_parse_size,
|
||||
|
||||
3
tests/tools/test_all.nim
Normal file
3
tests/tools/test_all.nim
Normal file
@ -0,0 +1,3 @@
|
||||
{.used.}
|
||||
|
||||
import ./test_confutils_envvar, ./test_confutils_envvar_serialization.nim
|
||||
@ -7,9 +7,7 @@ import
|
||||
confutils,
|
||||
confutils/defs,
|
||||
confutils/std/net
|
||||
import
|
||||
waku/common/confutils/envvar/defs as confEnvvarDefs,
|
||||
waku/common/confutils/envvar/std/net as confEnvvarNet
|
||||
import ../../tools/confutils/[envvar as confEnvvarDefs, envvar_net as confEnvvarNet]
|
||||
|
||||
type ConfResult[T] = Result[T, string]
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{.used.}
|
||||
|
||||
import testutils/unittests
|
||||
import waku/common/envvar_serialization/utils
|
||||
import ../../tools/confutils/envvar_serialization/utils
|
||||
|
||||
suite "nim-envvar-serialization - utils":
|
||||
test "construct env var key":
|
||||
@ -20,11 +20,7 @@ import
|
||||
|
||||
import
|
||||
waku/factory/[waku_conf, conf_builder/conf_builder, networks_config],
|
||||
waku/common/[
|
||||
confutils/envvar/defs as confEnvvarDefs,
|
||||
confutils/envvar/std/net as confEnvvarNet,
|
||||
logging,
|
||||
],
|
||||
waku/common/[logging],
|
||||
waku/[
|
||||
waku_enr,
|
||||
node/peer_manager,
|
||||
@ -34,6 +30,8 @@ import
|
||||
../../tools/
|
||||
[rln_keystore_generator/rln_keystore_generator, rln_db_inspector/rln_db_inspector]
|
||||
|
||||
import ./envvar as confEnvvarDefs, ./envvar_net as confEnvvarNet
|
||||
|
||||
export confTomlDefs, confTomlNet, confEnvvarDefs, confEnvvarNet, ProtectedShard
|
||||
|
||||
logScope:
|
||||
@ -1,7 +1,7 @@
|
||||
{.push raises: [].}
|
||||
|
||||
import confutils/defs as confutilsDefs
|
||||
import ../../envvar_serialization
|
||||
import ./envvar_serialization
|
||||
|
||||
export envvar_serialization, confutilsDefs
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
{.push raises: [].}
|
||||
|
||||
import std/[strutils, net]
|
||||
import ../../../envvar_serialization
|
||||
import ./envvar_serialization
|
||||
|
||||
export net, envvar_serialization
|
||||
|
||||
13
waku.nimble
13
waku.nimble
@ -13,7 +13,6 @@ license = "MIT or Apache License 2.0"
|
||||
### Dependencies
|
||||
requires "nim >= 2.2.4",
|
||||
"chronicles",
|
||||
"confutils#e214b39",
|
||||
"chronos",
|
||||
"dnsdisc",
|
||||
"eth",
|
||||
@ -228,15 +227,3 @@ task libWakuAndroid, "Build the mobile bindings for Android":
|
||||
let srcDir = "./library"
|
||||
let extraParams = "-d:chronicles_log_level=ERROR"
|
||||
buildMobileAndroid srcDir, extraParams
|
||||
|
||||
import std/[os, strutils] #XXX from os import parentDir, getEnv, dirExists fails
|
||||
proc getNimbleDir: string =
|
||||
result = getEnv("NIMBLE_DIR", getEnv("nimbleDir", ""))
|
||||
if result.len > 0: return
|
||||
if (let (installDir, ex) = gorgeEx("nimble path procs"); ex == 0):
|
||||
result = installDir.strip.parentDir.parentDir # Hopefully .ini nimbleDir
|
||||
|
||||
task showPaths, "Show various paths":
|
||||
echo "Nimble directory: ", getNimbleDir()
|
||||
echo "Current directory: ", getCurrentDir()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user