Closed mklinga closed 10 years ago
Currently, killall node
is the way to force a full reload. I wasn't able to reproduce this problem. The kind of circular dependency (file 1 using an instance from file 2 of a constructor it itself defines) is sort of rare, but theoretically, it should work (the new value for variable A should propagate to the new
in file 2, and thus update the type of the object in instance
). Are you using the current (git) version of Tern? There were some fixes to the mechanism that refreshes variables a few months ago.
Sorry for long delay in answering, this seems to be no longer relevant (I cannot reproduce the issue anymore), so this may be closed.
Hi! I stumbled into a small issue. I think I'm best off showing how to reproduce it:
file1.js:
file2.js:
now at file1.js:
provides no completion options even though :TernDef finds correct declaration in file2.js, and from there :TernDef finds function
A()
correctly in file1.js. After I have restarted vim (and thus tern server) with"loadEagerly": "*.js"
completion in file1.js works as supposed to. WithoutloadEagerly
this doesn't happen even if I open both files.After reloading, completion on
instance
works until I change functionA()
. After that autocompletion can't find changed contents ofinstance
anymore, which, I think, is understandable since it's now a different object.So what I'm basically asking is if there is some way to "refresh" all files in the project for tern? Only relation between these files is that they happen to be in the same folder, so no require()-magic or anything like that.