Skip to content

Commit

Permalink
add {.push: raises: [].} annotation (#158)
Browse files Browse the repository at this point in the history
In Nim 2.0, `bls_batch_verifier` seems to need `{.push: raises: [].}`.

```
/home/runner/work/nimbus-eth2/nimbus-eth2/nimcache/release/resttest/@m..@svendor@snim-bearssl@sbearssl@scsources@ssrc@[email protected] /home/runner/work/nimbus-eth2/nimbus-eth2/vendor/nim-bearssl/bearssl/abi/../csources/src/codec/enc16be.c
/home/runner/work/nimbus-eth2/nimbus-eth2/vendor/nim-blscurve/blscurve/bls_batch_verifier.nim(246, 22) template/generic instantiation of `spawn` from here
/home/runner/work/nimbus-eth2/nimbus-eth2/vendor/nim-taskpools/taskpools/taskpools.nim(503, 70) template/generic instantiation of `toTask` from here
/home/runner/work/nimbus-eth2/nimbus-eth2/vendor/nim-taskpools/taskpools/tasks.nim(216, 65) template/generic instantiation from here
/home/runner/work/nimbus-eth2/nimbus-eth2/vendor/nim-taskpools/taskpools/tasks.nim(119, 20) Error: taskpool_reducePartialPairings(tp_4664066530, contexts_4664066532, start_4664066534,
                               stopEx_4664066536, fut_4664066538) can raise an unlisted exception: Exception
```
  • Loading branch information
etan-status authored Aug 8, 2023
1 parent 787aad2 commit 337ab72
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion blscurve.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ installFiles = @["blscurve.nim"]
requires "nim >= 1.6.0",
"nimcrypto",
"stew",
"taskpools"
"taskpools >= 0.0.5"

let nimc = getEnv("NIMC", "nim") # Which nim compiler to use
let lang = getEnv("NIMLANG", "c") # Which backend (c/cpp/js)
Expand Down
2 changes: 2 additions & 0 deletions blscurve/bls_batch_verifier.nim
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import
when compileOption("threads"):
import taskpools, ./parallel_chunks

{.push raises: [].}

# BLS Batch Verifier
# ----------------------------------------------------------------------
# Nim supports for view types and openArray in object fields is experimental
Expand Down

0 comments on commit 337ab72

Please sign in to comment.