mirror of
https://github.com/logos-messaging/logos-messaging-nim.git
synced 2026-01-07 16:33:08 +00:00
remove confutils dependency on the library
This commit is contained in:
parent
4b0ad9126d
commit
0438e71abd
@ -14,7 +14,7 @@ import
|
|||||||
libp2p/wire
|
libp2p/wire
|
||||||
|
|
||||||
import
|
import
|
||||||
../wakunode2/cli_args,
|
../../tools/confutils/cli_args,
|
||||||
waku/[
|
waku/[
|
||||||
node/peer_manager,
|
node/peer_manager,
|
||||||
waku_lightpush/common,
|
waku_lightpush/common,
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import
|
|||||||
confutils
|
confutils
|
||||||
|
|
||||||
import
|
import
|
||||||
../wakunode2/cli_args,
|
../../tools/confutils/cli_args,
|
||||||
waku/[
|
waku/[
|
||||||
common/enr,
|
common/enr,
|
||||||
common/logging,
|
common/logging,
|
||||||
|
|||||||
@ -12,14 +12,9 @@ import
|
|||||||
secp256k1
|
secp256k1
|
||||||
|
|
||||||
import
|
import
|
||||||
../wakunode2/cli_args,
|
../../tools/confutils/
|
||||||
waku/[
|
[cli_args, envvar as confEnvvarDefs, envvar_net as confEnvvarNet],
|
||||||
common/confutils/envvar/defs as confEnvvarDefs,
|
waku/[common/logging, waku_core, waku_core/topics/pubsub_topic]
|
||||||
common/confutils/envvar/std/net as confEnvvarNet,
|
|
||||||
common/logging,
|
|
||||||
waku_core,
|
|
||||||
waku_core/topics/pubsub_topic,
|
|
||||||
]
|
|
||||||
|
|
||||||
export confTomlDefs, confTomlNet, confEnvvarDefs, confEnvvarNet
|
export confTomlDefs, confTomlNet, confEnvvarDefs, confEnvvarNet
|
||||||
|
|
||||||
|
|||||||
@ -9,9 +9,11 @@ import
|
|||||||
system/ansi_c,
|
system/ansi_c,
|
||||||
libp2p/crypto/crypto
|
libp2p/crypto/crypto
|
||||||
import
|
import
|
||||||
./cli_args,
|
../../tools/[
|
||||||
../../tools/rln_keystore_generator/rln_keystore_generator,
|
rln_keystore_generator/rln_keystore_generator,
|
||||||
../../tools/rln_db_inspector/rln_db_inspector,
|
rln_db_inspector/rln_db_inspector,
|
||||||
|
confutils/cli_args,
|
||||||
|
],
|
||||||
waku/[
|
waku/[
|
||||||
common/logging,
|
common/logging,
|
||||||
factory/waku,
|
factory/waku,
|
||||||
|
|||||||
@ -101,3 +101,6 @@ import ./factory/test_all
|
|||||||
|
|
||||||
# Waku API tests
|
# Waku API tests
|
||||||
import ./api/test_all
|
import ./api/test_all
|
||||||
|
|
||||||
|
# Waku tools tests
|
||||||
|
import ./tools/test_all
|
||||||
|
|||||||
@ -2,9 +2,7 @@
|
|||||||
|
|
||||||
import
|
import
|
||||||
./test_base64_codec,
|
./test_base64_codec,
|
||||||
./test_confutils_envvar,
|
|
||||||
./test_enr_builder,
|
./test_enr_builder,
|
||||||
./test_envvar_serialization,
|
|
||||||
./test_protobuf_validation,
|
./test_protobuf_validation,
|
||||||
./test_sqlite_migrations,
|
./test_sqlite_migrations,
|
||||||
./test_parse_size,
|
./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,
|
||||||
confutils/defs,
|
confutils/defs,
|
||||||
confutils/std/net
|
confutils/std/net
|
||||||
import
|
import ../../tools/confutils/[envvar as confEnvvarDefs, envvar_net as confEnvvarNet]
|
||||||
waku/common/confutils/envvar/defs as confEnvvarDefs,
|
|
||||||
waku/common/confutils/envvar/std/net as confEnvvarNet
|
|
||||||
|
|
||||||
type ConfResult[T] = Result[T, string]
|
type ConfResult[T] = Result[T, string]
|
||||||
|
|
||||||
@ -1,7 +1,7 @@
|
|||||||
{.used.}
|
{.used.}
|
||||||
|
|
||||||
import testutils/unittests
|
import testutils/unittests
|
||||||
import waku/common/envvar_serialization/utils
|
import ../../tools/confutils/envvar_serialization/utils
|
||||||
|
|
||||||
suite "nim-envvar-serialization - utils":
|
suite "nim-envvar-serialization - utils":
|
||||||
test "construct env var key":
|
test "construct env var key":
|
||||||
@ -20,11 +20,7 @@ import
|
|||||||
|
|
||||||
import
|
import
|
||||||
waku/factory/[waku_conf, conf_builder/conf_builder, networks_config],
|
waku/factory/[waku_conf, conf_builder/conf_builder, networks_config],
|
||||||
waku/common/[
|
waku/common/[logging],
|
||||||
confutils/envvar/defs as confEnvvarDefs,
|
|
||||||
confutils/envvar/std/net as confEnvvarNet,
|
|
||||||
logging,
|
|
||||||
],
|
|
||||||
waku/[
|
waku/[
|
||||||
waku_enr,
|
waku_enr,
|
||||||
node/peer_manager,
|
node/peer_manager,
|
||||||
@ -34,6 +30,8 @@ import
|
|||||||
../../tools/
|
../../tools/
|
||||||
[rln_keystore_generator/rln_keystore_generator, rln_db_inspector/rln_db_inspector]
|
[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
|
export confTomlDefs, confTomlNet, confEnvvarDefs, confEnvvarNet, ProtectedShard
|
||||||
|
|
||||||
logScope:
|
logScope:
|
||||||
@ -1,7 +1,7 @@
|
|||||||
{.push raises: [].}
|
{.push raises: [].}
|
||||||
|
|
||||||
import confutils/defs as confutilsDefs
|
import confutils/defs as confutilsDefs
|
||||||
import ../../envvar_serialization
|
import ./envvar_serialization
|
||||||
|
|
||||||
export envvar_serialization, confutilsDefs
|
export envvar_serialization, confutilsDefs
|
||||||
|
|
||||||
@ -1,7 +1,7 @@
|
|||||||
{.push raises: [].}
|
{.push raises: [].}
|
||||||
|
|
||||||
import std/[strutils, net]
|
import std/[strutils, net]
|
||||||
import ../../../envvar_serialization
|
import ./envvar_serialization
|
||||||
|
|
||||||
export net, envvar_serialization
|
export net, envvar_serialization
|
||||||
|
|
||||||
13
waku.nimble
13
waku.nimble
@ -13,7 +13,6 @@ license = "MIT or Apache License 2.0"
|
|||||||
### Dependencies
|
### Dependencies
|
||||||
requires "nim >= 2.2.4",
|
requires "nim >= 2.2.4",
|
||||||
"chronicles",
|
"chronicles",
|
||||||
"confutils#e214b39",
|
|
||||||
"chronos",
|
"chronos",
|
||||||
"dnsdisc",
|
"dnsdisc",
|
||||||
"eth",
|
"eth",
|
||||||
@ -228,15 +227,3 @@ task libWakuAndroid, "Build the mobile bindings for Android":
|
|||||||
let srcDir = "./library"
|
let srcDir = "./library"
|
||||||
let extraParams = "-d:chronicles_log_level=ERROR"
|
let extraParams = "-d:chronicles_log_level=ERROR"
|
||||||
buildMobileAndroid srcDir, extraParams
|
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