* fixes #20526; use `nimPreviewSlimSystem` for `koch docs` * fixes documentation errors * fixes remaning issues
This commit is contained in:
parent
07cf4486bc
commit
75ece74bdd
16 changed files with 39 additions and 5 deletions
2
koch.nim
2
koch.nim
|
|
@ -676,7 +676,7 @@ when isMainModule:
|
||||||
case normalize(op.key)
|
case normalize(op.key)
|
||||||
of "boot": boot(op.cmdLineRest)
|
of "boot": boot(op.cmdLineRest)
|
||||||
of "clean": clean(op.cmdLineRest)
|
of "clean": clean(op.cmdLineRest)
|
||||||
of "doc", "docs": buildDocs(op.cmdLineRest & paCode, localDocsOnly, localDocsOut)
|
of "doc", "docs": buildDocs(op.cmdLineRest & " --d:nimPreviewSlimSystem " & paCode, localDocsOnly, localDocsOut)
|
||||||
of "doc0", "docs0":
|
of "doc0", "docs0":
|
||||||
# undocumented command for Araq-the-merciful:
|
# undocumented command for Araq-the-merciful:
|
||||||
buildDocs(op.cmdLineRest & gaCode)
|
buildDocs(op.cmdLineRest & gaCode)
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,9 @@ when defined(nimPreviewSlimSystem):
|
||||||
import std/syncio
|
import std/syncio
|
||||||
|
|
||||||
when defined(windows):
|
when defined(windows):
|
||||||
|
when defined(nimPreviewSlimSystem):
|
||||||
|
import std/syncio
|
||||||
|
|
||||||
proc readLineFromStdin*(prompt: string): string {.
|
proc readLineFromStdin*(prompt: string): string {.
|
||||||
tags: [ReadIOEffect, WriteIOEffect].} =
|
tags: [ReadIOEffect, WriteIOEffect].} =
|
||||||
## Reads a line from stdin.
|
## Reads a line from stdin.
|
||||||
|
|
|
||||||
|
|
@ -200,6 +200,9 @@ batchable: false
|
||||||
# block. Perhaps something can be done about this - some way of re-allocating
|
# block. Perhaps something can be done about this - some way of re-allocating
|
||||||
# the state and transferring the old...
|
# the state and transferring the old...
|
||||||
|
|
||||||
|
when defined(nimPreviewSlimSystem):
|
||||||
|
import std/assertions
|
||||||
|
|
||||||
when not defined(js) and (defined(hotcodereloading) or
|
when not defined(js) and (defined(hotcodereloading) or
|
||||||
defined(createNimHcr) or
|
defined(createNimHcr) or
|
||||||
defined(testNimHcr)):
|
defined(testNimHcr)):
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ import
|
||||||
from algorithm import binarySearch
|
from algorithm import binarySearch
|
||||||
|
|
||||||
when defined(nimPreviewSlimSystem):
|
when defined(nimPreviewSlimSystem):
|
||||||
import std/assertions
|
import std/[assertions, syncio]
|
||||||
|
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,9 @@
|
||||||
# distribution, for details about the copyright.
|
# distribution, for details about the copyright.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
when defined(nimPreviewSlimSystem):
|
||||||
|
import std/syncio
|
||||||
|
|
||||||
# Get the platform-dependent flags.
|
# Get the platform-dependent flags.
|
||||||
# Structure describing an inotify event.
|
# Structure describing an inotify event.
|
||||||
type
|
type
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,9 @@
|
||||||
import posix, parsecfg, os
|
import posix, parsecfg, os
|
||||||
import std/private/since
|
import std/private/since
|
||||||
|
|
||||||
|
when defined(nimPreviewSlimSystem):
|
||||||
|
import std/syncio
|
||||||
|
|
||||||
type Uname* = object
|
type Uname* = object
|
||||||
sysname*, nodename*, release*, version*, machine*: string
|
sysname*, nodename*, release*, version*, machine*: string
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ import asyncdispatch, os
|
||||||
|
|
||||||
when defined(nimPreviewSlimSystem):
|
when defined(nimPreviewSlimSystem):
|
||||||
import std/[assertions, syncio]
|
import std/[assertions, syncio]
|
||||||
when defined(windows):
|
when defined(windows) or defined(nimdoc):
|
||||||
import std/widestrs
|
import std/widestrs
|
||||||
|
|
||||||
# TODO: Fix duplication introduced by PR #4683.
|
# TODO: Fix duplication introduced by PR #4683.
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,11 @@
|
||||||
import asyncdispatch, asyncnet, nativesockets, strutils, parseutils, os, times
|
import asyncdispatch, asyncnet, nativesockets, strutils, parseutils, os, times
|
||||||
from net import BufferSize, SslContext
|
from net import BufferSize, SslContext
|
||||||
|
|
||||||
|
|
||||||
|
when defined(nimPreviewSlimSystem):
|
||||||
|
import std/syncio
|
||||||
|
|
||||||
|
|
||||||
when defined(ssl):
|
when defined(ssl):
|
||||||
from net import SslHandshakeType, newContext, SslCVerifyMode
|
from net import SslHandshakeType, newContext, SslCVerifyMode
|
||||||
var defaultSslContext {.threadvar.}: SslContext
|
var defaultSslContext {.threadvar.}: SslContext
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,9 @@ import os
|
||||||
import lists
|
import lists
|
||||||
include system/timers
|
include system/timers
|
||||||
|
|
||||||
|
when defined(nimPreviewSlimSystem):
|
||||||
|
import std/assertions
|
||||||
|
|
||||||
const defaultStackSize = 512 * 1024
|
const defaultStackSize = 512 * 1024
|
||||||
const useOrcArc = defined(gcArc) or defined(gcOrc)
|
const useOrcArc = defined(gcArc) or defined(gcOrc)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,9 @@ when defined(nimHasUsed):
|
||||||
|
|
||||||
import hashes, algorithm, strutils, tables, sets
|
import hashes, algorithm, strutils, tables, sets
|
||||||
|
|
||||||
|
when defined(nimPreviewSlimSystem):
|
||||||
|
import std/syncio
|
||||||
|
|
||||||
when not defined(memProfiler):
|
when not defined(memProfiler):
|
||||||
include "system/timers"
|
include "system/timers"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,7 @@ import
|
||||||
strutils, lexbase, streams, unicode
|
strutils, lexbase, streams, unicode
|
||||||
|
|
||||||
when defined(nimPreviewSlimSystem):
|
when defined(nimPreviewSlimSystem):
|
||||||
import std/assertions
|
import std/[assertions, syncio]
|
||||||
|
|
||||||
# the parser treats ``<br />`` as ``<br></br>``
|
# the parser treats ``<br />`` as ``<br></br>``
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,9 @@
|
||||||
|
|
||||||
from std/oserrors import raiseOSError, osLastError
|
from std/oserrors import raiseOSError, osLastError
|
||||||
|
|
||||||
|
when defined(nimPreviewSlimSystem):
|
||||||
|
import std/assertions
|
||||||
|
|
||||||
template distance*(lhs, rhs: pointer): int =
|
template distance*(lhs, rhs: pointer): int =
|
||||||
cast[int](rhs) - cast[int](lhs)
|
cast[int](rhs) - cast[int](lhs)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,9 @@
|
||||||
import net, strutils, strtabs, base64, os, strutils
|
import net, strutils, strtabs, base64, os, strutils
|
||||||
import asyncnet, asyncdispatch
|
import asyncnet, asyncdispatch
|
||||||
|
|
||||||
|
when defined(nimPreviewSlimSystem):
|
||||||
|
import std/assertions
|
||||||
|
|
||||||
export Port
|
export Port
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ when defined(windows):
|
||||||
from strutils import replace
|
from strutils import replace
|
||||||
|
|
||||||
when defined(nimPreviewSlimSystem):
|
when defined(nimPreviewSlimSystem):
|
||||||
import std/assertions
|
import std/[assertions, objectdollar]
|
||||||
|
|
||||||
|
|
||||||
when defined(nimHasEffectsOf):
|
when defined(nimHasEffectsOf):
|
||||||
|
|
|
||||||
|
|
@ -884,6 +884,8 @@ when not defined(nimDisableCertificateValidation) and not defined(windows):
|
||||||
{.pop.}
|
{.pop.}
|
||||||
|
|
||||||
when isMainModule:
|
when isMainModule:
|
||||||
|
when defined(nimPreviewSlimSystem):
|
||||||
|
import std/assertions
|
||||||
# A simple certificate test
|
# A simple certificate test
|
||||||
let certbytes = readFile("certificate.der")
|
let certbytes = readFile("certificate.der")
|
||||||
let cert = d2i_X509(certbytes)
|
let cert = d2i_X509(certbytes)
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,9 @@ import
|
||||||
|
|
||||||
import std/private/decode_helpers
|
import std/private/decode_helpers
|
||||||
|
|
||||||
|
when defined(nimPreviewSlimSystem):
|
||||||
|
import std/[assertions, formatfloat]
|
||||||
|
|
||||||
type
|
type
|
||||||
SexpEventKind* = enum ## enumeration of all events that may occur when parsing
|
SexpEventKind* = enum ## enumeration of all events that may occur when parsing
|
||||||
sexpError, ## an error occurred during parsing
|
sexpError, ## an error occurred during parsing
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue