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

hprotoc fails to compile against ghc-9.4 #110

Open
mikehulluk opened this issue May 24, 2024 · 0 comments
Open

hprotoc fails to compile against ghc-9.4 #110

mikehulluk opened this issue May 24, 2024 · 0 comments

Comments

@mikehulluk
Copy link

mikehulluk commented May 24, 2024

Using stack - lts-21.25 (ghc-9.4.8)

I can compile the protocol-buffers package into my project OK, using extra-deps, and a git commit:

extra-deps:
  - github: k-bx/protocol-buffers
    commit: ae8084f

Unfortunately stack install hprotoc fails with:

hprotoc                      > /tmp/stack-40acd1bd52916dac/hprotoc-2.4.17/Text/ProtocolBuffers/ProtoCompile/MakeReflections.hs:80:8: error:
hprotoc                      >     • Couldn't match expected type ‘ProtoInfo’
hprotoc                      >                   with actual type ‘Map ProtoName (Seq FieldInfo) -> ProtoInfo’
hprotoc                      >     • Probable cause: ‘ProtoInfo’ is applied to too few arguments
hprotoc                      >       In the expression:
hprotoc                      >         ProtoInfo
hprotoc                      >           protoName (pnPath protoName) (toString rawName) keyInfos
hprotoc                      >           allMessages allEnums allOneofs allKeys
hprotoc                      >       In an equation for ‘makeProtoInfo’:
hprotoc                      >           makeProtoInfo
hprotoc                      >             (unknownField, lazyFieldsOpt, lenses, json)
hprotoc                      >             (NameMap (packageID, hPrefix, hParent) reMap)
hprotoc                      >             fdp@(D.FileDescriptorProto.FileDescriptorProto {D.FileDescriptorProto.name = Just rawName})
hprotoc                      >             = ProtoInfo
hprotoc                      >                 protoName (pnPath protoName) (toString rawName) keyInfos
hprotoc                      >                 allMessages allEnums allOneofs allKeys
hprotoc                      >             where
hprotoc                      >                 packageName = getPackageID packageID :: FIName (Utf8)
hprotoc                      >                 protoName
hprotoc                      >                   = case hParent of
hprotoc                      >                       [] -> ...
hprotoc                      >                       _ -> ProtoName packageName hPrefix (init hParent) (last hParent)
hprotoc                      >                 keyInfos
hprotoc                      >                   = Seq.fromList
hprotoc                      >                       . map
hprotoc                      >                           (\ f
hprotoc                      >                              -> (keyExtendee' reMap f, toFieldInfo' reMap packageName lenses f))
hprotoc                      >                           . F.toList . D.FileDescriptorProto.extension
hprotoc                      >                       $ fdp
hprotoc                      >                 allMessages
hprotoc                      >                   = concatMap
hprotoc                      >                       (processMSG packageName False)
hprotoc                      >                       (F.toList $ D.FileDescriptorProto.message_type fdp)
hprotoc                      >                 ....
hprotoc                      >    |
hprotoc                      > 80 |      = ProtoInfo protoName (pnPath protoName) (toString rawName) keyInfos allMessages allEnums allOneofs allKeys where

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

1 participant