dojoengine / book

The Dojo Book
https://book.dojoengine.org
MIT License
34 stars 61 forks source link

Handle installed Scarb version #243

Closed gianalarcon closed 2 months ago

gianalarcon commented 2 months ago

Closes #235

To ensure the proper functioning of the language server, the Scarb system version must be equal to or higher than the project's Cairo version.

vercel[bot] commented 2 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
book ✅ Ready (Inspect) Visit Preview Mar 29, 2024 3:10am
glihm commented 2 months ago

There is no instructions here on how to specify the Scarb version to install.

I discovered this issue because I exactly this, updated Scarb to the latest (for Cairo 2.6) and my language server broke because my project uses Cairo 2.4. Installing Scarb for Cairo 2.4 fixed the server

Thanks for the feedback @rsodre, only by installing the corresponding version with asdf worked?

rsodre commented 2 months ago

Thanks for the feedback @rsodre, only by installing the corresponding version with asdf worked?

yes

glihm commented 2 months ago

Thanks for the feedback @rsodre, only by installing the corresponding version with asdf worked?

yes

In this case @gianalarcon I think we should guide the user to use asdf. It's definitely the best way for the user to manage several scarb version. We may also give the curl command you give, but I would say it's better to guide the user having scarb with asdf. Any thoughts?

EDIT: And with the curl command, could you please use as @rsodre mentioned as specific version instead of latest? :)

gianalarcon commented 2 months ago

Thanks for the feedback @rsodre, only by installing the corresponding version with asdf worked?

yes

In this case @gianalarcon I think we should guide the user to use asdf. It's definitely the best way for the user to manage several scarb version. We may also give the curl command you give, but I would say it's better to guide the user having scarb with asdf. Any thoughts?

I agree with you. Gonna add the asdf way

rsodre commented 2 months ago

Sorry, I think I misunderstood your question, I didn't know what asdf was.

curl is fine! But I had to add the specific version of Scarb I wanted, that's the point. As described on the original issue #235 :

curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh -s -- -v 2.4.0