hkdb / app

A cross-platform package management assistant with super powers!
https://hkdb.github.io/app/
Apache License 2.0
55 stars 2 forks source link

Install: sort packages name #7

Closed RichardFevrier closed 3 weeks ago

RichardFevrier commented 1 month ago

This PR makes packages name sorted alphabetically in their respective .json. It's easier to read and better to spot differences when you commit your config into a dotfiles repo.

hkdb commented 1 month ago

Playing devils advocate here. It's definitely better for viewing but should we consider the order the packages were installed by the user and if it will potentially break any unaccounted for dependencies during restore? I don't mean software package dependencies but how software is manually setup. Situations we may not have thought of so-far? I am totally for the history action to spit out packages in alphabetical order though.

RichardFevrier commented 1 month ago

I thought about it and I don't see a case where install order is important. So I would say let's make it default and if an edge corner case appears let's revert it.

hkdb commented 3 weeks ago

I actually do care about the order of what was installed in some cases of mine. Give me a little time and let me think of a way to fulfill both of our needs. Will come back with something that can possibly do both...

hkdb commented 3 weeks ago

I am thinking to do it this way. Instead of storing packages alphabetically, history will be sorted before output by default. Users can also use the -raw flag to see the history output in the order that things were installed. The implementation is in the history branch. I will sit on this for a little bit before I merge it to develop.

hkdb commented 3 weeks ago

Implemented