sha256 and size in ls dependencies json for archive dependencies #5280
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds
sha256
andsize
fields to the output ofls 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 theBlobKey
/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 withinstack
, then I'd be happy to extend this change accordingly. Alternatively, users could useall-cabal-hashes
for Hackage dependencies.Please include the following checklist in your PR:
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.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 additionalsha256
andsize
fields into account.