Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

re-enable ObservableStores and GcUnsafe2 warnings #177

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions nim.cfg
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
# nim-web3
# Copyright (c) 2019-2023 Status Research & Development GmbH
# Copyright (c) 2019-2024 Status Research & Development GmbH
# Licensed under either of
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
# * MIT license ([LICENSE-MIT](LICENSE-MIT))
# at your option.
# This file may not be copied, modified, or distributed except according to
# those terms.

# nim.cfg
@if nimHasWarningObservableStores:
warning[ObservableStores]: off
@end

# Avoid some rare stack corruption while using exceptions with a SEH-enabled
# toolchain: https://github.com/status-im/nimbus-eth2/issues/3121
@if windows and not vcc:
Expand Down
7 changes: 3 additions & 4 deletions tests/test_contract_dsl.nim
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ import
type
DummySender = object

proc createMutableContractInvocation(s: DummySender, t: typedesc, data: seq[byte]): seq[byte] = data
proc createImmutableContractInvocation(s: DummySender, t: typedesc, data: seq[byte]): seq[byte] = data
proc createContractDeployment(s: DummySender, t: typedesc, data: seq[byte]): seq[byte] = data
func createMutableContractInvocation(s: DummySender, t: typedesc, data: seq[byte]): seq[byte] = data
func createContractDeployment(s: DummySender, t: typedesc, data: seq[byte]): seq[byte] = data

proc instantiateContract(t: typedesc): ContractInstance[t, DummySender] =
func instantiateContract(t: typedesc): ContractInstance[t, DummySender] =
discard

proc checkData(a: seq[byte], expectedData: string) =
Expand Down
2 changes: 1 addition & 1 deletion tests/test_logs.nim
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# those terms.

import
std/[json, random],
std/random,
pkg/unittest2,
../web3,
chronos, stint,
Expand Down
3 changes: 1 addition & 2 deletions web3.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ proc test(args, path: string) =

exec "nim " & getEnv("TEST_LANG", "c") & " " & getEnv("NIMFLAGS") & " " & args &
" --outdir:build -r --skipParentCfg" &
" --warning[ObservableStores]:off --warning[GcUnsafe2]:off" &
" --styleCheck:usages --styleCheck:error" &
" --hint[XDeclaredButNotUsed]:off --hint[Processing]:off " &
" --hint[Processing]:off " &
path


Expand Down
4 changes: 2 additions & 2 deletions web3/confutils_defs.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# nim-web3
# Copyright (c) 2023 Status Research & Development GmbH
# Copyright (c) 2023-2024 Status Research & Development GmbH
# Licensed under either of
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
# * MIT license ([LICENSE-MIT](LICENSE-MIT))
Expand All @@ -16,7 +16,7 @@ export primitives

func parseCmdArg*(T: type Address, input: string): T
{.raises: [ValueError].} =
fromHex(T, string input)
fromHex(T, input)

func completeCmdArg*(T: type Address, input: string): seq[string] =
@[]
Expand Down