configlet
configlet copied to clipboard
resolve `requiresInit` warnings
Some warnings show up when using --mm:orc
(tracking in #190), related to the use of requiresInit
.
I believe these warnings don't indicate user-facing incorrect behavior, and some may even go away by themselves later (or while we do more refactoring). But I haven't looked hard at them yet.
The plan is that Nim will enforce explicit initialization in the future. See the Manual (Ctrl+f requiresInit
).
Warnings:
$ git checkout 8ee6b5d55f63
HEAD is now at 8ee6b5d release: 4.0.0-beta.3 (#606)
$ nimble build --mm:orc
/tmp/configlet/src/helpers.nim(26, 8) template/generic instantiation of `sort` from here
/foo/nim-devel/lib/pure/algorithm.nim(421, 74) template/generic instantiation of `sort` from here
/foo/nim-devel/lib/pure/algorithm.nim(412, 20) template/generic instantiation of `newSeq` from here
/foo/nim-devel/lib/system.nim(686, 9) template/generic instantiation of `newSeq` from here
/foo/nim-devel/lib/system/seqs_v2.nim(130, 9) template/generic instantiation of `shrink` from here
/foo/nim-devel/lib/system/seqs_v2.nim(79, 13) Warning: setLen can potentially expand the sequence, but the element type 'Path' doesn't have a valid default value [UnsafeSetLen]
/tmp/configlet/src/helpers.nim(26, 8) template/generic instantiation of `sort` from here
/foo/nim-devel/lib/pure/algorithm.nim(421, 74) template/generic instantiation of `sort` from here
/foo/nim-devel/lib/pure/algorithm.nim(412, 20) template/generic instantiation of `newSeq` from here
/foo/nim-devel/lib/system.nim(686, 9) template/generic instantiation of `newSeq` from here
/foo/nim-devel/lib/system/seqs_v2.nim(130, 9) template/generic instantiation of `shrink` from here
/foo/nim-devel/lib/system/seqs_v2.nim(84, 15) template/generic instantiation of `reset` from here
/foo/nim-devel/lib/system.nim(1008, 16) template/generic instantiation of `default` from here
/foo/nim-devel/lib/system.nim(989, 3) Warning: Cannot prove that 'result' is initialized. This will become a compile time error in the future. [ProveInit]
/tmp/configlet/src/helpers.nim(26, 8) template/generic instantiation of `sort` from here
/foo/nim-devel/lib/pure/algorithm.nim(421, 74) template/generic instantiation of `sort` from here
/foo/nim-devel/lib/pure/algorithm.nim(412, 20) template/generic instantiation of `newSeq` from here
/foo/nim-devel/lib/system.nim(686, 9) template/generic instantiation of `newSeq` from here
/foo/nim-devel/lib/system/seqs_v2.nim(130, 9) template/generic instantiation of `shrink` from here
/foo/nim-devel/lib/system/seqs_v2.nim(84, 15) template/generic instantiation of `reset` from here
/foo/nim-devel/lib/system.nim(1008, 16) Warning: The 'Path' type doesn't have a valid default value [UnsafeDefault]
/tmp/configlet/src/helpers.nim(26, 8) template/generic instantiation of `sort` from here
/foo/nim-devel/lib/pure/algorithm.nim(421, 74) template/generic instantiation of `sort` from here
/foo/nim-devel/lib/pure/algorithm.nim(412, 20) template/generic instantiation of `newSeq` from here
/foo/nim-devel/lib/system.nim(686, 9) template/generic instantiation of `newSeq` from here
/foo/nim-devel/lib/system/seqs_v2.nim(131, 9) Warning: setLen can potentially expand the sequence, but the element type 'Path' doesn't have a valid default value [UnsafeSetLen]
/tmp/configlet/src/sync/tracks.nim(55, 8) template/generic instantiation of `sort` from here
/foo/nim-devel/lib/pure/algorithm.nim(421, 74) template/generic instantiation of `sort` from here
/foo/nim-devel/lib/pure/algorithm.nim(412, 20) template/generic instantiation of `newSeq` from here
/foo/nim-devel/lib/system.nim(686, 9) template/generic instantiation of `newSeq` from here
/foo/nim-devel/lib/system/seqs_v2.nim(130, 9) template/generic instantiation of `shrink` from here
/foo/nim-devel/lib/system/seqs_v2.nim(79, 13) Warning: setLen can potentially expand the sequence, but the element type 'PracticeExerciseSlug' doesn't have a valid default value [UnsafeSetLen]
/tmp/configlet/src/sync/tracks.nim(55, 8) template/generic instantiation of `sort` from here
/foo/nim-devel/lib/pure/algorithm.nim(421, 74) template/generic instantiation of `sort` from here
/foo/nim-devel/lib/pure/algorithm.nim(412, 20) template/generic instantiation of `newSeq` from here
/foo/nim-devel/lib/system.nim(686, 9) template/generic instantiation of `newSeq` from here
/foo/nim-devel/lib/system/seqs_v2.nim(130, 9) template/generic instantiation of `shrink` from here
/foo/nim-devel/lib/system/seqs_v2.nim(84, 15) template/generic instantiation of `reset` from here
/foo/nim-devel/lib/system.nim(1008, 16) template/generic instantiation of `default` from here
/foo/nim-devel/lib/system.nim(989, 3) Warning: Cannot prove that 'result' is initialized. This will become a compile time error in the future. [ProveInit]
/tmp/configlet/src/sync/tracks.nim(55, 8) template/generic instantiation of `sort` from here
/foo/nim-devel/lib/pure/algorithm.nim(421, 74) template/generic instantiation of `sort` from here
/foo/nim-devel/lib/pure/algorithm.nim(412, 20) template/generic instantiation of `newSeq` from here
/foo/nim-devel/lib/system.nim(686, 9) template/generic instantiation of `newSeq` from here
/foo/nim-devel/lib/system/seqs_v2.nim(130, 9) template/generic instantiation of `shrink` from here
/foo/nim-devel/lib/system/seqs_v2.nim(84, 15) template/generic instantiation of `reset` from here
/foo/nim-devel/lib/system.nim(1008, 16) Warning: The 'PracticeExerciseSlug' type doesn't have a valid default value [UnsafeDefault]
/tmp/configlet/src/sync/tracks.nim(55, 8) template/generic instantiation of `sort` from here
/foo/nim-devel/lib/pure/algorithm.nim(421, 74) template/generic instantiation of `sort` from here
/foo/nim-devel/lib/pure/algorithm.nim(412, 20) template/generic instantiation of `newSeq` from here
/foo/nim-devel/lib/system.nim(686, 9) template/generic instantiation of `newSeq` from here
/foo/nim-devel/lib/system/seqs_v2.nim(131, 9) Warning: setLen can potentially expand the sequence, but the element type 'PracticeExerciseSlug' doesn't have a valid default value [UnsafeSetLen]
/tmp/configlet/src/sync/exercises.nim(62, 19) template/generic instantiation of `setLen` from here
/foo/nim-devel/lib/system/seqs_v2.nim(120, 13) template/generic instantiation of `shrink` from here
/foo/nim-devel/lib/system/seqs_v2.nim(79, 13) Warning: setLen can potentially expand the sequence, but the element type 'ExerciseTestCase' doesn't have a valid default value [UnsafeSetLen]
/tmp/configlet/src/sync/exercises.nim(62, 19) template/generic instantiation of `setLen` from here
/foo/nim-devel/lib/system/seqs_v2.nim(120, 13) template/generic instantiation of `shrink` from here
/foo/nim-devel/lib/system/seqs_v2.nim(84, 15) template/generic instantiation of `reset` from here
/foo/nim-devel/lib/system.nim(1008, 16) template/generic instantiation of `default` from here
/foo/nim-devel/lib/system.nim(989, 3) Warning: Cannot prove that 'result' is initialized. This will become a compile time error in the future. [ProveInit]
/tmp/configlet/src/sync/exercises.nim(62, 19) template/generic instantiation of `setLen` from here
/foo/nim-devel/lib/system/seqs_v2.nim(120, 13) template/generic instantiation of `shrink` from here
/foo/nim-devel/lib/system/seqs_v2.nim(84, 15) template/generic instantiation of `reset` from here
/foo/nim-devel/lib/system.nim(1008, 16) Warning: The 'ExerciseTestCase' type doesn't have a valid default value [UnsafeDefault]
/tmp/configlet/src/sync/exercises.nim(92, 37) template/generic instantiation of `init` from here
/tmp/configlet/src/sync/exercises.nim(66, 36) template/generic instantiation of `newSeq` from here
/foo/nim-devel/lib/system.nim(686, 9) template/generic instantiation of `newSeq` from here
/foo/nim-devel/lib/system/seqs_v2.nim(131, 9) Warning: setLen can potentially expand the sequence, but the element type 'ExerciseTestCase' doesn't have a valid default value [UnsafeSetLen]
/tmp/configlet/src/sync/sync_tests.nim(6, 19) template/generic instantiation of `setLen` from here
/foo/nim-devel/lib/system/seqs_v2.nim(120, 13) template/generic instantiation of `shrink` from here
/foo/nim-devel/lib/system/seqs_v2.nim(79, 13) Warning: setLen can potentially expand the sequence, but the element type 'Exercise' doesn't have a valid default value [UnsafeSetLen]
/tmp/configlet/src/sync/sync_tests.nim(6, 19) template/generic instantiation of `setLen` from here
/foo/nim-devel/lib/system/seqs_v2.nim(120, 13) template/generic instantiation of `shrink` from here
/foo/nim-devel/lib/system/seqs_v2.nim(84, 15) template/generic instantiation of `reset` from here
/foo/nim-devel/lib/system.nim(1008, 16) template/generic instantiation of `default` from here
/foo/nim-devel/lib/system.nim(989, 3) Warning: Cannot prove that 'result' is initialized. This will become a compile time error in the future. [ProveInit]
/tmp/configlet/src/sync/sync_tests.nim(6, 19) template/generic instantiation of `setLen` from here
/foo/nim-devel/lib/system/seqs_v2.nim(120, 13) template/generic instantiation of `shrink` from here
/foo/nim-devel/lib/system/seqs_v2.nim(84, 15) template/generic instantiation of `reset` from here
/foo/nim-devel/lib/system.nim(1008, 16) Warning: The 'Exercise' type doesn't have a valid default value [UnsafeDefault]