[WIP, TODO] turn some include => import in system.nim #13161
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
followup on System cleanup, part 2 #13155 see System cleanup, part 2 #13155 (comment)
what changed:
turned to import:
system/arithmetics
system/exceptions
system/setops
system/iterators_1
system/arithmetics
new import:
system/privatedefs
kept as include:
system/comparisons
same could be done for remaining includes in future PR's
note
I had to keep the following include's:
because of:
Error: system module needs: int
because they define public procs but no implementation
maybe this could be dealt with using
importc/exportc
; but should be in future PR'sditto
note
{.nosystem.}
(see Split system conceptually for doc purposes #10385 (comment)) which would allow a user to skip importing all of what system imports and instead choose what he wantsimport foo {.privateImport.}
([superseded]import foo {.all.}
#11865) would simplify a number of things, eg it'd allow to put backStackTraceEntry
andException
inside exceptions.nim; right now i had to re-move it inside system.nim because of some private fields (up
,trace
,raiseId
); with [superseded]import foo {.all.}
#11865 you'd instead have:./bin/nim c --newruntime -d:useMalloc --listfullpaths tests/destructor/tnewruntime_strutils.nim
becauseNimSeqV2.p
is private(plus some mysterious change of stacktrace, see
./bin/nim c -r testament/testament --nim:bin/nim r tests/enum/tenummix.nim
, which I don't understand)