diff --git a/.builds/openbsd.yml b/.builds/openbsd.yml index c4db2f6216bea..646e41a5363fc 100644 --- a/.builds/openbsd.yml +++ b/.builds/openbsd.yml @@ -17,7 +17,7 @@ tasks: cd Nim git clone --depth 1 -q https://github.com/nim-lang/csources.git gmake -C csources -j $(sysctl -n hw.ncpuonline) - bin/nim c koch + bin/nim c --lib:lib koch # see https://github.com/nim-lang/Nim/pull/14291 echo 'export PATH=$HOME/Nim/bin:$PATH' >> $HOME/.buildenv - test: | cd Nim diff --git a/build_all.sh b/build_all.sh index d3bba2211c482..1ac2dbddb000f 100644 --- a/build_all.sh +++ b/build_all.sh @@ -45,7 +45,8 @@ build_nim_csources(){ [ -f $nim_csources ] || echo_run build_nim_csources $@ # Note: if fails, may need to `cd csources && git pull` -echo_run bin/nim c --skipUserCfg --skipParentCfg koch +# --lib:lib needed for bootstrap on some platforms, see https://github.com/nim-lang/Nim/pull/14291 +echo_run bin/nim c --skipUserCfg --skipParentCfg --lib:lib koch echo_run ./koch boot -d:release --skipUserCfg --skipParentCfg echo_run ./koch tools --skipUserCfg --skipParentCfg # Compile Nimble and other tools. diff --git a/compiler/nim.nim b/compiler/nim.nim index dba5b8bc3cfb4..f0fd3a97bb0cd 100644 --- a/compiler/nim.nim +++ b/compiler/nim.nim @@ -24,8 +24,8 @@ import idents, lineinfos, cmdlinehelper, pathutils -from browsers import openDefaultBrowser -from nodejs import findNodeJs +from std/browsers import openDefaultBrowser +from std/nodejs import findNodeJs when hasTinyCBackend: import tccgen diff --git a/koch.nim b/koch.nim index 8b7eecf7cb432..df92e8b15465d 100644 --- a/koch.nim +++ b/koch.nim @@ -27,8 +27,9 @@ when defined(amd64) and defined(windows) and defined(vcc): when defined(i386) and defined(windows) and defined(vcc): {.link: "icons/koch-i386-windows-vcc.res".} -import - os, strutils, parseopt, osproc +import std/[os, strutils, parseopt, osproc] + # if this fails with: `Error: cannot open file: std/os`, see + # https://github.com/nim-lang/Nim/pull/14291 for explanation + how to fix. import tools / kochdocs import tools / deps diff --git a/lib/pure/typetraits.nim b/lib/pure/typetraits.nim index 0ac6d0d1ca3e2..9a215a35312ae 100644 --- a/lib/pure/typetraits.nim +++ b/lib/pure/typetraits.nim @@ -93,8 +93,7 @@ since (1, 1): type StaticParam*[value: static type] = object ## used to wrap a static value in `genericParams` -# NOTE: See https://github.com/nim-lang/Nim/issues/13758 - `import std/macros` does not work on OpenBSD -import macros +import std/macros macro genericParamsImpl(T: typedesc): untyped = # auxiliary macro needed, can't do it directly in `genericParams`