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

CLI: Extensions list enhancements #18062

Closed
Sgitario opened this issue Jun 22, 2021 · 5 comments · Fixed by #22995
Closed

CLI: Extensions list enhancements #18062

Sgitario opened this issue Jun 22, 2021 · 5 comments · Fixed by #22995
Assignees
Labels
area/cli Related to quarkus cli (not maven/gradle/etc.)
Projects
Milestone

Comments

@Sgitario
Copy link
Contributor

Sgitario commented Jun 22, 2021

Description

There are a few drawbacks when using the extension list command: quarkus extension list:

  1. It behaves differently depending on where you're running the command:
  • If current path is a Quarkus application, this command displays the installed Quarkus extensions
  • If current path is NOT a Quarkus application, this command displays all the Quarkus extensions
  1. Default command quarkus extension list behaves as quarkus extension list --origins. Example:
> quarkus extension list --origins
Jacoco - Code Coverage  999-SNAPSHOT   io.quarkus:quarkus-bom::pom:999-SNAPSHOT
JAXB                                 999-SNAPSHOT   io.quarkus:quarkus-bom::pom:999-SNAPSHOT

And I see a couple of problems here: (1) we miss the artifact id that match to the extension name and (2) the version name (aka 999-SNAPSHOT) is duplicated.

As far I see, the --concise option should be the default:

> quarkus extension list --concise
Jacoco - Code Coverage  quarkus-jacoco
JAXB                                 quarkus-jaxb

And, if we add the --origins option, I would have expected to see an additional column:

> quarkus extension list --concise
Jacoco - Code Coverage  quarkus-jacoco   io.quarkus:quarkus-bom::pom:999-SNAPSHOT
JAXB                                 quarkus-jaxb       io.quarkus:quarkus-bom::pom:999-SNAPSHOT
  1. The format of the origin is adding an extra :. Example: io.quarkus:quarkus-bom::pom:999-SNAPSHOT.
  2. The option --full have headers and different column order than the rest. Example:
extension list --full
Status   Extension                              ArtifactId                 Updated Version          Guide
             Jacoco - Code Coverage      quarkus-jacoco                                           https://quarkus.io/guides/tests-with-coverage
             JAXB                                     quarkus-jaxb                                                                

Implementation Ideas

To sum up, these are the changes I think that are necessary:

  • Split the existing command into one for display the installed extensions and another one to list ALL the extensions.
  • If no option provided, the --concise should be used instead of --origins.
  • All the options should maintain the column output order:
    For --concise: <artifactId> <extensionName>
    For --origins: <artifactId> <extensionName> <origin>
    For --full: <artifactId> <extensionName> <origin> <guide> <status> <updatedVersion>
  • All the options (including --instalable) should be sorted. Related issue: CLI: list --installable should be sorted #16154
  • Decide whether return headers or not, but do it for all the options.
@Sgitario Sgitario added the kind/enhancement New feature or request label Jun 22, 2021
@Sgitario
Copy link
Contributor Author

cc @maxandersen @ebullient

@ebullient ebullient self-assigned this Jun 22, 2021
@ebullient ebullient added the area/cli Related to quarkus cli (not maven/gradle/etc.) label Jun 22, 2021
@ebullient
Copy link
Contributor

ebullient commented Jun 22, 2021

I would like to stick with the single command, which includes --search and --installable, as this is similar to other tools (like brew).

In the case of listing from outside of a project OR listing a specific version, I used origins deliberately, to be clear about what version of quarkus extensions were being listed for. It is a very different context to just "list extensions for this project", but is otherwise identical in terms of processing and options...

I agree with you re: column ordering, consistency and headings.

I think we can/should clean up the output (the extra : is due to how the artifact coordinates are printed). Some bits are also less redundant when you are working with a platform composed from several BOMs, which we expect going forward with 2.x. But it could definitely be simplified.

There is an incoming PR for adding category support: #17765, which includes sorting the list of extensions. Any fix for this will come after that PR is integrated.

@ebullient
Copy link
Contributor

ebullient commented Jun 22, 2021

I have a partial update (clarifying behaviors for list extensions in command help) in #18086 .. I wonder if this helps?

Sorting out the order that output appears in will come after #17765

@ebullient ebullient added this to To do in quarkus cli Jun 23, 2021
@ebullient ebullient moved this from To do to Maybe/Idea in quarkus cli Jun 23, 2021
@ebullient
Copy link
Contributor

#17765 has been merged. extensions are alphabetized and can be filtered by category..

@maxandersen maxandersen removed the kind/enhancement New feature or request label Nov 23, 2021
@gastaldi gastaldi added kind/enhancement New feature or request and removed triage/needs-triage labels Jan 7, 2022
@quarkus-bot
Copy link

quarkus-bot bot commented Jan 7, 2022

/cc @ebullient, @maxandersen

@gastaldi gastaldi removed the kind/enhancement New feature or request label Jan 7, 2022
@quarkus-bot quarkus-bot bot added this to the 2.8 - main milestone Jan 19, 2022
@gsmet gsmet modified the milestones: 2.8 - main, 2.7.0.Final Jan 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli Related to quarkus cli (not maven/gradle/etc.)
Projects
Status: Done
quarkus cli
Maybe/Idea
Development

Successfully merging a pull request may close this issue.

5 participants