cairo
cairo copied to clipboard
bug: CairoLS tends to invoke Scarb unnecessarily too frequently when editing Scarb.toml
Bug Report
Cairo version:
43afafdcc947202a918fe872288e8f601c772554
Current behavior:
https://github.com/starkware-libs/cairo/assets/3450050/4b733e8d-bd7f-4a52-b2b7-e1b17bf8dd21
Expected behavior:
The notifications' abomination should not happen.
The solution for this is to cache Scarb state. To be done during the grand rewrite.
Steps to reproduce:
See video.
Other information:
Thanks, @milancermak, for the video!
Just to clarify, this happens not just with Scarb.toml, but when editing and saving any file in the workspace.
IDK if it makes a difference, but I often have multiple Code instances of .code-workspace
s open, each workspace can/does contain more than 1 project folders.
Scarb seems to be invoked excessively for extremely simple code changes (even within the same line) which makes coding very very slow as I have to wait for it to finish, otherwise the code would fail to compile.
I am aware of the fact that CairoLS is invoking Scarb too much, and resolving that problem should fix this particular issue.
As for multiple workspaces support, this is a thing that I believe nobody has been thinking about yet and the codebases of both the LS and VSC extensions are not writing with supporting this in mind. If this works in any way -- it does rather coincidentally than intention.
Superseding this bug task with #6124 that describes a bigger feature that will fix this bug.