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

Improvement over versions #21

Closed
barrantesgerman opened this issue Dec 29, 2021 · 3 comments · Fixed by #29
Closed

Improvement over versions #21

barrantesgerman opened this issue Dec 29, 2021 · 3 comments · Fixed by #29
Labels
enhancement New feature or request
Milestone

Comments

@barrantesgerman
Copy link

It would be nice if a flag could be added to skip alpha, beta, snapshot

Another alternative is the possibility of seeing the latest X versions

Currently:

mcs search ch.qos.logback:logback-classic
Searching for ch.qos.logback:logback-classic...

    <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>1.3.0-alpha12</version>
    </dependency>

Suggested:

Skip: -s or --skip

mcs search ch.qos.logback:logback-classic -s
Searching for ch.qos.logback:logback-classic...

    <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>1.2.10</version>
    </dependency>

Last 3 versions: -l 3 or --last 3

mcs search ch.qos.logback:logback-classic -l 3
Searching for ch.qos.logback:logback-classic...

  Version                                                Last updated
  ===========                                            ============
  ch.qos.logback:logback-classic:1.3.0-alpha12           22 Dec 2021 at 14:03 (CST)
  ch.qos.logback:logback-classic:1.2.10                  23 Dec 2021 at 14:03 (CST)
  ch.qos.logback:logback-classic:1.2.9                   16 Dec 2021 at 14:03 (CST)
mthmulders added a commit that referenced this issue Jan 6, 2022
@mthmulders
Copy link
Owner

Thanks for contributing this idea! I feel there would be a lot of "version suffices" that one may want to be skipped - beta, alpha, release candidate, or what not...? The deny-list would soon grow pretty large, and be very opinionated: some people are OK with getting a release candidate while others may not.

The last suggestion does not suffer from that, as it leaves it to the user to make up their mind and decide which one to use. How would you feel with a -l <num> / --last <num> switch for the search command?

@mthmulders mthmulders added the enhancement New feature or request label Jan 6, 2022
@barrantesgerman
Copy link
Author

barrantesgerman commented Jan 9, 2022

You are absolutely right in what you say, the list could be unmaintainable (alpha, beta, etc)

The second option would open the possibility of selecting the version that someone prefers

Thanks

@bmarwell
Copy link

bmarwell commented Jan 9, 2022

Thanks for contributing this idea! I feel there would be a lot of "version suffices" that one may want to be skipped - beta, alpha, release candidate, or what not...? The deny-list would soon grow pretty large, and be very opinionated: some people are OK with getting a release candidate while others may not.

You are absolutely right in what you say, the list could be unmaintainable (alpha, beta, etc)

… and there are exceptions from the exception lists, e.g. .FINAL for RedHat-Releases :)

+1 for the --last.
FWIW, I'd like to pass it to the generic search as well, not just to the search command which acts like a show command. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants