Closed gcv closed 4 years ago
@orialb: I finished a first attempt at implementing this feature, which we discussed on Discourse. I still have to write some tests for it, but it seems to work for me so far.
The feature branch is not merged yet: https://github.com/gcv/julia-snail/tree/include-detection Documentation link: https://github.com/gcv/julia-snail/tree/include-detection#module-nested-includes
If you have time to try this branch, I'll appreciate any comments or bug reports.
Awesome! I will have a look this week.
Just wanted to let you know that I started using the feature branch on my machine. From a quick check it seems that completion and xref commands are working across module files, very nice!
Unfortunately at the moment I am mainly writing Latex instead of Julia code, so I didn't have the chance to really test this in regular usage. Hopefully soon I will have some excuse to do some coding work for one of my projects so I could test this more thoroughly.
Cool. I just found and fixed several bugs in that feature, and added some tests. Branch is now merged in and ready for people to find bugs in it.
Consider the following case:
File
MyModule.jl
:File
a1.jl
:The contents of file
a1.jl
are part ofMyModule
, and should be detected as such by Snail.The parser should detect
include
calls inside (potentially nested) modules, and when called upon to detect what modulea1.jl
is in returnMyModule
instead ofMain
. This should be doable with an in-memory data structure, mapping from filename to module.