Skip to content

Commit

Permalink
properly fix nim-lang#12389
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour committed May 10, 2020
1 parent dda6f3f commit 077a95a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .builds/openbsd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions compiler/nim.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions koch.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions lib/pure/typetraits.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down

0 comments on commit 077a95a

Please sign in to comment.