diff options
-rw-r--r-- | koch.nim | 3 | ||||
-rw-r--r-- | lib/std/private/gitutils.nim | 3 | ||||
-rw-r--r-- | tests/tools/compile/tkoch.nim | 5 | ||||
-rw-r--r-- | tests/tools/config.nims | 1 | ||||
-rw-r--r-- | tests/tools/tnimgrep.nim | 4 | ||||
-rw-r--r-- | tools/deps.nim | 5 | ||||
-rw-r--r-- | tools/detect/detect.nim | 5 | ||||
-rw-r--r-- | tools/kochdocs.nim | 6 |
8 files changed, 28 insertions, 4 deletions
diff --git a/koch.nim b/koch.nim index e3e2cb098..1e531e5a9 100644 --- a/koch.nim +++ b/koch.nim @@ -34,6 +34,9 @@ import std/[os, strutils, parseopt, osproc] # If this fails with: `Error: cannot open file: std/os`, see # https://github.com/nim-lang/Nim/pull/14291 for explanation + how to fix. +when defined(nimPreviewSlimSystem): + import std/[assertions, syncio] + import tools / kochdocs import tools / deps diff --git a/lib/std/private/gitutils.nim b/lib/std/private/gitutils.nim index 5bcd9e377..db323bee1 100644 --- a/lib/std/private/gitutils.nim +++ b/lib/std/private/gitutils.nim @@ -6,6 +6,9 @@ internal API for now, API subject to change import std/[os, osproc, strutils, tempfiles] +when defined(nimPreviewSlimSystem): + import std/[assertions, syncio] + const commitHead* = "HEAD" template retryCall*(maxRetry = 3, backoffDuration = 1.0, call: untyped): bool = diff --git a/tests/tools/compile/tkoch.nim b/tests/tools/compile/tkoch.nim new file mode 100644 index 000000000..008721dc0 --- /dev/null +++ b/tests/tools/compile/tkoch.nim @@ -0,0 +1,5 @@ +discard """ + action: compile +""" + +include koch \ No newline at end of file diff --git a/tests/tools/config.nims b/tests/tools/config.nims new file mode 100644 index 000000000..20eb34633 --- /dev/null +++ b/tests/tools/config.nims @@ -0,0 +1 @@ +--d:nimPreviewSlimSystem \ No newline at end of file diff --git a/tests/tools/tnimgrep.nim b/tests/tools/tnimgrep.nim index e97b979f1..890a36e79 100644 --- a/tests/tools/tnimgrep.nim +++ b/tests/tools/tnimgrep.nim @@ -8,7 +8,9 @@ discard """ """ ## Authors: quantimnot, a-mr -import osproc, os, streams, unittest, strutils +import std/[osproc, os, streams, unittest, strutils] + +import std/syncio #======= # setup diff --git a/tools/deps.nim b/tools/deps.nim index 59872070d..e43f7a2b4 100644 --- a/tools/deps.nim +++ b/tools/deps.nim @@ -1,6 +1,9 @@ -import os, uri, strformat, strutils +import std/[os, uri, strformat, strutils] import std/private/gitutils +when defined(nimPreviewSlimSystem): + import std/assertions + proc exec(cmd: string) = echo "deps.cmd: " & cmd let status = execShellCmd(cmd) diff --git a/tools/detect/detect.nim b/tools/detect/detect.nim index 841b3a675..ed1caf78c 100644 --- a/tools/detect/detect.nim +++ b/tools/detect/detect.nim @@ -12,7 +12,10 @@ # The second one is more portable, and less semantically correct. It only works # when there's a backing C compiler available as well, preventing standalone # compilation. -import os, strutils +import std/[os, strutils] + +when defined(nimPreviewSlimSystem): + import std/syncio when defined(openbsd) or defined(freebsd) or defined(netbsd): const diff --git a/tools/kochdocs.nim b/tools/kochdocs.nim index bbeb3d306..232e68f5d 100644 --- a/tools/kochdocs.nim +++ b/tools/kochdocs.nim @@ -1,6 +1,10 @@ ## Part of 'koch' responsible for the documentation generation. -import os, strutils, osproc, sets, pathnorm, sequtils +import std/[os, strutils, osproc, sets, pathnorm, sequtils] + +when defined(nimPreviewSlimSystem): + import std/assertions + # XXX: Remove this feature check once the csources supports it. when defined(nimHasCastPragmaBlocks): import std/pegs |