Open Thomas-Torggler-EOS opened 4 days ago
I'll accept this since I think it's worth investing into this. However, the issue is not caching. The problem is that the extension and VSCode are not processing external changes properly.
We'll definitely work on improving the GitHub branch change scenario. For the symbols, it is possible that this is a larger investment which might take more time.
As far as symbols go, I do think it is (somewhat) a caching problem:
MemoryCachedSymbolReferenceLoader
using InvalidateDependencies
.UpdateSymbolReferences
is called on VsCodeWorkspace
and thus reloading the ones that were just downloaded.If we had a command in VSCode that would replicate this, at least the symbols could be manually refreshed.
As far as the source files go, I did not investigate and that is surely a different kind of behaviour / issue.
Agree with @BazookaMusic . We will try to make github branch changes not to blow up the language server and the diagnostics service. Exposing the command is a bit more complicated. There are more then just what you wrote. There are coupling to other subsystems like the project system, diagnostics service, tracking compilation. It makes things a bit more complicated to be treated as a simple bug.
1. Describe the bug The AL language editor host executable has an internal cache where it holds things like referenced symbols and project symbols and so on. I assume for performance reasons. This cache however is not always refreshed correctly and requires the user to run a "Reload Window" or reload the entire project workspace to refresh it.
I have a few scenarios where this happens and is a problem for me:
app.json
triggers a cache refresh, but only when done so from inside VS Code. Ifapp.json
is modified externally, AL language does not detect a change to it and thus does not refresh anything.2. To Reproduce Steps to reproduce the behavior:
Scenario 1:
.alpackages
folder.Scenario 2:
.alpackages
folder.app.json
and reset the version to what it was before.Scenario 3:
3. Expected behavior Option 1: detect file changes even when made from outside the project. There are numerous tools around now that interface with AL projects, tying it's caching mechanism to only what happens under AL languages watch is very limiting. You could, for example, bind this to the
app.json
file only. Anyone who wants to cause a cache refresh from outside VS Code then just has to touch that file and you would not have to watch all project files for changes. Option 2: give us a command that let's us explicitly cause a cache refresh without having to reload the entire editor. This command would then also be required to be callable from other extensions, pretty please.4. Actual behavior The cache often becomes stale and requires me to reload my editor, causing lots of reload times.
5. Versions: