dcarp / protobuf-d

Protocol Buffers Compiler Plugin and Support Library for D
Boost Software License 1.0
38 stars 9 forks source link

Error: template google.protobuf.internal.takeN cannot deduce function from argument types !()(ubyte[], long), candidates #10

Closed bubnenkoff closed 5 years ago

bubnenkoff commented 5 years ago
$ dub
Fetching hunt 1.1.0 (getting selected version)...
Fetching hunt-net 0.1.0 (getting selected version)...
Fetching protobuf 0.4.0 (getting selected version)...
Fetching hunt-security 0.1.0 (getting selected version)...
Fetching hunt-imf 0.0.5 (getting selected version)...
Fetching hunt-trace 0.1.8 (getting selected version)...
Fetching boringssl 0.0.1 (getting selected version)...
Performing "debug" build using C:\D\dmd2\windows\bin\dmd.exe for x86.
hunt 1.1.0: building configuration "library"...
hunt-security 0.1.0: building configuration "library"...
hunt-net 0.1.0: building configuration "default"...
protobuf 0.4.0: building configuration "protobuf"...
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\internal.d(473,28): Error: template google.protobuf.internal.takeN cannot deduce function from argument types !()(ubyte[], long), candidates are:
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\internal.d(476,3):        google.protobuf.internal.takeN(R)(ref R inputRange, size_t size)
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\decoding.d(107,30): Error: template instance `google.protobuf.internal.takeLengthPrefixed!(ubyte[])` error instantiating
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\decoding.d(256,23):        instantiated from here: fromProtobuf!(string, ubyte[])
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\decoding.d(240,30):        instantiated from here: fromProtobufByProto!(Proto(1u, cast(Wire)cast(ubyte)0u, cast(Flag)false), string, ubyte[])
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\decoding.d(191,77):        instantiated from here: fromProtobufByField!(typeUrl, _Message, ubyte[])
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\any.d(92,34):        ... (2 instantiations, -v to show) ...
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\any.d(170,72):        instantiated from here: fromProtobuf!(Any, ubyte[])
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\any.d(193,8):        instantiated from here: registerMessageType!(Any, cast(Flag)true)
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\decoding.d(256,23): Error: template instance `google.protobuf.decoding.fromProtobuf!(ubyte[], ubyte[])` error instantiating
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\decoding.d(240,30):        instantiated from here: fromProtobufByProto!(Proto(2u, cast(Wire)cast(ubyte)0u, cast(Flag)false), ubyte[], ubyte[])
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\decoding.d(191,77):        instantiated from here: fromProtobufByField!(value, _Message, ubyte[])
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\any.d(92,34):        instantiated from here: fromProtobuf!(_Message, ubyte[])
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\decoding.d(169,35):        ... (1 instantiations, -v to show) ...
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\any.d(170,72):        instantiated from here: fromProtobuf!(Any, ubyte[])
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\any.d(193,8):        instantiated from here: registerMessageType!(Any, cast(Flag)true)
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\decoding.d(196,28): Error: template instance `google.protobuf.decoding.skipUnknown!(ubyte[])` error instantiating
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\any.d(92,34):        instantiated from here: fromProtobuf!(_Message, ubyte[])
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\decoding.d(169,35):        instantiated from here: fromProtobuf!(ubyte[])
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\any.d(170,72):        instantiated from here: fromProtobuf!(Any, ubyte[])
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\any.d(193,8):        instantiated from here: registerMessageType!(Any, cast(Flag)true)
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\wrappers.d(34,27): Error: template instance `google.protobuf.decoding.fromProtobuf!(_Message, ubyte[])` error instantiating
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\decoding.d(169,35):        instantiated from here: fromProtobuf!(ubyte[])
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\any.d(170,72):        instantiated from here: fromProtobuf!(WrappedValue!(bool, "google.protobuf.BoolValue"), ubyte[])
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\any.d(194,8):        instantiated from here: registerMessageType!(WrappedValue!(bool, "google.protobuf.BoolValue"), cast(Flag)true)
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\decoding.d(240,30): Error: template instance `google.protobuf.decoding.fromProtobufByProto!(Proto(1u, cast(Wire)cast(ubyte)0u, cast(Flag)false), ubyte[], ubyte[])` error instantiating
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\decoding.d(191,77):        instantiated from here: fromProtobufByField!(value, _Message, ubyte[])
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\wrappers.d(34,27):        instantiated from here: fromProtobuf!(_Message, ubyte[])
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\decoding.d(169,35):        instantiated from here: fromProtobuf!(ubyte[])
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\any.d(170,72):        instantiated from here: fromProtobuf!(WrappedValue!(ubyte[], "google.protobuf.BytesValue"), ubyte[])
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\any.d(195,8):        instantiated from here: registerMessageType!(WrappedValue!(ubyte[], "google.protobuf.BytesValue"), cast(Flag)true)
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\wrappers.d(34,27): Error: template instance `google.protobuf.decoding.fromProtobuf!(_Message, ubyte[])` error instantiating
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\decoding.d(169,35):        instantiated from here: fromProtobuf!(ubyte[])
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\any.d(170,72):        instantiated from here: fromProtobuf!(WrappedValue!(double, "google.protobuf.DoubleValue"), ubyte[])
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\any.d(196,8):        instantiated from here: registerMessageType!(WrappedValue!(double, "google.protobuf.DoubleValue"), cast(Flag)true)
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\duration.d(37,34): Error: template instance `google.protobuf.decoding.fromProtobuf!(_Message, ubyte[])` error instantiating
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\decoding.d(169,35):        instantiated from here: fromProtobuf!(ubyte[])
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\any.d(170,72):        instantiated from here: fromProtobuf!(Duration, ubyte[])
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\any.d(197,8):        instantiated from here: registerMessageType!(Duration, cast(Flag)true)
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\decoding.d(240,30): Error: template instance `google.protobuf.decoding.fromProtobufByProto!(Proto(1u, cast(Wire)cast(ubyte)0u, cast(Flag)false), string[], ubyte[])` error instantiating
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\decoding.d(191,77):        instantiated from here: fromProtobufByField!(paths, FieldMask, ubyte[])
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\any.d(170,72):        instantiated from here: fromProtobuf!(FieldMask, ubyte[])
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\any.d(199,8):        instantiated from here: registerMessageType!(FieldMask, cast(Flag)true)
..\..\..\..\..\AppData\Local\dub\packages\protobuf-0.4.0\protobuf\src\google\protobuf\wrappers.d(34,27): Error: template instance `google.protobuf.decoding.fromProtobuf!(_Message, ubyte[])` error instantiating
C:\D\dmd2\windows\bin\dmd.exe failed with exit code 1.

Windows 10. $ dmd DMD32 D Compiler v2.084.0

denizzzka commented 5 years ago

DMD32

What about 64 bit version?

bubnenkoff commented 5 years ago

dub --arch=x86_64 working, but still issue with Hunt. Need fix for 32-bit

dcarp commented 5 years ago

Fixed in v0.4.1. Thank you for reporting the issue. Please reopen it, if it doesn't work for you.