beijaflor-io / haskell-language-dockerfile

Haskell Dockerfile linter, parser, pretty-printer and EDSL, forked from https://github.com/lukasmartinelli/hadolint.
Other
19 stars 3 forks source link

build failure #11

Open DanBurton opened 6 years ago

DanBurton commented 6 years ago

Build failure as seen on the stackage build server:

Building library for language-dockerfile-0.3.6.0..
[ 1 of 16] Compiling Language.Dockerfile.Bash ( src/Language/Dockerfile/Bash.hs,
 dist/build/Language/Dockerfile/Bash.o )

src/Language/Dockerfile/Bash.hs:9:81: error:
    • Couldn't match expected type ‘CheckSpec’
                  with actual type ‘Maybe Shell -> CheckSpec’
    • Probable cause: ‘spec’ is applied to too few arguments
      In the second argument of ‘checkScript’, namely ‘spec’
      In the second argument of ‘($)’, namely ‘checkScript si spec’
      In the second argument of ‘($)’, namely
        ‘runIdentity $ checkScript si spec’
  |
9 | shellcheck bashScript = map comment $ crComments $ runIdentity $ checkScript si spec
  |                                                                                 ^^^^

src/Language/Dockerfile/Bash.hs:12:38: error:
    • Couldn't match expected type ‘Bool’ with actual type ‘[a0]’
    • In the third argument of ‘CheckSpec’, namely ‘exclusions’
      In the expression: CheckSpec filename script exclusions (Just Bash)
      In an equation for ‘spec’:
          spec = CheckSpec filename script exclusions (Just Bash)
   |
12 |     spec = CheckSpec filename script exclusions (Just Bash)
   |                                      ^^^^^^^^^^

src/Language/Dockerfile/Bash.hs:12:50: error:
    • Couldn't match expected type ‘[Integer]’
                  with actual type ‘Maybe Shell’
    • In the fourth argument of ‘CheckSpec’, namely ‘(Just Bash)’
      In the expression: CheckSpec filename script exclusions (Just Bash)
      In an equation for ‘spec’:
          spec = CheckSpec filename script exclusions (Just Bash)
   |
12 |     spec = CheckSpec filename script exclusions (Just Bash)
   |                                                  ^^^^^^^^^

I'll try to see if I can reproduce it locally with the next stackage nightly snapshot.

DanBurton commented 6 years ago

Here's how I was able to reproduce locally:

$ stack unpack language-dockerfile-0.3.6.0 && cd language-dockerfile-0.3.6.0
$ vi stack.yaml # add the stack.yaml below
$ stack build
# stack.yaml
resolver: nightly-2017-12-09
extra-deps:
- ShellCheck-0.4.7