Navigation Menu

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

Prelude/package.dhall checksum incorrect #13

Open
bobdoah opened this issue Apr 28, 2022 · 7 comments
Open

Prelude/package.dhall checksum incorrect #13

bobdoah opened this issue Apr 28, 2022 · 7 comments

Comments

@bobdoah
Copy link

bobdoah commented Apr 28, 2022

I'm trying to run the example, using an import and it's failing with:

dhall:
↳ https://raw.githubusercontent.com/bgamari/dhall-gitlab-ci/master/package.dhall
  ↳ https://raw.githubusercontent.com/bgamari/dhall-gitlab-ci/master/GitLab/package.dhall
    ↳ https://raw.githubusercontent.com/bgamari/dhall-gitlab-ci/master/GitLab/Job/package.dhall
      ↳ https://raw.githubusercontent.com/bgamari/dhall-gitlab-ci/master/GitLab/Job/Type.dhall
        ↳ https://raw.githubusercontent.com/bgamari/dhall-gitlab-ci/master/GitLab/Prelude.dhall
          ↳ https://raw.githubusercontent.com/bgamari/dhall-gitlab-ci/master/Prelude.dhall
            ↳ https://raw.githubusercontent.com/dhall-lang/dhall-lang/v17.0.0/Prelude/package.dhall
  sha256:0c04cbe34f1f2d408e8c8b8cb0aa3ff4d5656336910f7e86190a6d14326f966d

Error: Import integrity check failed

Expected hash:

↳ 0c04cbe34f1f2d408e8c8b8cb0aa3ff4d5656336910f7e86190a6d14326f966d

Actual hash:

↳ 10db3c919c25e9046833df897a8ffe2701dc390fa0893d958c3430524be5a43e


24│   https://raw.githubusercontent.com/dhall-lang/dhall-lang/v17.0.0/Prelude/package.dhall sha256:0c04cbe34f1f2d408e8c8b8cb0aa3ff4d5656336910f7e86190a6d14326f966d

https://raw.githubusercontent.com/bgamari/dhall-gitlab-ci/master/Prelude.dhall:24:3

It seems like the checksum committed is wrong.

@mx00s
Copy link
Contributor

mx00s commented Apr 29, 2022

Odd. It worked for me.

$ git clone https://github.com/bgamari/dhall-gitlab-ci.git
$ cd dhall-gitlab-ci
$ dhall <<< ./examples/single-job.dhall
''
"generated-job":
  "allow_failure": false
  "image":
    "entrypoint":
      - " "
    "name": "alpine:latest"
  "script":
    - "echo 'Hello World'"
  "stage": "build"
  "variables": {}
"variables":
  "GIT_SUBMODULE_STRATEGY": "normal"
''

I tested using a somewhat old version:

$ dhall --version
1.39.0

@bobdoah
Copy link
Author

bobdoah commented May 4, 2022

Yeah, I'm using the latest:

% dhall --version
1.41.1

I can't see any obvious reason in the changelog why this would have broken: https://hackage.haskell.org/package/dhall-1.41.1/changelog

@kenranunderscore
Copy link

For the record, same problem here when upgrading to dhall in version 1.40.2. For now I'm using @bobdoah's PR directly, otherwise the pipeline won't build.

@dhamidi
Copy link

dhamidi commented Jul 15, 2022

It turned out that there is another issue with the latest dhall version: https://discourse.dhall-lang.org/t/first-steps-failed-when-trying-dhall-for-gitlab-ci/602/3

The behavior of import has changed, so the fallback to use an include without the integrity checksum doesn't work anymore.

@jackmac92
Copy link

I was hoping to get a bit more familiar with dhall by using it for gitlab-ci, any recs on a temporary workaround?

Could I somehow get that version of the Prelude cached on my machine? Or fork and deal with fixing the sha check w/in the code of this repo?

@bgamari
Copy link
Owner

bgamari commented Sep 9, 2022

I have merged the MR. Thanks everyone!

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

No branches or pull requests

6 participants