nimsuggest supports include files properly; added the compiler itself as a testcase
This commit is contained in:
parent
eb2455075e
commit
0c49822b50
4 changed files with 29 additions and 7 deletions
|
|
@ -157,13 +157,11 @@ proc execute(cmd: IdeCmd, file, dirtyfile: string, line, col: int;
|
|||
dirtyfile.len == 0:
|
||||
discard "no need to recompile anything"
|
||||
else:
|
||||
#resetModule dirtyIdx
|
||||
#if dirtyIdx != gProjectMainIdx:
|
||||
# resetModule gProjectMainIdx
|
||||
graph.markDirty dirtyIdx
|
||||
graph.markClientsDirty dirtyIdx
|
||||
let modIdx = graph.parentModule(dirtyIdx)
|
||||
graph.markDirty modIdx
|
||||
graph.markClientsDirty modIdx
|
||||
if gIdeCmd != ideMod:
|
||||
graph.compileProject(cache, dirtyIdx)
|
||||
graph.compileProject(cache, modIdx)
|
||||
if gIdeCmd in {ideUse, ideDus}:
|
||||
let u = if suggestVersion >= 2: graph.symFromInfo(gTrackPos) else: usageSym
|
||||
if u != nil:
|
||||
|
|
|
|||
7
tools/nimsuggest/tests/tinclude.nim
Normal file
7
tools/nimsuggest/tests/tinclude.nim
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
discard """
|
||||
$nimsuggest --tester compiler/nim.nim
|
||||
>def compiler/semexprs.nim:13:50
|
||||
def;;skType;;ast.PSym;;PSym;;*ast.nim;;668;;2;;"";;100
|
||||
>def compiler/semexprs.nim:13:50
|
||||
def;;skType;;ast.PSym;;PSym;;*ast.nim;;668;;2;;"";;100
|
||||
"""
|
||||
Loading…
Add table
Add a link
Reference in a new issue