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

add 'list' command to query package-version in snapshot #5431

Merged
merged 1 commit into from
Dec 8, 2020

Conversation

juhp
Copy link
Contributor

@juhp juhp commented Nov 14, 2020

currently not working for core ghc libs with resolver

Please include the following checklist in your PR:

  • Any changes that could be relevant to users have been recorded in the ChangeLog.md
  • The documentation has been updated, if necessary.

Please also shortly describe how you tested your change. Bonus points for added tests!

$ stack list zlib
zlib-0.6.2.2
$ stack --resolver lts-13 list zlib
Selected resolver: lts-13.30
zlib-0.6.2

@juhp
Copy link
Contributor Author

juhp commented Nov 24, 2020

I would appreciate any feedback, comments, code review of this.

I find this command quite useful - certainly faster than querying stackage.org directly.

Copy link
Contributor

@qrilka qrilka left a comment

Choose a reason for hiding this comment

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

LGTM but I guess we need to have an opinion from one of Stack's maintainers as well to merge this in. Also a changelog entry looks to be needed in that case and probably mentioning it in the docs.

@qrilka
Copy link
Contributor

qrilka commented Nov 29, 2020

Also style job error needs to be fixed

@qrilka
Copy link
Contributor

qrilka commented Dec 2, 2020

@juhp I've mentioned this PR in our discussion with @snoyberg and it looks like there are no particular objections to merge this. Could you address the minor issues about it I pointed above?

@juhp
Copy link
Contributor Author

juhp commented Dec 2, 2020

Sure, thanks, @qrilka, I will try to get to it soon.

(Maybe I will try to check on core library handling too at the same time, though I think it's already quite useful.)

@juhp juhp marked this pull request as ready for review December 7, 2020 17:47
@juhp
Copy link
Contributor Author

juhp commented Dec 7, 2020

I add a Changelog entry and short documentation. Also fixed the hlint warning, and updated package.yaml.
Please have a look, this should be ready now.

@juhp juhp force-pushed the master branch 2 times, most recently from 36c9b4b to 519754f Compare December 8, 2020 04:51
@juhp
Copy link
Contributor Author

juhp commented Dec 8, 2020

I slightly tweaked the documentation and changelog.

Copy link
Contributor

@qrilka qrilka left a comment

Choose a reason for hiding this comment

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

I'm OK with merging this but would like to understand the point of FIXME in the code.
Thank you.

src/Stack/List.hs Outdated Show resolved Hide resolved
- currently not working for core ghc libs with resolver
- without a resolver the latest Hackage version is displayed
@juhp
Copy link
Contributor Author

juhp commented Dec 8, 2020

Okay, I dropped the comment, thanks

@qrilka
Copy link
Contributor

qrilka commented Dec 8, 2020

Great, thanks

@qrilka qrilka merged commit e0361a0 into commercialhaskell:master Dec 8, 2020
@juhp
Copy link
Contributor Author

juhp commented Dec 8, 2020

Thanks @qrilka for reviewing and helping to get this ready

@mpilgrem
Copy link
Member

@juhp, may I clarify how this command is intended to work when no packages are specified at the command line? If I command:

stack --resolver nightly-2022-09-23 list

it yields a long list of what looks like the packages in nightly-2022-09-23, save that it excludes the packages that come with GHC on Unix-like operating systems (base, Cabal, time etc) - Win32-2.12.0.1 is listed.

If I command:

stack list

it yields nothing. I was rather hoping it would yield the snapshot specified by Stack's project-level configuration file (stack.yaml). Is nothing the intent?

@juhp
Copy link
Contributor Author

juhp commented Sep 24, 2022

I believe that is the current behaviour yes. I mean I would like the boot libraries to be listed too, but I didn't manage to wrangle that - if it's straightforward to do that would be great, thanks! (I did briefly mention this deficiency during the review.)

And right, the project case seems another edge case - it would be good to fix that too - I wasn't clever enough at the time. (I was aware of this but maybe didn't call it out explicitly here - dunno if my dropped fixme comment was alluding to this.)

@mpilgrem
Copy link
Member

@juhp, many thanks. For now. I've updated the online documentation to describe more fully the existing command.

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

Successfully merging this pull request may close these issues.

3 participants