removes channels_builtin when enabling nimPreviewSlimSystem (#20713)

This commit is contained in:
ringabout 2022-10-31 16:56:05 +08:00 • committed by GitHub
commit 0a1f204f0f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 9 additions and 18 deletions

View file

@ -38,6 +38,9 @@
- `PInt32`, `PInt64`, `PFloat32`, `PFloat64`, aliases to - `PInt32`, `PInt64`, `PFloat32`, `PFloat64`, aliases to
`ptr int32`, `ptr int64`, `ptr float32`, `ptr float64` `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 `gc:v2` option is removed.
- The `mainmodule` and `m` options are 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 Basic Nim thread support. **Note:** This is part of the system module. Do not
import it explicitly. Enabled with `--threads:on`:option:. 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 Core
---- ----

View file

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

View file

@ -47,7 +47,6 @@ runnableExamples:
## See also ## See also
## ======== ## ========
## * `lists module <lists.html>`_ for singly and doubly linked lists and rings ## * `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 import std/private/since

View file

@ -14,7 +14,6 @@
## See also ## See also
## ======== ## ========
## * `threads module <threads.html>`_ for basic thread support ## * `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 ## * `locks module <locks.html>`_ for locks and condition variables
## * `asyncdispatch module <asyncdispatch.html>`_ for asynchronous IO ## * `asyncdispatch module <asyncdispatch.html>`_ for asynchronous IO

View file

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

View file

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