Skip to content

Commit

Permalink
nim >= 1.6.18 -d:chronosStrictException has been deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
bung87 committed Apr 12, 2024
1 parent 31d2205 commit 9e0917e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 19 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- macOS-latest

nim-version:
- '1.6.16'
- '1.6.18'
- stable
- devel

Expand Down Expand Up @@ -53,7 +53,5 @@ jobs:
- name: Install Packages
run: nimble install -y

# - name: server -d:chronosStrictException check
# run: nim c -d:chronosStrictException src/scorper/http/streamserver.nim
- name: Test
run: nimble -y --silent test
12 changes: 0 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,18 +187,6 @@ transformed, in order to catch any exceptions and transfer them to the `Future`.
> Effectively, this means that while code can be compiled with
`{.push raises: [Defect]}`, the intended effect propagation and checking is
**disabled** for `async` functions.
>
> To enable checking exception effects in `async` code, enable strict mode with
**`-d:chronosStrictException`**.
>
> In the strict mode, `async` functions are checked such that they only raise
`CatchableError` and thus must make sure to explicitly specify exception
effects on forward declarations, callbacks and methods using
`{.raises: [CatchableError].}` (or more strict) annotations.

See `chronos` [#Error handling](https://github.com/status-im/nim-chronos#error-handling) for more details.

Use `-d:chronosStrictException` to enable strict mode as explained above.

## Todos

Expand Down
5 changes: 1 addition & 4 deletions scorper.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ installExt = @["nim"]
# namedbin = {"scorper/http/routermacros":"routermacros" }.toTable()
# Dependencies

requires "nim >= 1.6.16" # initial 1.3.1
requires "nim >= 1.6.18" # initial 1.3.1
# requires "chronos >= 3.0.2" # initial 2.6.1
requires "chronos"
requires "npeg"
Expand Down Expand Up @@ -52,9 +52,6 @@ task bench_h,"benchmark simple responses with httpbeast":
exec "nim c -r -d:release --threads:on -d:port=7777 -d:demoPath=benchmark/simple_resp.nim benchmark/benchmark_resp.nim"
exec "nim c -r -d:release --threads:on -d:port=6666 -d:demoPath=benchmark/simple_resp_httpbeast.nim benchmark/benchmark_resp.nim"

task strict, "stric async exception check":
exec "nimble test -d:chronosStrictException"


# before test:
# requires "asynctest >= 0.3.2 & < 0.4.0"
Expand Down

0 comments on commit 9e0917e

Please sign in to comment.