bugfix: compiling after idetools usage is now possible in caas mode
This commit is contained in:
parent
519d5b834a
commit
5a2720e990
2 changed files with 20 additions and 0 deletions
|
|
@ -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:
|
||||||
|
|
|
||||||
10
tests/caas/def-def-compile.txt
Normal file
10
tests/caas/def-def-compile.txt
Normal 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
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue