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

docrecords-0.1.0.0 fails to build with aeson-2 #85

Open
sjakobi opened this issue Apr 5, 2022 · 2 comments
Open

docrecords-0.1.0.0 fails to build with aeson-2 #85

sjakobi opened this issue Apr 5, 2022 · 2 comments

Comments

@sjakobi
Copy link

sjakobi commented Apr 5, 2022

src/Data/DocRecord.hs:322:67: error:
    • Couldn't match type: Data.Aeson.KeyMap.KeyMap Value
                     with: HM.HashMap T.Text Value
      Expected: HM.HashMap T.Text Value
        Actual: Object
    • In the second argument of ‘HM.lookup’, namely ‘o’
      In the second argument of ‘($)’, namely ‘HM.lookup p o’
      In the expression: jsonAtPath ps f $ HM.lookup p o
    |
322 |       Just (Object o) -> (o,        jsonAtPath ps f $ HM.lookup p o)
    |                                                                   ^

src/Data/DocRecord.hs:323:27: error:
    • Couldn't match type: HM.HashMap k0 v0
                     with: Data.Aeson.KeyMap.KeyMap Value
      Expected: Object
        Actual: HM.HashMap k0 v0
    • In the expression: HM.empty
      In the expression:
        (HM.empty, jsonAtPath ps f $ Just $ Object HM.empty)
      In a case alternative:
          _ -> (HM.empty, jsonAtPath ps f $ Just $ Object HM.empty)
    |
323 |       _               -> (HM.empty, jsonAtPath ps f $ Just $ Object HM.empty)
    |                           ^^^^^^^^

src/Data/DocRecord.hs:323:69: error:
    • Couldn't match type: HM.HashMap k1 v1
                     with: Data.Aeson.KeyMap.KeyMap Value
      Expected: Object
        Actual: HM.HashMap k1 v1
    • In the first argument of ‘Object’, namely ‘HM.empty’
      In the second argument of ‘($)’, namely ‘Object HM.empty’
      In the second argument of ‘($)’, namely ‘Just $ Object HM.empty’
    |
323 |       _               -> (HM.empty, jsonAtPath ps f $ Just $ Object HM.empty)
    |                                                                     ^^^^^^^^

src/Data/DocRecord.hs:324:40: error:
    • Couldn't match type: HM.HashMap T.Text v2
                     with: Data.Aeson.KeyMap.KeyMap Value
      Expected: Object
        Actual: HM.HashMap T.Text v2
    • In the second argument of ‘($)’, namely ‘HM.delete p obj’
      In the second argument of ‘($)’, namely ‘Object $ HM.delete p obj’
      In the expression: Just $ Object $ HM.delete p obj
    |
324 |     rebuild Nothing  = Just $ Object $ HM.delete p obj
    |                                        ^^^^^^^^^^^^^^^

src/Data/DocRecord.hs:324:52: error:
    • Couldn't match type: Data.Aeson.KeyMap.KeyMap Value
                     with: HM.HashMap T.Text v2
      Expected: HM.HashMap T.Text v2
        Actual: Object
    • In the second argument of ‘HM.delete’, namely ‘obj’
      In the second argument of ‘($)’, namely ‘HM.delete p obj’
      In the second argument of ‘($)’, namely ‘Object $ HM.delete p obj’
    |
324 |     rebuild Nothing  = Just $ Object $ HM.delete p obj
    |                                                    ^^^

src/Data/DocRecord.hs:325:40: error:
    • Couldn't match type: HM.HashMap T.Text Value
                     with: Data.Aeson.KeyMap.KeyMap Value
      Expected: Object
        Actual: HM.HashMap T.Text Value
    • In the second argument of ‘($)’, namely ‘HM.insert p v obj’
      In the second argument of ‘($)’, namely
        ‘Object $ HM.insert p v obj’
      In the expression: Just $ Object $ HM.insert p v obj
    |
325 |     rebuild (Just v) = Just $ Object $ HM.insert p v obj
    |                                        ^^^^^^^^^^^^^^^^^

src/Data/DocRecord.hs:325:54: error:
    • Couldn't match type: Data.Aeson.KeyMap.KeyMap Value
                     with: HM.HashMap T.Text Value
      Expected: HM.HashMap T.Text Value
        Actual: Object
    • In the third argument of ‘HM.insert’, namely ‘obj’
      In the second argument of ‘($)’, namely ‘HM.insert p v obj’
      In the second argument of ‘($)’, namely
        ‘Object $ HM.insert p v obj’
    |
325 |     rebuild (Just v) = Just $ Object $ HM.insert p v obj
    |                                                      ^^^
cabal: Failed to build docrecords-0.1.0.0.
@sjakobi
Copy link
Author

sjakobi commented Apr 5, 2022

As a Hackage trustee I have made a revision that should prevent users from encountering this error: https://hackage.haskell.org/package/docrecords-0.1.0.0/revisions/

@aspiwack
Copy link
Collaborator

Thanks @sjakobi for the revision.

#86 probably fixes this for docrecords. But there are issues with the build system, the current repository is not really representative of what Porcupine currently is internally to Nova Discovery's codebase, @YPares tells me. I'll leave it to him to handle the rest of this conversation

In fact, because Nova Discovery is now the main maintainer of Porcupine, I will transfer the repository to @YPares so the he can best concretise what the future of the open-sourced Porcupine that he envisions.

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