-
Notifications
You must be signed in to change notification settings - Fork 143
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
feat: Adds nix
subcommand that uses the fuel.nix
flake to manage binaries
#461
Conversation
fuel.nix
flake as the underlying installation methodfuel.nix
flake as the fuelup
backend
Leaving some more UX feedback. After installing and running
Can we remove this part below and just show the usage...
Also, can we keep the existing command descriptions instead of the ones from |
I'm running
Although I think printing every line to the console is useful, this should be behind a |
I also got this message printing to the console
Not sure why this message still got through? I then ran the command again and this time it just returned to the console with no status message if the installation was successful or had failed..
|
They aren't from the flake, I wrote those because they are accurate to the actual logic behind the command. I can remove them, but it will be less descriptive on how to actually use the commands in some cases |
The reason the error was still showing up was because I accidentally removed a line that checked for "error:" in one of my commits where I was cleaning up the reason you don't see it after if you run it again is because it went through the auto prioritize function |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just pointed out some stuff that got merged while this PR was cooking so that if we decide to merge this one we do not lose anything
src/commands/nix/link_generator.rs
Outdated
Ok((match comp.as_str() { | ||
"fuel-core" => Self::FuelCore, | ||
"fuel-core-client" => Self::FuelCoreClient, | ||
"fuel-indexer" => Self::FuelIndexer, | ||
"forc" => Self::Forc, | ||
"forc-client" => Self::ForcClient, | ||
"forc-doc" => Self::ForcDoc, | ||
"forc-explore" => Self::ForcExplore, | ||
"forc-fmt" => Self::ForcFmt, | ||
"forc-index" => Self::ForcIndex, | ||
"forc-lsp" => Self::ForcLsp, | ||
"forc-tx" => Self::ForcTx, | ||
"forc-wallet" => Self::ForcWallet, | ||
"sway-vim" => Self::SwayVim, | ||
_ => bail!( | ||
"available distrubuted components:\n -fuel-core\n -fuel-core-client\n -fuel-indexer\n -forc\n -forc-client\n -forc-doc\n -forc-explore\n -forc-fmt\n -forc-index\n -forc-lsp\n -forc-tx\n -forc-wallet\n -sway-vim\n | ||
available distributed toolchains:\n -latest\n -nightly\n -beta-1\n -beta-2\n -beta-3\n -beta-4-rc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also started to distribute fuel-core-keygen
as of #472
src/commands/nix/link_generator.rs
Outdated
let tool = match tool { | ||
FuelToolchain::Latest => "", | ||
FuelToolchain::Nightly => "-nightly", | ||
FuelToolchain::Beta1 => "-beta-1", | ||
FuelToolchain::Beta2 => "-beta-2", | ||
FuelToolchain::Beta3 => "-beta-3", | ||
FuelToolchain::Beta4rc => "-beta-4-rc", | ||
FuelToolchain::Unknown => bail!("available distributed toolchains:\n -latest\n -nightly\n -beta-1\n -beta-2\n -beta-3\n -beta-4-rc") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also have beta-4-rc.2
as of #467
src/commands/nix/link_generator.rs
Outdated
#[derive(Eq, PartialEq, Debug)] | ||
pub(crate) enum FuelToolchain { | ||
Latest, | ||
Nightly, | ||
Beta1, | ||
Beta2, | ||
Beta3, | ||
Beta4rc, | ||
Unknown, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^ I guess we should also add Beta4Rc2
to this list as well.
Thanks @kayagokalp I'll update those soon |
Closing since we are not using this approach as discussed in #457 |
Adds a
fuelup nix
subcommand that makes calls into thefuel.nix
flake. This does not break the currentfuelup
, but will ease users into trying out the nix approach to managing toolchains and components.Closes #457
Process for achieving completion of #457
fuelup-init.sh
usecheck_cmd
fornix
, if it is installed for the user there is no need to run the installation script.find a way to amend theirout of the scope of this PR, handled by way of ending messageconf.nix
file to include the fuel binary cache from cachix and the necessary unstable features (also check if those features are already enabled)nix
isn't present, run the fullfuel.nix
install script.fuelup
profile to separate fuel binaries from existing users main profile (this can be a follow up issue)fuel.nix
flake commands to the fuelup CLI commands already available.fuelup nix install
: install toolchain and componentsfuelup nix list
)fuelup nix list
: list installed toolchains and components (nix default)fuelup nix list
more robust by organizing the display of toolchains and components in a more similar way to the current fuelupfuelup nix remove
: remove toolchains and componentsfuelup nix upgrade
: upgrade toolchains and componentsfuelup nix shell
command #463