Skip to content

Commit

Permalink
fix nim cpp bootstrap error: error: no member named raise_id
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour committed Jan 16, 2019
1 parent b9981da commit 3a29fb6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
8 changes: 5 additions & 3 deletions koch.nim
Original file line number Diff line number Diff line change
Expand Up @@ -286,11 +286,13 @@ proc boot(args: string) =
copyExe(findStartNim(), 0.thVersion)
for i in 0..2:
echo "iteration: ", i+1
let extraOption = if i == 0:
"--skipUserCfg"
var extraOption = ""
if i == 0:
extraOption.add " --skipUserCfg"
# forward compatibility: for bootstrap (1st iteration), avoid user flags
# that could break things, see #10030
else: ""
extraOption.add " -d:nimBoostrapCsources0_19_0"
# remove this when csources get updated
exec i.thVersion & " $# $# $# --nimcache:$# compiler" / "nim.nim" %
[bootOptions, extraOption, args, smartNimcache]
if sameFileContent(output, i.thVersion):
Expand Down
7 changes: 6 additions & 1 deletion lib/system.nim
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,12 @@ type
trace: string
else:
trace: seq[StackTraceEntry]
raiseId: uint # set when exception is raised
when defined(nimBoostrapCsources0_19_0):
# see #10315, bootstrap with `nim cpp` from csources gave error:
# error: no member named 'raise_id' in 'Exception'
raiseId: uint # set when exception is raised
else:
raiseId: uint # set when exception is raised
up: ref Exception # used for stacking exceptions. Not exported!

Defect* = object of Exception ## \
Expand Down

0 comments on commit 3a29fb6

Please sign in to comment.