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