chore: enable Nim 2.0.x and fix compilation issues (#1146)

This PR enables Nim 2.0.x with `refc` garbage collector on CI.

The following compilation error had to be fixed: Error: undeclared
identifier: 'acceptHandler`gensym435'; if declared in a template, this
identifier may be inconsistently marked inject or gensym
This commit is contained in:
diegomrsantos 2024-07-10 14:24:12 +02:00 committed by GitHub
parent be801602f6
commit 86563cbddd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 7 additions and 4 deletions

View File

@ -27,7 +27,7 @@ jobs:
cpu: amd64 cpu: amd64
#- os: windows #- os: windows
#cpu: i386 #cpu: i386
branch: [version-1-6] branch: [version-1-6, version-2-0]
include: include:
- target: - target:
os: linux os: linux

View File

@ -126,7 +126,7 @@ task examples_build, "Build the samples":
buildSample("tutorial_5_discovery", true) buildSample("tutorial_5_discovery", true)
exec "nimble install -y nimpng@#HEAD" exec "nimble install -y nimpng@#HEAD"
# this is to fix broken build on 1.7.3, remove it when nimpng version 0.3.2 or later is released # this is to fix broken build on 1.7.3, remove it when nimpng version 0.3.2 or later is released
exec "nimble install -y nico" exec "nimble install -y nico@#af99dd60bf2b395038ece815ea1012330a80d6e6"
buildSample("tutorial_6_game", false, "--styleCheck:off") buildSample("tutorial_6_game", false, "--styleCheck:off")
# pin system # pin system

View File

@ -144,7 +144,7 @@ template commonTransportTest*(prov: TransportProvider, ma1: string, ma2: string
let transport1 = transpProvider() let transport1 = transpProvider()
await transport1.start(addrs) await transport1.start(addrs)
proc acceptHandler() {.async.} = proc acceptHandler() {.async, gensym.} =
while true: while true:
let conn = await transport1.accept() let conn = await transport1.accept()
await conn.write(newSeq[byte](0)) await conn.write(newSeq[byte](0))
@ -208,7 +208,7 @@ template commonTransportTest*(prov: TransportProvider, ma1: string, ma2: string
let transport1 = transpProvider() let transport1 = transpProvider()
await transport1.start(ma) await transport1.start(ma)
proc acceptHandler() {.async.} = proc acceptHandler() {.async, gensym.} =
let conn = await transport1.accept() let conn = await transport1.accept()
await conn.close() await conn.close()

View File

@ -18,6 +18,9 @@ import strutils, os
--d: --d:
unittestPrintTime unittestPrintTime
--skipParentCfg --skipParentCfg
--mm:
refc
# reconsider when there's a version-2-2 branch worth testing with as we might switch to orc
# Only add chronicles param if the # Only add chronicles param if the
# user didn't specify any # user didn't specify any