kinode-dao / kit

Development toolkit for Kinode OS
Apache License 2.0
11 stars 3 forks source link

bug: `setup::install_foundry()` doesn't work as expected #172

Open nick1udwig opened 4 weeks ago

nick1udwig commented 4 weeks ago

Describe the bug

Instead of installing foundry as expected, install_foundry() seems to do nothing.

As a result, machines without foundry installed cannot properly run fake nodes since the deps are not fetched.

To Reproduce On a machine without foundry:

kit f

and then say Y to install `foundry.

Expected behavior It should install foundry.

nick1udwig commented 4 weeks ago
$ curl -L https://foundry.paradigm.xyz | bash
Installing foundryup...

warning: libusb not found. You may need to install it manually on MacOS via Homebrew (brew install libusb).

Detected your preferred shell is bash and added foundryup to PATH.
Run 'source /Users/nick/.bashrc' or start a new terminal session to use foundryup.
Then, simply run 'foundryup' to install Foundry.

exit code 0

nick1udwig commented 4 weeks ago

So probably we need to:

  1. If on MacOS, check for existence of libusb
  2. Prompt user if not found to install
  3. Install process will need to use brew: need to check for existence of brew
  4. Prompt user if not found to install
  5. If we're still alive, try the current command

Related to 5, we need to figure out how we can get it to run either

  1. Without user input
  2. With user input and then print it to screen/get stdin 1 is more preferable here, but if not possible, 2 is not hard: can just run with .output() and it will inherit stdin/stdout
nick1udwig commented 4 weeks ago

Even after brew install libusb, running the curl command still wants input from the user.

nick1udwig commented 4 weeks ago

Even after brew install libusb, running the curl command still wants input from the user.

Probably all we need to do here is to run a command where we source and then run foundryup as suggested in the text

bitful-pannul commented 4 weeks ago

Even after brew install libusb, running the curl command still wants input from the user.

Probably all we need to do here is to run a command where we source and then run foundryup as suggested in the text

only in the case where we check for libusb and it doesn't exist?

nick1udwig commented 4 weeks ago

You should brew uninstall libusb and uninstall foundry and try out the flow to understand it yourself. The goal here is that we figure out all the deps the user is missing, then prompt them "install [Y/n]", then we get them and set up their system properly.

If its not possible, we need to print some very helpful messages. E.g. for python its not possible.