You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following on from dynamic config, I want to re-initialise tern if .tern-project has changed, or if one of my workspace plugin / lib files has changes.
This will allow my to develop tern and test tern configuration within brackets. I've got the logic to work out when I need to re-initialise, but don't see a clear way to do that. I see that the config is reloaded, but lib files changes I make are not reflected in the tooltips.
Is there a way to re-initialise tern in this instance? If not, let me know, and I'll do something.
The text was updated successfully, but these errors were encountered:
ok, in fact, the issue only seems to be with lib files, I think require is caching the lib LocalServer.js:151 so it does not reload the text! if it's already loaded.
This is not an issue for plugin files, as they are loaded differently and reload automatically.
@GabrielPage as you already found out, I am re-instantiating tern when the config file changes.
There is something here that I like. And it is to enable some generic way to watch file changes. Maybe adding a watch setting in .tern-project?
So here we can add another then step in the promise sequence probably called watch.
This is probably how the watch would register to watch for files.
And we would fire and event like analogous to this one.
The issue at this point would be requirejs that caches files, as you mentioned. I would be ok switching to a stream reader to load files, but the general use case needs the files cached. So we need a way to have a cache where items in it can be expired. Weakmaps would be REALLY nice here, but we dont have that yet in JavaScript.
I will think about this issue, but if you come up with something please don't hesitate to send a PR my way and we can work the kinks out. :)
Following on from dynamic config, I want to re-initialise tern if .tern-project has changed, or if one of my workspace plugin / lib files has changes.
This will allow my to develop tern and test tern configuration within brackets. I've got the logic to work out when I need to re-initialise, but don't see a clear way to do that. I see that the config is reloaded, but lib files changes I make are not reflected in the tooltips.
Is there a way to re-initialise tern in this instance? If not, let me know, and I'll do something.
The text was updated successfully, but these errors were encountered: