removes channels_builtin when enabling nimPreviewSlimSystem (#20713)

This commit is contained in:
ringabout
2022-10-31 16:56:05 +08:00
committed by GitHub
parent e1ddd2d524
commit 0a1f204f0f
7 changed files with 9 additions and 18 deletions

View File

@@ -38,6 +38,9 @@
- `PInt32`, `PInt64`, `PFloat32`, `PFloat64`, aliases to
`ptr int32`, `ptr int64`, `ptr float32`, `ptr float64`
- Enabling `-d:nimPreviewSlimSystem` removes the import of `channels_builtin` in
in the `system` module.
- The `gc:v2` option is removed.
- The `mainmodule` and `m` options are removed.

View File

@@ -41,10 +41,6 @@ Automatic imports
Basic Nim thread support. **Note:** This is part of the system module. Do not
import it explicitly. Enabled with `--threads:on`:option:.
* [channels_builtin](channels_builtin.html)
Nim message passing support for threads. **Note:** This is part of the
system module. Do not import it explicitly. Enabled with `--threads:on`:option:.
Core
----

View File

@@ -22,6 +22,9 @@ runnableExamples("-r:off"):
if line.len > 0: echo line
echo "exiting"
when defined(nimPreviewSlimSystem):
import std/syncio
when defined(windows):
proc readLineFromStdin*(prompt: string): string {.
tags: [ReadIOEffect, WriteIOEffect].} =

View File

@@ -47,7 +47,6 @@ runnableExamples:
## See also
## ========
## * `lists module <lists.html>`_ for singly and doubly linked lists and rings
## * `channels module <channels_builtin.html>`_ for inter-thread communication
import std/private/since

View File

@@ -14,7 +14,6 @@
## See also
## ========
## * `threads module <threads.html>`_ for basic thread support
## * `channels module <channels_builtin.html>`_ for message passing support
## * `locks module <locks.html>`_ for locks and condition variables
## * `asyncdispatch module <asyncdispatch.html>`_ for asynchronous IO

View File

@@ -2206,7 +2206,8 @@ when notJSnotNims and hasAlloc:
include "system/repr"
when notJSnotNims and hasThreadSupport and hostOS != "standalone":
include "system/channels_builtin"
when not defined(nimPreviewSlimSystem):
include "system/channels_builtin"
when notJSnotNims and hostOS != "standalone":

View File

@@ -137,10 +137,6 @@ niminst.md
mm.md
""".splitWhitespace().mapIt("doc" / it)
doc0 = """
lib/system/channels_builtin.nim
""".splitWhitespace() # ran by `nim doc0` instead of `nim doc`
withoutIndex = """
lib/wrappers/mysql.nim
lib/wrappers/sqlite3.nim
@@ -185,7 +181,6 @@ when (NimMajor, NimMinor) < (1, 1) or not declared(isRelativeTo):
proc getDocList(): seq[string] =
var docIgnore: HashSet[string]
for a in doc0: docIgnore.incl a
for a in withoutIndex: docIgnore.incl a
for a in ignoredModules: docIgnore.incl a
@@ -260,7 +255,7 @@ proc buildDoc(nimArgs, destPath: string) =
# call nim for the documentation:
let rst2html = getMd2html()
var
commands = newSeq[string](rst2html.len + len(doc0) + len(doc) + withoutIndex.len)
commands = newSeq[string](rst2html.len + len(doc) + withoutIndex.len)
i = 0
let nim = findNim().quoteShell()
for d in items(rst2html):
@@ -268,11 +263,6 @@ proc buildDoc(nimArgs, destPath: string) =
[nimArgs, gitUrl,
destPath / changeFileExt(splitFile(d).name, "html"), d]
i.inc
for d in items(doc0):
commands[i] = nim & " doc0 $# --git.url:$# -o:$# --index:on $#" %
[nimArgs, gitUrl,
destPath / changeFileExt(splitFile(d).name, "html"), d]
i.inc
for d in items(doc):
let extra = if isJsOnly(d): "--backend:js" else: ""
var nimArgs2 = nimArgs