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

sha256 and size in ls dependencies json for archive dependencies #5280

merged 3 commits into from May 4, 2020


Copy link

@aherrmann aherrmann commented Apr 27, 2020

This adds sha256 and size fields to the output of ls dependencies json in case of archive dependencies (PLIArchive). See #5274 for motivation.

Note, this does not change the output in case of Hackage or repository dependencies. To my understanding, the PackageLocationImmutable data type does not provide this information for Hackage or repository dependencies. Instead, it provides the BlobKey/TreeKey size and hashes which are specific to pantry and not directly applicable to check the hash of a fetched tarball, as explained here.

Please let me know if there is a good way to obtain regular sha256/size values for these dependencies within stack, then I'd be happy to extend this change accordingly. Alternatively, users could use all-cabal-hashes for Hackage dependencies.

Please include the following checklist in your PR:

  • Any changes that could be relevant to users have been recorded in the
    Let me know if this is required, if this change ends up still being included in v2.3.0.1 then it seems unnecessary to add an additional changelog entry about this feature, since ls dependencies json is a new feature itself.
  • The documentation has been updated, if necessary.
    Likewise, this is only a small addition to ls dependencies json, so additional documentation seems not necessary.

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

The integration test suite contains 4101-dependency-tree which is affected by this change. I have adapted the test to take the additional sha256 and size fields into account.

Copy link

@snoyberg snoyberg left a comment

Can you add a ChangeLog entry for this?

aherrmann added 3 commits May 4, 2020
Include sha256 and size in the output of `ls dependencies json` for
packages with an archive location.
Copy link
Contributor Author

aherrmann commented May 4, 2020

Can you add a ChangeLog entry for this?

Sure, done. I've also rebased on latest master.

Copy link

@snoyberg snoyberg left a comment


@snoyberg snoyberg merged commit ef90278 into commercialhaskell:master May 4, 2020
@aherrmann aherrmann deleted the ls-dependencies branch May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants