Skip to content

Add script #1

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

Merged
merged 66 commits into from
Feb 6, 2025
Merged

Add script #1

merged 66 commits into from
Feb 6, 2025

Conversation

DelevoXDG
Copy link
Contributor

@DelevoXDG DelevoXDG commented Dec 16, 2024

@maciektr
Copy link
Contributor

When run with

curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/software-mansion/starknetup/4ad983fcf34306ea3f809f0be98a2f5804223118/starknetup.sh | bash

I get

root@fa7d42801b6b:/# curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/software-mansion/starknetup/4ad983fcf34306ea3f809f0be98a2f5804223118/starknetup.sh | bash
starknetup: asdf-vm is required. Do you want to install it now? (y/N):
starknetup: cancelled asdf-vm installation. Please install it manually and re-run this script. For installation instructions, refer to https://asdf-vm.com/guide/getting-started.html.

But I cannot choose "yes" - it goes straight to the second message.

@maciektr maciektr requested review from THenry14 and mkaput February 4, 2025 12:46
@DelevoXDG DelevoXDG requested a review from maciektr February 4, 2025 14:10
Copy link
Member

@THenry14 THenry14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is perfectly usable, but there are still a few rather minor issues

  • output is very cluttered:
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  6768  100  6768    0     0  41441      0 --:--:-- --:--:-- --:--:-- 42037
No plugins installed
No plugins installed
No plugins installed
initializing plugin repository...Cloning into '/root/.asdf/repository'...
remote: Enumerating objects: 6174, done.
remote: Counting objects: 100% (1825/1825), done.
remote: Compressing objects: 100% (55/55), done.
remote: Total 6174 (delta 1807), reused 1770 (delta 1770), pack-reused 4349 (from 2)
Receiving objects: 100% (6174/6174), 1.46 MiB | 10.00 MiB/s, done.
Resolving deltas: 100% (3394/3394), done.
* Downloading scarb release 2.9.2...
scarb 2.9.2 installation was successful!
Downloading and extracting universal-sierra-compiler-v2.3.0-x86_64-unknown-linux-gnu...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 3449k  100 3449k    0     0  3140k      0  0:00:01  0:00:01 --:--:-- 14.6M
universal-sierra-compiler (v2.3.0) has been installed successfully.
redirect url: https://github.com/foundry-rs/starknet-foundry/releases/tag/v0.37.0
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  3112  100  3112    0     0  19409      0 --:--:-- --:--:-- --:--:-- 19696
Downloading and extracting universal-sierra-compiler-v2.3.0-x86_64-unknown-linux-gnu...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 3449k  100 3449k    0     0  3631k      0 --:--:-- --:--:-- --:--:-- 3631k
universal-sierra-compiler (v2.3.0) has been installed successfully.
* Downloading starknet-foundry release 0.37.0...
starknet-foundry 0.37.0 installation was successful!
redirect url: https://github.com/foundry-rs/starknet-foundry/releases/tag/v0.37.0
starknetup: Couldn't finish universal-sierra-compiler installation, try manually adding /root/.local/bin to your PATH.
starknetup: Installation complete. Run 'source /root/.bashrc' or start a new terminal session to use the installed tools.

I did not bother to read this when I got it tbh. We should probably silence all this noise.

  • Messaging is a bit off in a few places (eg when I want to use the script to update all the things I get this info:
    "
    (...)
    starknetup: Installation complete. Run 'source /root/.bashrc' or start a new terminal session to use the installed tools.
    "
    which is not really true

  • I guess there should be no need to run the script twice if there was no asdf beforehand (we can easily get around that)

None of those things are necessarily blocking in my opinion. I know there will be some work to adjust the script to new asdf, so we can easily make these changes later on not to block this PR.

good work 👍

@DelevoXDG
Copy link
Contributor Author

output is very cluttered:
Messaging is a bit off in a few places (eg when I want to use the script to update all the things I get this info:

Sure, added the relevant issues:

I guess there should be no need to run the script twice if there was no asdf beforehand (we can easily get around that)

We previously discussed this and it doesn't seem like there's an obvious way to do this: #1 (comment)

If you have any ideas on how to get around mentioned issues, we can discuss and open an issue for that as well.

@DelevoXDG DelevoXDG merged commit 3ba67e3 into main Feb 6, 2025
4 checks passed
@THenry14
Copy link
Member

THenry14 commented Feb 6, 2025

output is very cluttered:
Messaging is a bit off in a few places (eg when I want to use the script to update all the things I get this info:

Sure, added the relevant issues:

* [Starknetup: declutter output scarb#1952](https://github.com/software-mansion/scarb/issues/1952)

* [Starknetup: improve messaging on updates scarb#1953](https://github.com/software-mansion/scarb/issues/1953)

I guess there should be no need to run the script twice if there was no asdf beforehand (we can easily get around that)

We previously discussed this and it doesn't seem like there's an obvious way to do this: #1 (comment)

If you have any ideas on how to get around mentioned issues, we can discuss and open an issue for that as well.

theese won't be problematic for new versions of asdf (binaries), which I think we should install by default (and having an interface that works for both older and newer asdf-s, in case someone already has one). We can discuss in depth later on.

DelevoXDG added a commit that referenced this pull request Feb 19, 2025
- If asdf is not found, install new asdf version instead of old one
- Don't block further installation of the tools after installing asdf
(following up on
#1 (comment))
- Don't cancel asdf install on unrecognized shell, give instructions to
update PATH instead
- Minor improvements to asdf install confirmation prompt: detect
non-interactive shell and display the relevant err msg
@maciektr maciektr deleted the zdobnikau/add-script branch March 21, 2025 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Starknetup installation script
4 participants