cairo icon indicating copy to clipboard operation
cairo copied to clipboard

bug: CairoLS tends to invoke Scarb unnecessarily too frequently when editing Scarb.toml

Open mkaput opened this issue 10 months ago • 3 comments

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!

mkaput avatar Apr 03 '24 17:04 mkaput

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-workspaces open, each workspace can/does contain more than 1 project folders.

milancermak avatar Apr 03 '24 20:04 milancermak

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.

boyuanx avatar Apr 03 '24 22:04 boyuanx

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.

mkaput avatar Apr 05 '24 08:04 mkaput

Superseding this bug task with #6124 that describes a bigger feature that will fix this bug.

mkaput avatar Aug 02 '24 15:08 mkaput