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

nri-prelude fails to build with aeson-2.0 #26

Open
juhp opened this issue Nov 29, 2021 · 1 comment
Open

nri-prelude fails to build with aeson-2.0 #26

juhp opened this issue Nov 29, 2021 · 1 comment

Comments

@juhp
Copy link

juhp commented Nov 29, 2021

nri-prelude      > /tmp/stack-9aa7ce30a97b85ac/nri-prelude-0.6.0.5/src/Log.hs:164:37: error:
nri-prelude      >     • Couldn't match type ‘Data.Text.Internal.Text’ with ‘Aeson.Key’
nri-prelude      >       Expected: Aeson.Key
nri-prelude      >         Actual: Text
nri-prelude      >     • In the first argument of ‘(.=)’, namely ‘key’
nri-prelude      >       In the expression: key .= val
nri-prelude      >       In the first argument of ‘map’, namely
nri-prelude      >         ‘(\ (Context key val) -> key .= val)’
nri-prelude      >     |
nri-prelude      > 164 |       |> map (\(Context key val) -> key .= val)
nri-prelude      >     |                                     ^^^
nri-prelude      > 
nri-prelude      > /tmp/stack-9aa7ce30a97b85ac/nri-prelude-0.6.0.5/src/Log.hs:169:49: error:
nri-prelude      >     • Couldn't match type ‘Data.Text.Internal.Text’ with ‘Aeson.Key’
nri-prelude      >       Expected: Aeson.Key
nri-prelude      >         Actual: Text
nri-prelude      >     • In the first argument of ‘(.=)’, namely ‘key’
nri-prelude      >       In the expression: key .= val
nri-prelude      >       In the first argument of ‘Prelude.foldMap’, namely
nri-prelude      >         ‘(\ (Context key val) -> key .= val)’
nri-prelude      >     |
nri-prelude      > 169 |       |> Prelude.foldMap (\(Context key val) -> key .= val)
nri-prelude      >     |                                                 ^^^
@tankorsmash
Copy link

As a Haskell newcomer, it seems like the way around this is to use a different stack resolver to access older versions.

I was able to get stack --resolver lts-18.28 build working, after adding

extra-deps:
  nri-prelude---some-version-str, XYZ

to my generated stack.yaml file.

Not sure what any of it does really, but I got it compiling. If there's a better work around, please let me know!

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

2 participants