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
i added the switch switch("hintAsError", "XDeclaredButNotUsed:on")
to catch bad practices, however, this also checks nimlangs source which is unexpected
/home/runner/.choosenim/toolchains/nim-1.6.12/lib/system/fatal.nim(13, 9) Error: 'gotoBasedExceptions' is declared but not used [XDeclaredButNotUsed]�
/home/runner/work/nightlies/nightlies/nim-1.6.12/compiler/lookups.nim(299, 12) compiler msg initiated here [MsgOrigin]�
Description
application config switches should not surface errors with conflicting code in nim source, i'm unsure how this occurs - arent I using the compiled nim binary?
[update]
added better examples and removed the rest
e.g. happens fairly often with Uninit set as error
.choosenim/toolchains/nim-#version-2-0/lib/pure/collections/sequtils.nim(232, 17)
Error: use explicit initialization of 'result'for clarity [Uninit]�
/bookofnim.nim(64, 25) template/generic instantiation of `toHashSet` from here
nim-#version-2-0/lib/pure/collections/sets.nim(243, 26) template/generic
instantiation of `initHashSet` from here
nim-#version-2-0/lib/pure/collections/sets.nim(116, 3)
Error: Cannot prove that 'result' is initialized.
This will become a compile time error in the future. [ProveInit]�
setting --experimental:strictNotNil in config.nim throws on nim source
setting --experimental:strictCaseObject caues the following to throw
import std/[critbits, strformat]
let sortedStringSet: CritBitTree[void] = ["zfirst", "asecond"].toCritBitTree
echo fmt"{sortedStringSet=}"# im-#devel/lib/pure/collections/critbits.nim(249, 20)# template/generic instantiation of `rawInsert` from here# im-#devel/lib/pure/collections/critbits.nim(101, 14) # Error: field access outside of valid case branch: it.child�
-- setting --experimental:strictCaseObjects in config.nims throws on nim source
# in json
/nim-#devel/lib/pure/json.nim(250, 17) Error: field access outside of valid case branch
# in critbit
nim-#devel/lib/pure/collections/critbits.nim(101, 14) Error: field access outside of valid case branch: it.child
--- setting --experimental:views
/nim-#devel/lib/pure/asyncfutures.nim(63, 12) Error: 'result' must borrow from the first parameter
nim version
$ nim --v
Nim Compiler Version 1.9.3 [Linux: amd64]
Compiled at 2023-05-02
Copyright (c) 2006-2023 by Andreas Rumpf
git hash: aec5a4c4744a81e19954daf330bafac948098835
active boot switches: -d:release
The text was updated successfully, but these errors were encountered:
noahehall
changed the title
limit errors to source code only
limit errors to application source code only
Apr 23, 2023
noahehall
changed the title
limit errors to application source code only
limit errors to application source code only and do not check imported packages/std library/etc
May 1, 2023
Summary
i added the switch
switch("hintAsError", "XDeclaredButNotUsed:on")
to catch bad practices, however, this also checks nimlangs source which is unexpected
because of this line in lib/system/fatal
/home/runner/.choosenim/toolchains/nim-1.6.12/lib/system/fatal.nim(13, 9) Error: 'gotoBasedExceptions' is declared but not used [XDeclaredButNotUsed]� /home/runner/work/nightlies/nightlies/nim-1.6.12/compiler/lookups.nim(299, 12) compiler msg initiated here [MsgOrigin]�
Description
application config switches should not surface errors with conflicting code in nim source, i'm unsure how this occurs - arent I using the compiled nim binary?
[update]
added better examples and removed the rest
e.g. happens fairly often with Uninit set as error
--experimental:strictNotNil
in config.nim throws on nim sourceassertions.nim(34) raiseAssert Error: unhandled exception: nilcheck.nim(1285, 3) `not typ.isNil` [AssertionDefect]
--experimental:strictCaseObject
caues the following to throw-- setting
--experimental:strictCaseObjects
in config.nims throws on nim source--- setting
--experimental:views
/nim-#devel/lib/pure/asyncfutures.nim(63, 12) Error: 'result' must borrow from the first parameter
nim version
The text was updated successfully, but these errors were encountered: