topgrade
topgrade copied to clipboard
Add new step: GNU Guix
Adds support for GNU Guix package manager.
Closes #979 Needs better error handling/messages. But it functions when ive tested it & if the step fails, the program continues as normal. No custom error messages, happen yet, at the moment error output is just the default from the package manager. see the prior mentioned issue for more details.
I have run the checks, on check that failed, was cargo clippy
. because of a unneeded return statement, i will fix that warning later. Sorry if my code is not great, i have no experience with rust, until now. Feedback on what to improve would be much appreciated.
Standards checklist:
- [x] The PR title is descriptive.
- [x] The code compiles (
cargo build
) - [x] The code passes rustfmt (
cargo fmt
) - [x] The code passes clippy (
cargo clippy
) - [x] The code passes tests (
cargo test
) - [x] Optional: I have tested the code myself
- [x] I also tested that Topgrade skips the step where needed
Features
- [x] Update guix (both the database, and the guix binary itself)
- [x] Upgrade guix packages
Cargo Clippy gives no warnings caused by my changes (checked upstream master and was consistent with that), and I removed the custom Error/Messages handling item, from the requirements.
Had help from Leo Spratt (@enchant94) who knows a lot more about rust specific best practices.
Please remove the swp file that was accidentally added to the commit.
Please remove the swp file that was accidentally added to the commit.
Thanks for letting me know, do let me know if anything needs to be improved, I had no experience with programming in Rust before this, so I made the decision to not add the extra messages as a feature, initially.
Do you think it would be worthwhile to add a printout when guix is not found, saying what command to run to install the GNU Guix package manager?
If so, Would the method to install GNU Guix stated here, be too long? https://guix.gnu.org/manual/en/html_node/Binary-Installation.html#example
Does anything else need doing for this to be ready for merge?
Merged at new fork because of inactivity by maintainer. Link: https://github.com/DottoDev/topgrade/pull/1