Skip to content

Warnings when parsing lock file #4789

Closed

Description

@snoyberg

Actions:

  1. Using a stack executable from commit 595e9ea
  2. rm -f stack.yaml.lock
  3. Run stack build in the Stack repo at that same commit
  4. Get some warnings
$ stack build 
Using archive from https://github.com/snoyberg/filelock/archive/97e83ecc133cd60a99df8e1fa5a3c2739ad007dc.tar.gz without a specified cryptographic hash
Cached hash is 78332e0d964cb2f24fdbb6b07c2a6a84a029c4fe540a0435993c85ad58eab051, file size 9526
For security and reproducibility, please add a hash and file size to your configuration
Using archive from https://github.com/snoyberg/filelock/archive/97e83ecc133cd60a99df8e1fa5a3c2739ad007dc.tar.gz without a specified cryptographic hash
Cached hash is 78332e0d964cb2f24fdbb6b07c2a6a84a029c4fe540a0435993c85ad58eab051, file size 9526
For security and reproducibility, please add a hash and file size to your configuration

The missing cryptographic hash isn't true: the stack.yaml.loc does in fact include the sha256 and filesize of the tarball. Running stack build a second time generates slightly different warnings:

$ stack build 
Warning: /Users/michael/Documents/stack/stack.yaml.lock: Unrecognized fields in UnresolvedPackageLocationImmutable.PLIArchive: cabal-file, name, pantry-tree, version
Using archive from https://github.com/snoyberg/filelock/archive/97e83ecc133cd60a99df8e1fa5a3c2739ad007dc.tar.gz without a specified cryptographic hash
Cached hash is 78332e0d964cb2f24fdbb6b07c2a6a84a029c4fe540a0435993c85ad58eab051, file size 9526
For security and reproducibility, please add a hash and file size to your configuration

Looks like this might be a bug in the parsing or rendering of a PLIArchive. CC @qrilka

Activity

  1. added this to the Stack 2 milestone on Apr 30, 2019
  2. snoyberg commented on May 1, 2019

    @snoyberg
    ContributorAuthor

    I've opened up a PR (#4790) for the warnings during the parsing. That addresses "unrecognized fields" bit above by using the Data.Aeson.Extended machinery better.

    I've opened up a second PR (#4791) for the warnings about "without specified cryptographic hash." The issue there was that we were looking up the package name from the raw information, instead of using the completed information.

    Once both PRs are merged we can close this issue.

  3. added 2 commits that reference this issue on May 1, 2019
  4. snoyberg commented on May 2, 2019

    @snoyberg
    ContributorAuthor

    Both PRs and merged, closing

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions