Hello,
I use doAssert at few places in my config.nims. Here's a partial example of it in use:
proc parseArgs(): tuple[switches: seq[string], nonSwitches: seq[string]] =
## Parse the args and return its components as
## ``(switches, nonSwitches)``.
let
numParams = paramCount() # count starts at 0
# So "nim musl foo.nim" will have a count of 2.
# param 0 will always be "nim"
doAssert numParams >= 1
# ..
I am rebuilding Nim from lastest devel after quite a few months and now I am seeing this error for all the instances where I am using doAssert in my Nimscript.
/home/kmodi/stow/pub_dotfiles/nim/nim/config.nims(128, 3) Error: undeclared identifier: 'doAssert'
Is the use of doAssert deprecated? I tried searching for recent commits with doAssert references but couldn't find the relevant commit that could have caused this change.
Thanks!
Looks like adding this import to config.nims fixes this:
import std/[assertions]