You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
XDG_CONFIG_HOME= nim c --lib:lib -r --skipparentcfg main
Expected Output
this should work with the nim binary that's used to bootstrap nim
Possible Solution
update the bootstrap version of nim (csources2) to be at least 1.0.4 (1.0.0 doesn't work)
(and in fact latest stable as I argued here #16282 (comment) but this can be debated elsewhere)
note that https://github.com/nim-lang/csources_v1.git is apparently at version 1.0.11 (which is >= 1.0.4 ie would fix this issue), but this isn't documented; it should be documented via a machine-readable text file containing the hash or preferably git tag for which csources were generated from, currently at 1.0.11.
if (result.n[0].kind in {nkFloatLit..nkFloat64Lit} andisNaN(result.n[0].floatVal)) or
(result.n[1].kind in {nkFloatLit..nkFloat64Lit} andisNaN(result.n[1].floatVal)):
localError(c.config, n.info, "NaN is not a valid start or end for a range")
which should've worked because compiler is built with --lib:lib so {.since: (1,5,1).} should've been enabled even with nim bootstrap, but wasn't, because of this bug affecting 0.20.0 (current nim bootstrap version).
note that this also didn't work:
whennotdeclared(isNaN):
static: doAssert (NimMajor, NimMinor, NimPatch) < (1, 5, 1) # sanity check to ensure this workaround isn't taken in recent nimtemplateisNaN(a): untyped=classify(a) == fcNan
because (NimMajor, NimMinor, NimPatch) = (1,5,1) holds, so the static doAssert fails.
nimVersionCT (#14648 which was closed) would in future allow distingushing the version nim binary was compiled at from the version of the stdlib, which is useful in cases like this where we rely on a compiler fix/feature (in this case what matters is that the nim binary was >= 1.0.4, in addition to stdlib >= (1,5,1))
The text was updated successfully, but these errors were encountered:
…17895)
* revive #16627 now that csources_v1 was merged
* use dedent in rst.nim, refs #17257 (comment)
* fix test and improve rendering of a rst warning
Example
Current Output
0.20: Error: undeclared identifier: 'isNaN2'
1.0.0: ditto
1.0.2: ditto
1.0.4: works
XDG_CONFIG_HOME= nim c --lib:lib -r --skipparentcfg main
Expected Output
this should work with the nim binary that's used to bootstrap nim
Possible Solution
update the bootstrap version of nim (csources2) to be at least 1.0.4 (1.0.0 doesn't work)
(and in fact latest stable as I argued here #16282 (comment) but this can be debated elsewhere)
note that https://github.com/nim-lang/csources_v1.git is apparently at version 1.0.11 (which is >= 1.0.4 ie would fix this issue), but this isn't documented; it should be documented via a machine-readable text file containing the hash or preferably git tag for which csources were generated from, currently at 1.0.11.
Additional Information
1.5.1 d34d023
found this while investigating CI failure in https://github.com/nim-lang/Nim/pull/16627/files with this seemingly correct code:
which should've worked because compiler is built with
--lib:lib
so {.since: (1,5,1).} should've been enabled even with nim bootstrap, but wasn't, because of this bug affecting 0.20.0 (current nim bootstrap version).note that this also didn't work:
because
(NimMajor, NimMinor, NimPatch) = (1,5,1)
holds, so thestatic doAssert fails
.workaround
related
nimVersionCT
(#14648 which was closed) would in future allow distingushing the version nim binary was compiled at from the version of the stdlib, which is useful in cases like this where we rely on a compiler fix/feature (in this case what matters is that the nim binary was >= 1.0.4, in addition to stdlib >= (1,5,1))The text was updated successfully, but these errors were encountered: