Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check, if possible, that a compatible version of Scarb is in use #2719

Open
amanusk opened this issue Nov 27, 2024 · 1 comment
Open

Check, if possible, that a compatible version of Scarb is in use #2719

amanusk opened this issue Nov 27, 2024 · 1 comment
Assignees
Labels
feature New feature request/description sncast snforge

Comments

@amanusk
Copy link
Contributor

amanusk commented Nov 27, 2024

Which component is your feature related to?

Forge

Feature Request

When using versions that require a minimal Scarb version to operate correctly, display an informative error that an incompatible version of Scarb is being used.

For example
If someone installed an old Scarb version with a script, and also with adsf, the older version might appear first in the path and be used, even if there is a .tool-versions file present in the repository.

Example of a repository with an older 2.6.4 installed and found in the path:

snforge test


error: failed to lookup for `openzeppelin_token ^0.19.0` in registry: registry+https://there-is-no-default-registry-yet.com/

Caused by:
    0: failed to fetch registry config
    1: error sending request for url (https://there-is-no-default-registry-yet.com/config.json): error trying to connect: dns error: failed to lookup address information: Name or service not known
    2: error trying to connect: dns error: failed to lookup address information: Name or service not known
    3: dns error: failed to lookup address information: Name or service not known
    4: failed to lookup address information: Name or service not known
[ERROR] error: could not gather project metadata from Scarb due to previous error: `scarb metadata` exited with error

This error does tell me the users anything about what might be wrong with there setup.

Another example,
If the use snforge init with an older Scarb version installed, the created directory will be a scarb-test project and not an snfoundy project

@cptartur
Copy link
Member

Related #2720

@cptartur cptartur added sncast snforge feature New feature request/description and removed new labels Nov 27, 2024
@cptartur cptartur moved this from New to TODO in Starknet foundry Nov 27, 2024
@cptartur cptartur self-assigned this Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature request/description sncast snforge
Projects
Status: TODO
Development

No branches or pull requests

2 participants