summary refs log tree commit diff stats
path: root/tools
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2022-09-30 08:09:40 +0800
committerGitHub <noreply@github.com>2022-09-30 08:09:40 +0800
commit3e43ea3384acd666196bbcdc6029741df9b6e325 (patch)
tree1b98401564ee357ee5d5d31d188a93f587683a6e /tools
parent716d68cb24beb4006815faf1b710a9e25e1ec5be (diff)
downloadNim-3e43ea3384acd666196bbcdc6029741df9b6e325.tar.gz
make koch and tools work with `nimPreviewSlimSystem` (#20459)
Diffstat (limited to 'tools')
-rw-r--r--tools/deps.nim5
-rw-r--r--tools/detect/detect.nim5
-rw-r--r--tools/kochdocs.nim6
3 files changed, 13 insertions, 3 deletions
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