make koch and tools work with nimPreviewSlimSystem (#20459)
This commit is contained in:
parent
716d68cb24
commit
3e43ea3384
8 changed files with 28 additions and 4 deletions
3
koch.nim
3
koch.nim
|
|
@ -34,6 +34,9 @@ import std/[os, strutils, parseopt, osproc]
|
||||||
# If this fails with: `Error: cannot open file: std/os`, see
|
# If this fails with: `Error: cannot open file: std/os`, see
|
||||||
# https://github.com/nim-lang/Nim/pull/14291 for explanation + how to fix.
|
# 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 / kochdocs
|
||||||
import tools / deps
|
import tools / deps
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,9 @@ internal API for now, API subject to change
|
||||||
|
|
||||||
import std/[os, osproc, strutils, tempfiles]
|
import std/[os, osproc, strutils, tempfiles]
|
||||||
|
|
||||||
|
when defined(nimPreviewSlimSystem):
|
||||||
|
import std/[assertions, syncio]
|
||||||
|
|
||||||
const commitHead* = "HEAD"
|
const commitHead* = "HEAD"
|
||||||
|
|
||||||
template retryCall*(maxRetry = 3, backoffDuration = 1.0, call: untyped): bool =
|
template retryCall*(maxRetry = 3, backoffDuration = 1.0, call: untyped): bool =
|
||||||
|
|
|
||||||
5
tests/tools/compile/tkoch.nim
Normal file
5
tests/tools/compile/tkoch.nim
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
discard """
|
||||||
|
action: compile
|
||||||
|
"""
|
||||||
|
|
||||||
|
include koch
|
||||||
1
tests/tools/config.nims
Normal file
1
tests/tools/config.nims
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
--d:nimPreviewSlimSystem
|
||||||
|
|
@ -8,7 +8,9 @@ discard """
|
||||||
"""
|
"""
|
||||||
## Authors: quantimnot, a-mr
|
## Authors: quantimnot, a-mr
|
||||||
|
|
||||||
import osproc, os, streams, unittest, strutils
|
import std/[osproc, os, streams, unittest, strutils]
|
||||||
|
|
||||||
|
import std/syncio
|
||||||
|
|
||||||
#=======
|
#=======
|
||||||
# setup
|
# setup
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
import os, uri, strformat, strutils
|
import std/[os, uri, strformat, strutils]
|
||||||
import std/private/gitutils
|
import std/private/gitutils
|
||||||
|
|
||||||
|
when defined(nimPreviewSlimSystem):
|
||||||
|
import std/assertions
|
||||||
|
|
||||||
proc exec(cmd: string) =
|
proc exec(cmd: string) =
|
||||||
echo "deps.cmd: " & cmd
|
echo "deps.cmd: " & cmd
|
||||||
let status = execShellCmd(cmd)
|
let status = execShellCmd(cmd)
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,10 @@
|
||||||
# The second one is more portable, and less semantically correct. It only works
|
# 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
|
# when there's a backing C compiler available as well, preventing standalone
|
||||||
# compilation.
|
# compilation.
|
||||||
import os, strutils
|
import std/[os, strutils]
|
||||||
|
|
||||||
|
when defined(nimPreviewSlimSystem):
|
||||||
|
import std/syncio
|
||||||
|
|
||||||
when defined(openbsd) or defined(freebsd) or defined(netbsd):
|
when defined(openbsd) or defined(freebsd) or defined(netbsd):
|
||||||
const
|
const
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
## Part of 'koch' responsible for the documentation generation.
|
## 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.
|
# XXX: Remove this feature check once the csources supports it.
|
||||||
when defined(nimHasCastPragmaBlocks):
|
when defined(nimHasCastPragmaBlocks):
|
||||||
import std/pegs
|
import std/pegs
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue