bugfix: compiling after idetools usage is now possible in caas mode

This commit is contained in:
Zahary Karadjov 2013-05-05 00:42:16 +03:00
commit 5a2720e990
2 changed files with 20 additions and 0 deletions

View file

@ -214,6 +214,9 @@ proc rodPass =
if optSymbolFiles in gGlobalOptions: if optSymbolFiles in gGlobalOptions:
registerPass(rodwritePass) registerPass(rodwritePass)
proc codegenPass =
registerPass cgenPass
proc semanticPasses = proc semanticPasses =
registerPass verbosePass registerPass verbosePass
registerPass semPass registerPass semPass
@ -381,6 +384,13 @@ proc CommandSuggest =
msgs.gErrorMax = high(int) # do not stop after first error msgs.gErrorMax = high(int) # do not stop after first error
semanticPasses() semanticPasses()
rodPass() rodPass()
if isServing:
# XXX: hacky work-around ahead
# Currently, it's possible to issue a idetools command, before
# issuing the first compile command. This will leave the compiler
# cache in a state where "no recompilation is necessary", but the
# cgen pass was never executed at all.
codegenPass()
compileProject() compileProject()
if isServing: if isServing:
if optDef in gGlobalOptions: if optDef in gGlobalOptions:

View file

@ -0,0 +1,10 @@
main.nim
> idetools --track:main.nim,5,18 --def main.nim
strutils.toUpper
SuccessX
> idetools --track:main.nim,5,18 --def main.nim
strutils.toUpper
SuccessX
> c
SuccessX