Skip to content
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

[feature request] Sort mix hex.outdated output by status in default output #1005

Closed
kianmeng opened this issue Nov 9, 2023 · 4 comments
Closed

Comments

@kianmeng
Copy link
Contributor

kianmeng commented Nov 9, 2023

Is it possible to sort by default the mix hex.outdated output by Status instead of Dependency column?

The default:

$ mix hex.outdated
Dependency              Current  Latest  Status
absinthe                1.7.5    1.7.5   Up-to-date
absinthe_error_payload  1.1.4    1.1.4   Up-to-date
absinthe_plug           1.5.8    1.5.8   Up-to-date
absinthe_relay          1.5.2    1.5.2   Up-to-date
appsignal               2.7.9    2.7.11  Update possible
appsignal_phoenix       2.3.4    2.3.4   Up-to-date
aws_auth                0.7.2    0.7.2   Up-to-date
broadway_cloud_pub_sub  0.7.1    0.9.0   Update not possible

Something like below:

Dependency              Current  Latest  Status
appsignal               2.7.9    2.7.11  Update possible
broadway_cloud_pub_sub  0.7.1    0.9.0   Update not possible
absinthe                1.7.5    1.7.5   Up-to-date
absinthe_error_payload  1.1.4    1.1.4   Up-to-date
absinthe_plug           1.5.8    1.5.8   Up-to-date
absinthe_relay          1.5.2    1.5.2   Up-to-date
appsignal_phoenix       2.3.4    2.3.4   Up-to-date
aws_auth                0.7.2    0.7.2   Up-to-date
...

Or the Status column moved to the far left:

Status              Dependency              Current  Latest
Update possible     appsignal               2.7.9    2.7.11
Update not possible broadway_cloud_pub_sub  0.7.1    0.9.0
Up-to-date          absinthe                1.7.5    1.7.5
Up-to-date          absinthe_error_payload  1.1.4    1.1.4
Up-to-date          absinthe_plug           1.5.8    1.5.8
Up-to-date          absinthe_relay          1.5.2    1.5.2
Up-to-date          appsignal_phoenix       2.3.4    2.3.4
Up-to-date          aws_auth                0.7.2    0.7.2
...

We have noticed that we kept using this command mix hex.outdated | grep "Update possible" to filter out the ouput. Since this mix task is to find out all outdated deps, it would make sense to put those pending update deps at the top of the list.

What do you think?

@supersimple
Copy link
Member

IMO I could see two changes:

  1. group the deps into statuses visually - possibly use a flag and keep the current view as default
  2. add flags to filter by status mix hex.outdated --update-possible

Anyone else have strong opinions?

@wojtekmach
Copy link
Member

Adding a sort option sounds good to me. I'd hold off on adding filter though as it's easy to grep:

$ mix hex.outdated | grep "Update possible"

@juhalehtonen
Copy link
Contributor

I started putting together a PR for this at #1017 . Happy to hear thoughts on the general direction there before I take it forward (or not!) 🙂

@ericmj
Copy link
Member

ericmj commented Apr 9, 2024

Closing in favor of PR ^.

@ericmj ericmj closed this as completed Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants