IC navigator: added support for include files (#17784)

* ic fixed navigator crash when track wrong/missed

Also fixed an issue with getNimcacheDir not observing the outDir.

* closer, but not sure how to test[skip ci][ci skip]

* IC navigator: added support for include files

* update

* make posix happy via expandFilename

* update

Co-authored-by: Saem Ghani <saemghani+github@gmail.com>
This commit is contained in:
Andreas Rumpf
2021-04-19 22:37:09 +02:00
committed by GitHub
parent 24abe10aa8
commit 3b80f0dc8e
9 changed files with 111 additions and 33 deletions

View File

@@ -0,0 +1,2 @@
# An include file.
foo(3)

View File

@@ -0,0 +1,29 @@
discard """
cmd: "nim check $options --defusages:$file,12,7 $file"
nimout: '''def tincludefile_temp.nim(11, 10)
usage tincludefile_temp.nim(12, 8)
'''
"""
proc foo(x: int) =
echo x
foo(3)
echo "yes", 1 != 3
#!EDIT!#
discard """
cmd: "nim check $options --defusages:$file/../minclude.nim,2,2 $file"
nimout: '''def tincludefile_temp.nim(10, 6)
usage minclude.nim(2, 1)
'''
"""
proc foo(x: int) =
echo x
include minclude

View File

@@ -1,5 +1,5 @@
discard """
cmd: "nim check $options --track:$file,12,7 $file"
cmd: "nim check $options --defusages:$file,12,7 $file"
nimout: '''def tnav1_temp.nim(11, 10)
usage tnav1_temp.nim(12, 8)
'''
@@ -16,7 +16,7 @@ echo "yes", 1 != 3
#!EDIT!#
discard """
cmd: "nim check $options --track:$file,15,2 $file"
cmd: "nim check $options --defusages:$file,15,2 $file"
nimout: '''def tnav1_temp.nim(12, 6)
usage tnav1_temp.nim(15, 1)
'''