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

Remove pre-requesites installation #101

Open
mario4tier opened this issue Jun 19, 2024 · 6 comments
Open

Remove pre-requesites installation #101

mario4tier opened this issue Jun 19, 2024 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@mario4tier
Copy link
Member

mario4tier commented Jun 19, 2024

Update 6/20/24: Goal changed to eliminate the Sui pre-requesites.

Goals

(1) Should detect the Sui prerequesites missing and automatically (or offer) to the user to install them. Suibase CLI should automatically download, install and upgrade suibase-daemon binaries without user intervention.

(2) The installation of the VSCode extension should have the consequence of installing Suibase CLI and the Sui pre-requesites automatically. Ideally, that means to be fully up and running only by installing the extension!

Related code
VSCode extension for now just do diagnostic... not automated installation:

image
Excerpt from https://github.com/ChainMovers/suibase/blob/main/typescript/vscode-extension/src/BackendSync.ts

The CLI look for pre-requesites when attempting to build something:

image
Excerpt from https://github.com/ChainMovers/suibase/blob/main/scripts/common/__globals.sh

@mario4tier mario4tier added the enhancement New feature or request label Jun 19, 2024
@kkomelin
Copy link
Contributor

Hey @mario4tier ,

As I mentioned during our chat discussion, some of my users (kkomelin/sui-dapp-starter) complained about the complexity of the Sui prerequisites installation.

My suggestion was to develop OS-specific shell scripts to install everything in one line like so:

# Windows
iwr https://get.pnpm.io/install.ps1 -useb | iex
# Linux
wget -qO- https://get.pnpm.io/install.sh | sh -

ref https://pnpm.io/installation

And I thought about suggesting adding them to the main Sui docs/repo because I think it's a higher level problem.

I like the checks which Suibase has. It may be enough. What is the best place to add the scrips from your point of view?

@kkomelin
Copy link
Contributor

kkomelin commented Jun 19, 2024

Currently Sui docs offer one-liners already:

brew install sui
# or 
choco install sui

But I don't know a person who would have brew or choco installed on Linux/Ubuntu. Native package managers here are apt and snap. Maybe it's easier to suggest Sui adding a Snap package for Linux/Ubuntu and that would eliminate the need of manual dependency install.

@mario4tier
Copy link
Member Author

mario4tier commented Jun 19, 2024

I see.

Keep in mind that brew/choco install only the binaries, not the dependencies.

Seems their latest doc favor binaries installations, therefore eliminating the need for pre-requesites for most users (>99% ?).

IMHO, it is now more urgent to also eliminate Suibase dependency on these Sui pre-requesites (currently always needed for building the Rust suibase-daemon).

===

For suibase, the binary installation should remain to be done with downloading "assets". Not brew/choco etc... the reasons are:

  • updates through brew "lag" the assets release, sometimes by many days. I don't know if better/worst with choco, but this is a part of the process we do not control.

  • suibase supports forcing an older "github tag" assets version (needed when Mysten Labs break something in their devnet branch. This did happen twice already). Not sure how to easily manage that with brew/choco.

  • suibase needs to control where the binaries are installed.

Summary

I agree that brew/choco etc... are out-of-scope for Suibase and are better to be discuss with Mysten Labs directly.

@kkomelin
Copy link
Contributor

kkomelin commented Jun 20, 2024

Thank you @mario4tier ,

Agree, let's leave streamlining Sui cli prerequisites installation to the Sui guys. Can suggest this improvement to them later with lower priority.

As for Suibase, it looks like if we could implement building suibase-daemon in the cloud for all OSs automatically, we would not need to ask users to install Sui prerequisites at all, which would be ideal from my point of view because it would allow to simplify Suibase and VSCode Plugin checks significantly. Shall we consider this option?

@mario4tier mario4tier changed the title Automate some pre-requesites installation ~~Automate~~ Remove pre-requesites installation Jun 20, 2024
@mario4tier mario4tier changed the title ~~Automate~~ Remove pre-requesites installation Remove pre-requesites installation Jun 20, 2024
@mario4tier
Copy link
Member Author

mario4tier commented Jun 20, 2024

As for Suibase, it looks like if we could implement building suibase-daemon in the cloud for all OSs automatically, we would not need to ask users to install Sui prerequisites at all, which would be ideal from my point of view because it would allow to simplify Suibase and VSCode Plugin checks significantly. Shall we consider this option?

@kkomelin

Yes. I fully agree.

I will try to complete this by end of August (will be done with github actions, which already build the suibase-daemon for automated tests).

The Suibase assets will match the way Mysten Labs release their assets, that way we can re-use most of the already done bash script.

@kkomelin
Copy link
Contributor

kkomelin commented Jun 20, 2024

@mario4tier That's a good plan! Good luck with that! I have Lunux/Ubuntu if you need some alfa/beta testers. Can also setup Windows through VirtualBox.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 🏗 In progress
Development

No branches or pull requests

2 participants