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

A new stack show command and missing informative commands #1614

Closed
harendra-kumar opened this issue Jan 6, 2016 · 9 comments
Closed

A new stack show command and missing informative commands #1614

harendra-kumar opened this issue Jan 6, 2016 · 9 comments

Comments

@harendra-kumar
Copy link
Collaborator

There are multiple informative commands available and there are many of them which are missing too. Some available commands are:

  • templates
  • path
  • dot
  • list-dependencies
  • query

Some missing ones are:

  • list available indices (Hackage/Stackage)
  • list packages in an index
  • list available snapshots/resolvers for an index (stackage)
  • list packages in a snapshot

We can have a stack show command and incorporate all of the above under subcommands of show. That will also reduce the top level commands and make the commands better navigable.

We can split off implementation of the missing ones listed above in a separate issue. Those will be really useful to have.

Also see a related issue #1333 .

@mgsloan
Copy link
Contributor

mgsloan commented Jan 8, 2016

I'd also like to see the ability to list all project targets, and all package flags.

I agree that it'd be great to have a stack show prefix. I'd be in favor of moving templates, list-dependencies (as just stack show dependencies), and query all under a show command. I think this makes a lot more sense than cluttering up the top level interface with informational commands. stack path should stay, because it's used in lots of scripts, lets not break it.

@borsboom Do you think it's reasonable to make a breaking change for this, or perhaps there should be a deprecation cycle?

@mgsloan mgsloan added this to the P2: Should milestone Jan 8, 2016
@borsboom
Copy link
Contributor

I like the stack show idea. A deprecation cycle would probably be good, in case there are any scripts using these commands. Another option would be to have separate list and show subcommands to list multiple things vs. show details about a single thing. Kubernetes' kubectl works this way (well, it uses the harder-to-type describe instead of show) and I find it nice to use.

@harendra-kumar
Copy link
Collaborator Author

I like that distinction (list and show) especially since the definition looks pretty clear and not confusing the user about which one to use.

So the commands that I listed above fall under the list command, all of them. What among the existing commands can potentially be put under show?

@rrnewton
Copy link
Contributor

rrnewton commented Apr 18, 2016

+1. We are currently jumping through hoops to get the contents of current LTS releases programatically. Specifically, we download the cabal.config directly that we expect to exist at a particular URL such as "https://www.stackage.org/lts-5.13/cabal.config". This is fragile but I don't know of a better way currently.

@sjakobi
Copy link
Member

sjakobi commented Jul 14, 2016

A relevant idea by @spl from #1855:

It would be useful to see a complete list of the available resolvers.

The documentation uses “e.g.” and “looks like” to provide possible patterns of resolver names, but it doesn't give any indication of the bounds of those patterns, instead relying on reader knowledge to fill in the details or on guesses to see if a certain pattern works.

Ideally, I would like to be able to go to an explicit list of resolvers and see what I can use. Also, ideally, this list would have some documentation about each that explains it and how it is different from other (related) resolvers. A more minimal, but still useful, solution would be to add more description on the resolver patterns, or to add links to more details, to the aforementioned documentation.

@mgsloan
Copy link
Contributor

mgsloan commented Jul 19, 2016

That would indeed be cool. It'd be nice if it told you the usable ranges of lts + what the most recent nightly is.

@psibi
Copy link
Member

psibi commented Jul 9, 2017

@harendra-kumar

list available indices (Hackage/Stackage)
list packages in an index
list available snapshots/resolvers for an index (stackage)
list packages in a snapshot

What do you mean by index here ? Do you mean a particular snapshot/resolver (If yes, then the sentence list available snapshots/resolvers for an index ambigous). I'm implementing a way to see the list of packages in a particular resolver and this issue seemed related to it.

@harendra-kumar
Copy link
Collaborator Author

harendra-kumar commented Jul 9, 2017

By index I mean either hackage or stackage. It can also be a custom local index which you are maintaining yourself. The resolver/snapshot concept applies to stackage index only that's why I wrote stackage in parenthesis for that item.

@mpilgrem
Copy link
Member

I am closing this issue because (a) the lack of activity for a long time (b) the likelihood of subsequent developments and (c) I think it would be better to have separate issues for specific information requirements.

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

No branches or pull requests

7 participants