r-darwish / topgrade

Upgrade everything
GNU General Public License v3.0
3.37k stars 162 forks source link

Add new step: GNU Guix #982

Closed JamesClarke7283 closed 1 year ago

JamesClarke7283 commented 1 year ago

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:

Features

JamesClarke7283 commented 1 year ago

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.

strangelittlemonkey commented 1 year ago

Please remove the swp file that was accidentally added to the commit.

JamesClarke7283 commented 1 year ago

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

JamesClarke7283 commented 1 year ago

Does anything else need doing for this to be ready for merge?

s34m commented 1 year ago

Merged at new fork because of inactivity by maintainer. Link: https://github.com/DottoDev/topgrade/pull/1