three-layer icon indicating copy to clipboard operation
three-layer copied to clipboard

'packedFileDescriptor' is not a (visible) method of class 'Data.ProtoLens.Message'

Open hughjfchen opened this issue 4 years ago • 4 comments

When I tried cabal new-repl, I got the following errors: 'packedFileDescriptor' is not a (visible) method of class 'Data.ProtoLens.Message'. I checked the proto-lens package and this method is at version 0.7.0.0, but I use 'proto-lens' 0.5.0.0. I don't know why it generated the haskell source for 'proto-lens` 0.7.0.0

hughjfchen avatar Jul 28 '20 13:07 hughjfchen

Hello @hughjfchen this project is designed to be build with stack rather than cabal-install. I think using stack will resolve the issue you're having by using compatible dependencies from stackage snapshot.

I know that compile times using cabal-install are much faster than using stack but internally we're using stack so that is the build tool we officially support. You can also refer to stack.yaml if you don't wish to use stack yourself but you'll need to resolve dependency versions on your own.

If you want to check the versions of dependencies available on your system use ghc-pkg list | grep lens.

turboMaCk avatar Jul 28 '20 14:07 turboMaCk

Strange. There is no problem when I generated the haskell source files manually. I now switched to Simple cable build and generated the source each time before start cabal new-repl.

hughjfchen avatar Jul 29 '20 01:07 hughjfchen

I would also recommend checking out https://github.com/kowainik/cake-slayer which is the more fleshed out version of this approach

arbus avatar Jul 29 '20 01:07 arbus

@arbus , Thanks for your suggestion. I've just taken a rough look at the source files of cake-slayer and I think three-layer is more clear from an architecture view, so I'll start from this one and may move to cake-slayer once I got clearer understanding for the architecture. Thanks again.

hughjfchen avatar Jul 29 '20 02:07 hughjfchen