chore: remove all pre-nim-1.6 deadcode from codebase (#2857)

This commit is contained in:
Darshan K 2024-06-28 16:04:57 +05:30 committed by GitHub
parent 092add1ca2
commit 9bd8c33aee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
171 changed files with 171 additions and 684 deletions

View File

@ -4,10 +4,7 @@
when not (compileOption("threads")):
{.fatal: "Please, compile this program with the --threads:on option!".}
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import std/[strformat, strutils, times, options, random]
import

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/[tables, times, strutils, hashes, sequtils],

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/[options, strutils, os, sequtils, net],

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/[sets, tables, strutils, sequtils, options, strformat],

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
chronicles,

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/[tables, strutils, times, sequtils, random],

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/[json, tables, sequtils],

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/json,

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/[options, strutils, sequtils, net],

View File

@ -1,8 +1,5 @@
## Nim wrappers for the functions defined in librln
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import stew/results

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
../../waku/common/logging, ../../waku/factory/[waku, networks_config, external_config]

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
stew/results,

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
stew/results, chronicles, ./node_spec as Waku, ./stealth_commitment_protocol as SCP

View File

@ -1,9 +1,6 @@
{.used.}
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/[options, os, osproc, sequtils, deques, streams, strutils, tempfiles, strformat],

View File

@ -1,9 +1,6 @@
{.used.}
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
testutils/unittests,

View File

@ -1,9 +1,6 @@
{.used.}
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
./rln/waku_rln_relay_utils,

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import stew/[results, byteutils, base64]

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import confutils/defs as confutilsDefs
import ../../envvar_serialization

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import std/[strutils, net]
import ../../../envvar_serialization

View File

@ -1,9 +1,6 @@
# Simple async pool driver for postgress.
# Inspired by: https://github.com/treeform/pg/
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import std/[sequtils, nre, strformat, sets], stew/results, chronos
import ./dbconn, ../common

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/[options, net],

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/options, stew/results, eth/keys as eth_keys, libp2p/crypto/crypto as libp2p_crypto

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import stew/shims/macros, serialization
import ./envvar_serialization/reader, ./envvar_serialization/writer

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/[tables, typetraits, options, os],

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import std/[os, strutils], stew/byteutils, stew/ptrops

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
type
HexDataStr* = distinct string

View File

@ -8,10 +8,7 @@ import
export chronicles.LogLevel
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
type LogFormat* = enum
TEXT

View File

@ -1,8 +1,5 @@
## An extension wrapper around nim-chronos
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import chronos, chronicles

View File

@ -1,9 +1,6 @@
# Extensions for libp2p's protobuf library implementation
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import std/options, libp2p/protobuf/minprotobuf, libp2p/varint

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import std/options, chronos/timer, libp2p/stream/connection

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import chronos

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import std/[httpclient, json, uri, options], stew/results

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import std/[options, strutils, net]
import chronicles, eth/net/nat, stew/results, nativesockets

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
proc flatten*[T](a: seq[seq[T]]): seq[T] =
var aFlat = newSeq[T](0)

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import metrics

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/[sequtils, strutils, options, sets, net, json],

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
## A set of utilities to integrate EIP-1459 DNS-based discovery
## for Waku v2 nodes.

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/[options, net],

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
type ClusterConf* = object
maxMessageSize*: string

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
chronicles,

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/[options, sequtils],

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/[options, sequtils, strutils, net],

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import std/[options], chronos

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/[options, sets, sequtils, times, strutils, math, random],

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import std/[tables, strutils, os], stew/results, chronicles
import ../../../common/databases/db_sqlite, ../../../common/databases/common

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import stew/results
import ../../../waku_core, ../waku_peer_store

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/[sets, options],

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/[tables, sequtils, sets, options, strutils],

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import chronicles, chronos, metrics, metrics/chronos_httpserver
import

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/[hashes, options, sugar, tables, strutils, sequtils, os, net],

View File

@ -1,8 +1,5 @@
# Waku Switch utils.
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/options,

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import metrics

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import stew/results
import ../waku_core, ../waku_noise/noise_types, ../waku_noise/noise_utils

View File

@ -1,9 +1,6 @@
# Request utils.
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import bearssl/rand, stew/byteutils

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import chronos, std/[options, sequtils], stew/results
import ../discovery/waku_discv5, ../waku_relay, ../waku_core, ./message_cache

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/[sequtils, sugar, algorithm, options],

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
chronicles,

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/[strformat, sequtils, tables],

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
chronicles,

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import net, tables
import presto

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import presto/client

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
chronicles, json_serialization, json_serialization/std/options, presto/[route, client]

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import chronicles, json_serialization, presto/route
import ../../../waku_node, ../responses, ../serdes, ./types

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import chronicles, json_serialization, json_serialization/std/options
import ../../../waku_node, ../serdes

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
json,

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/strformat,

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/[sets, strformat],

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
chronicles, json_serialization, json_serialization/std/options, presto/[route, client]

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import chronicles, json_serialization, presto/route
import ../../../waku_node, ../responses, ../serdes, ./types

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import chronicles, json_serialization, json_serialization/std/options
import ../../../waku_node, ../serdes

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
chronicles, json_serialization, json_serialization/std/options, presto/[route, client]

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import std/strformat, stew/results, chronicles, uri, json_serialization, presto/route
import

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/[sets, strformat, uri],

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
json,

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/strformat,

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/[sets, strformat],

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/[options, strutils, re, net],

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/sets,

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/sequtils,

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/[sets, strformat, times],

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import std/typetraits, stew/results, chronicles, presto/common
import ./serdes

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/typetraits,

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/typetraits,

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import std/net
import

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
chronicles, json_serialization, json_serialization/std/options, presto/[route, client]

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import std/strformat, stew/results, chronicles, uri, json_serialization, presto/route
import

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/[sets, strformat, uri, options, sequtils],

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/[times, options, sequtils, strutils, algorithm],

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import metrics

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import std/options, stew/results, stew/byteutils, stew/arrayops, nimcrypto/sha2
import ../waku_core, ../common/paging

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import std/options, stew/results, chronos
import ../waku_core, ./common

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import stew/results, chronicles, chronos
import

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
./postgres_driver/postgres_driver,

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import
std/[nre, options, sequtils, strutils, strformat, times],

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import chronos, stew/results
import ../../../common/databases/db_postgres, ../../../common/error_handling

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import ./queue_driver/queue_driver, ./queue_driver/index

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import stew/byteutils, nimcrypto/sha2
import ../../../waku_core, ../../common

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import std/options, stew/results, stew/sorted_set, chronicles, chronos
import ../../../waku_core, ../../common, ../../driver, ./index

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import ./sqlite_driver/sqlite_driver

View File

@ -1,7 +1,4 @@
when (NimMajor, NimMinor) < (1, 4):
{.push raises: [Defect].}
else:
{.push raises: [].}
{.push raises: [].}
import ../../../waku_core, ../../common

Some files were not shown because too many files have changed in this diff Show More