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
We should always try to find a matching Scarb workspaces/cairo_project.toml file for any opened *.cairo file.
How looking for asdf-installed Scarb should look like
If we fail to do so, try to look for any global Scarb installation.
If asdf shim says that it cannot pick any global (for example, there are multiple scarb installed, but none is set as global), we should assume the latest stable installation available on the user's machine.
Example
Example what could go wrong before this task is/was solved
When VSC is opened (from UI) it uses the global scarb because of the context it has been opened in.
This behavior should be changed because when we open project with overriden scarb i.e. in .tool-versions - it should be used instead.
Mechanism of determining the version should be universal and not work only with .tool-versions but with other solutions as well (TBD different ones that could potentially be used)
Problems with this solution
There is going to be a conflict when 2 dependent packages are going to be opened from within 1 vscode workspace (we cannot determine which diagnostics we should display)
The text was updated successfully, but these errors were encountered:
Basically, fix this TODO:
cairo/vscode-cairo/src/cairols.ts
Lines 91 to 92 in fdf3d70
There is an example that we should carefully implement on our side:
https://github.com/microsoft/vscode-extension-samples/blob/main/lsp-multi-server-sample/client/src/extension.ts
We should always try to find a matching Scarb workspaces/
cairo_project.toml
file for any opened*.cairo
file.How looking for asdf-installed Scarb should look like
If we fail to do so, try to look for any global Scarb installation.
If asdf shim says that it cannot pick any global (for example, there are multiple scarb installed, but none is set as global), we should assume the latest stable installation available on the user's machine.
Example
Example what could go wrong before this task is/was solved
When VSC is opened (from UI) it uses the global scarb because of the context it has been opened in.
This behavior should be changed because when we open project with overriden scarb i.e. in
.tool-versions
- it should be used instead.Mechanism of determining the version should be universal and not work only with
.tool-versions
but with other solutions as well (TBD different ones that could potentially be used)Problems with this solution
The text was updated successfully, but these errors were encountered: