diff --git a/.gitmodules b/.gitmodules index 11e22e286a..4d13bc0f27 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,9 +4,6 @@ [submodule "vendor/nimbus-build-system"] path = vendor/nimbus-build-system url = https://github.com/status-im/nimbus-build-system.git -[submodule "vendor/nim-nat-traversal"] - path = vendor/nim-nat-traversal - url = https://github.com/status-im/nim-nat-traversal.git [submodule "vendor/nim-stew"] path = vendor/nim-stew url = https://github.com/status-im/nim-stew.git diff --git a/config.nims b/config.nims index bb481bceb7..21155f611b 100644 --- a/config.nims +++ b/config.nims @@ -33,3 +33,11 @@ else: switch("passL", "-Wl,-as-needed") --define:chronicles_line_numbers # useful when debugging + +# The compiler doth protest too much, methinks, about all these cases where it can't +# do its (N)RVO pass: https://github.com/nim-lang/RFCs/issues/230 +switch("warning", "ObservableStores:off") + +# Too many false positives for "Warning: method has lock level , but another method has 0 [LockLevel]" +switch("warning", "LockLevel:off") + diff --git a/src/app/chat/views/chat_members.nim b/src/app/chat/views/chat_members.nim index 4499625d41..e7d52d2758 100644 --- a/src/app/chat/views/chat_members.nim +++ b/src/app/chat/views/chat_members.nim @@ -1,8 +1,5 @@ -import NimQml, Tables -import ../../../status/chat/[chat, message] -import ../../../status/chat as status_chat -import ../../../status/status -import ../../../status/ens +import NimQml, Tables, + ../../../status/[chat/chat, status, ens] type ChatMemberRoles {.pure.} = enum @@ -20,7 +17,7 @@ QtObject: proc setup(self: ChatMembersView) = self.QAbstractListModel.setup - proc delete(self: ChatMembersView) = + proc delete(self: ChatMembersView) = self.members = @[] self.QAbstractListModel.delete diff --git a/src/app/profile/views/contact_list.nim b/src/app/profile/views/contact_list.nim index afadbef13e..914767c153 100644 --- a/src/app/profile/views/contact_list.nim +++ b/src/app/profile/views/contact_list.nim @@ -1,6 +1,5 @@ import NimQml import Tables -import strformat import ../../../status/profile/profile from ../../../status/ens import nil @@ -18,14 +17,14 @@ QtObject: proc setup(self: ContactList) = self.QAbstractListModel.setup - proc delete(self: ContactList) = + proc delete(self: ContactList) = self.contacts = @[] self.QAbstractListModel.delete proc newContactList*(): ContactList = new(result, delete) # TODO: (rramos) contacts should be a table[string, Profile] instead, with the key being the public key - # This is to optimize determining if a contact is part of the contact list or not + # This is to optimize determining if a contact is part of the contact list or not # (including those that do not have a system tag) result.contacts = @[] result.setup diff --git a/src/app/profile/views/mailservers_list.nim b/src/app/profile/views/mailservers_list.nim index b094b7a72a..4b9094f992 100644 --- a/src/app/profile/views/mailservers_list.nim +++ b/src/app/profile/views/mailservers_list.nim @@ -1,6 +1,6 @@ import NimQml import Tables -import ../../../status/profile/[profile, mailserver] +import ../../../status/profile/mailserver type MailServerRoles {.pure.} = enum @@ -13,7 +13,7 @@ QtObject: proc setup(self: MailServersList) = self.QAbstractListModel.setup - proc delete(self: MailServersList) = + proc delete(self: MailServersList) = self.mailservers = @[] self.QAbstractListModel.delete diff --git a/src/status/libstatus/contracts.nim b/src/status/libstatus/contracts.nim index db97026a06..273754e716 100644 --- a/src/status/libstatus/contracts.nim +++ b/src/status/libstatus/contracts.nim @@ -1,5 +1,4 @@ -import sequtils, strformat, sugar, chronicles, typeinfo, macros, tables -import ./utils as status_utils +import sequtils, strformat, sugar, macros, tables import eth/common/eth_types, stew/byteutils, nimcrypto from eth/common/utils import parseAddress @@ -12,7 +11,7 @@ type Method = object name: string signature: string noPadding: bool - + type Contract* = ref object name*: string network*: Network diff --git a/src/status/libstatus/types.nim b/src/status/libstatus/types.nim index 1ae252f99d..cfdbac632e 100644 --- a/src/status/libstatus/types.nim +++ b/src/status/libstatus/types.nim @@ -74,7 +74,7 @@ type AccountArgs* = ref object of Args account*: Account type - StatusGoException* = object of Exception + StatusGoException* = object of CatchableError type Transaction* = ref object diff --git a/vendor/nim-nat-traversal b/vendor/nim-nat-traversal deleted file mode 160000 index 2403c33929..0000000000 --- a/vendor/nim-nat-traversal +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2403c33929c74f2d150f50dc8bc3a598af70661a diff --git a/vendor/nimbus-build-system b/vendor/nimbus-build-system index ae49e03af6..767c8e0fb4 160000 --- a/vendor/nimbus-build-system +++ b/vendor/nimbus-build-system @@ -1 +1 @@ -Subproject commit ae49e03af6f36393eb7e0fc02c1c47df42efd2de +Subproject commit 767c8e0fb433da5276c4ac3e61b3360e003536a7