mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 05:50:30 +00:00
bugfix: compiling after idetools usage is now possible in caas mode
This commit is contained in:
@@ -214,6 +214,9 @@ proc rodPass =
|
||||
if optSymbolFiles in gGlobalOptions:
|
||||
registerPass(rodwritePass)
|
||||
|
||||
proc codegenPass =
|
||||
registerPass cgenPass
|
||||
|
||||
proc semanticPasses =
|
||||
registerPass verbosePass
|
||||
registerPass semPass
|
||||
@@ -381,6 +384,13 @@ proc CommandSuggest =
|
||||
msgs.gErrorMax = high(int) # do not stop after first error
|
||||
semanticPasses()
|
||||
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()
|
||||
if isServing:
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user