Skip to content

[info] Modernize via search api #1376

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

Merged
merged 2 commits into from
Aug 15, 2023
Merged

[info] Modernize via search api #1376

merged 2 commits into from
Aug 15, 2023

Conversation

savil
Copy link
Collaborator

@savil savil commented Aug 15, 2023

Summary

The devbox info command is quite old and outdated.

  1. It returns results inconsistent with the devbox search results. It also doesn't print much useful information except a poorly formatted package-name and version.
  2. Some users have asked in the past for understanding what a particular package in the search results is for.

This PR leverages the search service's API to get the package information, and also prints a summary of the package.

How was it tested?

BEFORE:

> devbox info go
go-1.20.2

> devbox info [email protected]
Ensuring nixpkgs registry is downloaded.
Downloaded 'github:NixOS/nixpkgs/1c6eb4876f71e8903ae9f73e6adf45fdbebc0292' to '/nix/store/y3kz7n62fwvp331na0k17xdw4dyaa66d-source' (hash 'sha256-hI7+s1UVDsJNqNn9UGV6xTBGqMC4dqOyVpeDf+su7JU=').
Ensuring nixpkgs registry is downloaded: Success
go-1.19.2

> devbox info php
php-with-extensions-8.1.17

php NOTES:
PHP is compiled with default extensions. If you would like to use non-default extensions you can add them with devbox add php81Extensions.{extension} . For example, for the memcache extension you can do `devbox add php81Extensions.memcached`.

Error: open /Users/savil/code/jetpack/devbox/.devbox/virtenv/php/process-compose.yaml: no such file or directory

AFTER:

> devbox info go
go 1.20.6
The Go Programming language

> devbox info [email protected]
go 1.19.2
The Go Programming language

> devbox info php
php 8.2.8
An HTML-embedded scripting language

php NOTES:
PHP is compiled with default extensions. If you would like to use non-default extensions you can add them with devbox add php81Extensions.{extension} . For example, for the memcache extension you can do `devbox add php81Extensions.memcached`.

Error: open /Users/savil/code/jetpack/devbox/.devbox/virtenv/php/process-compose.yaml: no such file or directory

NOTE: the error with devbox info php still needs fixing...

Copy link
Collaborator Author

savil commented Aug 15, 2023

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@savil savil requested review from gcurtis, loreto and LucilleH August 15, 2023 19:14
@savil savil force-pushed the savil/summary-in-info branch from 9afd8ac to 460a4f7 Compare August 15, 2023 19:15
@savil savil marked this pull request as ready for review August 15, 2023 19:16
@savil savil changed the title [info] show summary information about package [info] Modernize via search api Aug 15, 2023
Copy link
Collaborator

@LucilleH LucilleH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh I love this 👍

@savil savil merged commit afeec38 into main Aug 15, 2023
@savil savil deleted the savil/summary-in-info branch August 15, 2023 23:01
Copy link
Collaborator

@gcurtis gcurtis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants