zeroc-ice / vscode-slice

Slice syntax highlighter for Visual Studio Code
BSD 3-Clause "New" or "Revised" License
5 stars 4 forks source link

Changing File Name Outside of Configuration Set Locks Out File Changes #39

Closed InsertCreativityHere closed 9 months ago

InsertCreativityHere commented 9 months ago

On disk, a user has a folder named Barr. In their configuration though, they type Bar.

This triggers on_update_configuration, which triggers a compilation. slicec fails to resolve the path, since Bar doesn't exist on disk. It returns (ast: [], files: [], diagnostics: [io_errors]). Unrelated to this issue, but we should report these diagnostics to the user (see #38).

More importantly, slicec gave us an empty file list. We store this in CompilationState. Because of this, the language server thinks that the configuration-set has no files in it.

And, to be efficient, whenever a file changes, we only trigger compilations for configuration-sets including this file. So, even when the user fixes the name of the folder, we go to trigger compilations, see that the configuration-set has no files, and skip it. Effectively locking this error into place forever.