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

[installer] require rustup on the system #4668

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

nickfrosty
Copy link

Problem

the agave installer ultimately requires having rustup installed in order to link the platform tools to become the solana toolchain, but does not check for it. so if a developer installs rust via brew or some other means, they may not have rustup available on their machine. and ultimately run into issues with the solana rust toolchain not being available

Summary of Changes

  • add a check in the agave-install-init script for rustup
  • reordered the install docs to have the prereqs closer to the top
  • added rustup to the brew install command for prereqs

Fixes #4651

@mergify mergify bot requested a review from a team January 28, 2025 15:57

## Prerequisites

Before installing the Solana CLI tools (either the prebuilt binaries or building from source), make sure to install the following prerequisites:
Copy link

Choose a reason for hiding this comment

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

I think there is some nuance here for different groups of people who might be using the CLI:

  • Developers
  • "Regular" users who may just be doing simple stuff like using the CLI for transfers or native staking

The first group will absolutely want these tools, but the latter might be led to believe they need to install a bunch of things they don't need.

Copy link
Author

@nickfrosty nickfrosty Jan 30, 2025

Choose a reason for hiding this comment

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

that's fair. I could clarify this prereqs section and header that its for people who want to build from source or develop programs

Copy link

Choose a reason for hiding this comment

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

That sounds reasonable to me !

Copy link
Author

Choose a reason for hiding this comment

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

I went ahead and just moved the prereqs section back under "building from source"

@@ -154,7 +154,7 @@ installed on your system.

### Prerequisites

Before building from source, make sure to install the following prerequisites:
Before building from source, or developing Solana programs, make sure to install the following prerequisites:
Copy link

Choose a reason for hiding this comment

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

With the added bit about developing programs, this sentence sounds a little "off" to me now. What do you think about flipping it around:

Install the following prerequisites before building from source or developing Solana programs:

Looking in this file, I see several other sentences that start with "Install Yinstead ofBefore X, install Y` so I think my suggestion would make this line more consistent with the overall doc

Copy link
Author

Choose a reason for hiding this comment

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

works for me

@@ -50,6 +50,7 @@ main() {
need_cmd rm
need_cmd sed
need_cmd grep
need_cmd rustup
Copy link

Choose a reason for hiding this comment

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

Given that we're now telling devs that need to install rustup, should this still be here ?

Copy link
Author

Choose a reason for hiding this comment

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

evne thought the docs state to install it, if a dev does not have it installed the platform tools code will silently fail to create the solana toolchain. having the command check prevents it

Copy link

@steviez steviez Jan 30, 2025

Choose a reason for hiding this comment

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

Edit: My previous wording in this comment was unclear.

What is the result of this change ? Will rustup get automatically installed if it was not already? Or, will it now raise a warning and/or error out if rustup is unavailable ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[installer] agave installer requires rustup but does not check for it
2 participants