make koch and tools work with nimPreviewSlimSystem (#20459)

This commit is contained in:
ringabout 2022-09-30 08:09:40 +08:00 • committed by GitHub
commit 3e43ea3384
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 28 additions and 4 deletions

View file

@ -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)

View file

@ -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

View file

@ -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