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
merged 3 commits into from
May 4, 2020

Conversation

aherrmann
Copy link
Contributor

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 ChangeLog.md
    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
Contributor

@snoyberg snoyberg left a comment

Choose a reason for hiding this comment

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

Can you add a ChangeLog entry for this?

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

Can you add a ChangeLog entry for this?

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

Copy link
Contributor

@snoyberg snoyberg left a comment

Choose a reason for hiding this comment

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

Thanks!

@snoyberg snoyberg merged commit ef90278 into commercialhaskell:master May 4, 2020
@aherrmann aherrmann deleted the ls-dependencies branch May 4, 2020 15:18
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.

2 participants