GaloisInc / ec2-unikernel

Tool for uploading unikernels into EC2
BSD 3-Clause "New" or "Revised" License
77 stars 6 forks source link

`cabal install ec2-unikernel` fails #11

Closed keikonakata closed 6 years ago

keikonakata commented 6 years ago

I guess this is a known issue, but cabal install ec2-unikernel fails with the following error message

src/CommandLine.hs:135:11: error:
    * Couldn't match type `Env' with `IO Env'
      Expected type: Credentials -> IO Env
        Actual type: Credentials -> Env
    * The function `newEnv' is applied to two arguments,
      its type is `Credentials -> m0 Env',
      it is specialized to `Credentials -> Credentials -> Env'
      In a stmt of a 'do' block:
        e <- newEnv (view optAwsRegion opts) creds
      In the expression:
        do { maccess <- lookupEnv "AWS_ACCESS_KEY";
             msecret <- lookupEnv "AWS_SECRET_KEY";
             let defaultOptions'
                   = maybeSet optAwsAccessKey maccess defaultOptions
                 defaultOptions'' = maybeSet optAwsSecretKey msecret defaultOptions'
                 ....;
             now <- getCurrentTime;
             .... }

src/CommandLine.hs:135:19: error:
    * Couldn't match type `Region' with `Credentials'
      Expected type: Options -> Credentials
        Actual type: Options -> Region
    * The function `view' is applied to two arguments,
      its type is `Control.Lens.Getter.Getting a0 s0 a0 -> m0 a0',
      it is specialized to `Control.Lens.Getter.Getting
                              Region Options Region
                            -> Options -> Region'
      In the first argument of `newEnv', namely
        `(view optAwsRegion opts)'
      In a stmt of a 'do' block:
        e <- newEnv (view optAwsRegion opts) creds
cabal: Leaving directory '/tmp/cabal-tmp-8238/ec2-unikernel-0.9.2'
Failed to install ec2-unikernel-0.9.2

I subsequently checked out the source code and ran cabal install directly, which succeeded.

This issue is maybe related to #6. ?

acw commented 6 years ago

Hi!

This should be fixed in master, and has been pushed to Hackage as version 0.9.8. Sorry for the long turn around; I've been trying to get Travis to reliably work, and it took me awhile to give up on that. Please re-open this ticket if you have any problems!