diff options
author | quantimnot <54247259+quantimnot@users.noreply.github.com> | 2021-10-07 06:16:58 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-07 12:16:58 +0200 |
commit | 19774a72e7fcc7c5b7649bb956b149362c05ea15 (patch) | |
tree | 6fecbf856b662ba9e1ed2d363d92cc51405b9785 /tools | |
parent | f8d6a53227595ade671b97f48e43c9e80c9ac80e (diff) | |
download | Nim-19774a72e7fcc7c5b7649bb956b149362c05ea15.tar.gz |
Fixed `strictFuncs` support for `std/pegs` (#18951)
* Fixed `strictFuncs` support for `std/pegs` Enabled `std/pegs` in the `strictFuncs` import test. Fixes #18057 Fixes #16892 See #18111 * Rebased from `devel` * Conditionally compile `std/pegs` in `koch` This is for supporting `csources` bootstrap. Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/kochdocs.nim | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tools/kochdocs.nim b/tools/kochdocs.nim index fe3335c0f..0c5c8f4a3 100644 --- a/tools/kochdocs.nim +++ b/tools/kochdocs.nim @@ -1,6 +1,9 @@ ## Part of 'koch' responsible for the documentation generation. -import os, strutils, osproc, sets, pathnorm, pegs, sequtils +import os, strutils, osproc, sets, pathnorm, sequtils +# XXX: Remove this feature check once the csources supports it. +when defined(nimHasCastPragmaBlocks): + import std/pegs from std/private/globs import nativeToUnixPath, walkDirRecFilter, PathEntry import "../compiler/nimpaths" @@ -338,7 +341,9 @@ proc buildDocs*(args: string, localOnly = false, localOutDir = "") = if not localOnly: buildDocsDir(args, webUploadOutput / NimVersion) - let gaFilter = peg"@( y'--doc.googleAnalytics:' @(\s / $) )" - args = args.replace(gaFilter) + # XXX: Remove this feature check once the csources supports it. + when defined(nimHasCastPragmaBlocks): + let gaFilter = peg"@( y'--doc.googleAnalytics:' @(\s / $) )" + args = args.replace(gaFilter) buildDocsDir(args, localOutDir) |