Re: [protobuf] protogen golang - finding source line for diagnostics?

2022-11-07 Thread Steve Simon
great,

that is the push in the right direction I needed.
all sorted now.

-Steve

On Thursday, 3 November 2022 at 15:35:29 UTC acoz...@google.com wrote:

> Things like comments and line numbers from the .proto file are represented 
> in the SourceCodeInfo message here 
> <https://github.com/protocolbuffers/protobuf/blob/88d8f6001d4b14520488f23de36366b7df673373/src/google/protobuf/descriptor.proto#L754>.
>  
> Unfortunately I'm not familiar enough with Go protos or protogen to say 
> exactly how to get ahold of that, but this Location 
> <https://pkg.go.dev/google.golang.org/protobuf/compiler/protogen#Location> 
> type looks promising.
>
> On Thu, Nov 3, 2022 at 3:07 AM Steve Simon  wrote:
>
>> Hi,
>>
>> I am using protogen for go successfully. We are using 
>> extend google.protobuf.ServiceOptions {  as we need to
>> encode extra fields for our backend.
>>
>> When I find typos in the serviceOptions I am parsing I would like to 
>> generate diagnostics which reference the source proto file and line number.
>>
>> I have not found any way to extract the source line number for an object 
>> (Service record in my case). Is it possible?
>>
>> -Steve
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Protocol Buffers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to protobuf+u...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/protobuf/e5e894ff-fba1-4889-9445-12a629d19907n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/protobuf/e5e894ff-fba1-4889-9445-12a629d19907n%40googlegroups.com?utm_medium=email_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/b8b82573-0528-4d0c-ae6d-19f4ee26bfcfn%40googlegroups.com.


[protobuf] protogen golang - finding source line for diagnostics?

2022-11-03 Thread Steve Simon
Hi,

I am using protogen for go successfully. We are using 
extend google.protobuf.ServiceOptions {  as we need to
encode extra fields for our backend.

When I find typos in the serviceOptions I am parsing I would like to 
generate diagnostics which reference the source proto file and line number.

I have not found any way to extract the source line number for an object 
(Service record in my case). Is it possible?

-Steve

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/e5e894ff-fba1-4889-9445-12a629d19907n%40googlegroups.com.


[protobuf] protogen - creating python code from a go plugin?

2022-10-24 Thread Steve Simon
Hi.

We use protobufs with NATS and have added structured comments to our .proto 
files to describe the NATS topic and transaction style we use for a 
particular protobuf Message.

I have a protogen plugin to generate RPC stubs for go but we would like to 
generate similar RPCs for python (for our QA dept).

Am I foolish to try to generate python code from the a go protogen plugin, 
there are some assumptions in the code that I am generating Go code in the 
library [1]?

The only reason I am not generating python from protogen-python is I would 
prefer not to have two implementations of the structured comment parsing 
and validation code.

Thanks for any help,

-Steve


[1] https://github.com/protocolbuffers/protobuf-go

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/ff98b4f2-3901-44cc-924e-fd78d8f09587n%40googlegroups.com.


[protobuf] Re: Rust protobuf support

2021-08-11 Thread 'Simon Hudon' via Protocol Buffers
Rust is not supported by the protobuf team. After exploring different 
options and discussing with the Rust team, I ended up using the 
`rust-protobuf` library and checking in the resulting 
code: http://google3/experimental/rust-pony-endpoint/. That directory 
includes the Rust project that I run to re-generate the protobuf 
implementation as well as the Rust code that uses it.

I hope this helps.
Simon

On Sunday, August 8, 2021 at 1:31:44 PM UTC-4 yimeng...@gmail.com wrote:

> Hi!
>
> I am trying to use protobuf in my rust actix server. There is this library 
> https://github.com/actix/actix-extras/tree/master/actix-protobuf that 
> seems quite nice, but doesn't do codegen. And I see there is this library 
> for rust https://github.com/stepancheg/rust-protobuf/. 
> On the main protobuf page there is no clear support for Rust, so I was 
> just wondering what's the best practice for using protobuf in rust. Am I 
> supposed to use codegen? What value does codegen bring? I think if I don't 
> use codegen, I could do customization for the struct in rust, for example, 
> impl some trait for it. But with codegen, i would lose that flexibility. Is 
> that flexibility discouraged?
>
> Thanks!
> Yimeng
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/f89ecd77-9061-4914-8829-3b63fd01869en%40googlegroups.com.


[protobuf] Protobuf keyword list.

2019-08-28 Thread Simon Su
Hi all , I want to know all the keywords in .proto file, Is there a keyword 
list about this ?

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/6c19732c-a842-4abb-8c2c-dc9d3ff4ac88%40googlegroups.com.


[protobuf] oneof feature example using c++

2019-08-09 Thread SIMON BABY
Hello,

I am new to protobuf. I read the document and came to know that the oneof 
field is similar to union in c or c++. I have the below messages to send 
and receive. Can come one please send me the sending side and receiving 
side parser to get the particular message type and process it.
 

essage Message1 {
   string a = 1;
   string b = 2;}

message Message2 {
   int64 id = 1;
   string data = 2;}




message WrapperMessage {   oneof msg {
Message1 m1 = 2;
Message2 m2 = 3;
}   }



rgds

Simon

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/680e98dd-0f05-4575-ad70-5d7c9b190f76%40googlegroups.com.


Re: [protobuf] Embedded message compression

2019-07-31 Thread Alexandre SIMON
Thanks for your reply, I already found why it doesn't work: uint32 in proto 
file is converted in varint in line... So I changed uint32 to fixed32 but a 
second question happen:
 How to force enum to be a fixed32 and not a uint32 (converted in varint)?

Le mardi 30 juillet 2019 23:46:08 UTC+2, Adam Cozzette a écrit :
>
> I'm not sure what kind of compression gRPC does, but there is a GitHub 
> issue here with some instructions on decoding gRPC packets with Wireshark: 
> https://github.com/grpc/grpc/issues/13586
>
> On Mon, Jul 29, 2019 at 11:57 PM Almon  > wrote:
>
>> Hi everyone,
>>
>> In my project, I use Grpc to exchange messages between server and client 
>> by ethernet and I want to dissect in Wireshark all the messages (and 
>> embedded messages) who are exchanged.
>> I have some troubles to dissect embedded message because I see it 
>> compressed. For example, my embedded message is 24 bytes length but I see 
>> it at 8 bytes length. Althrough, in wireshark, I see the main message not 
>> compressed...
>>
>> Someone know if it's a parameter to set or if it's a grpc internal 
>> process?
>> Else, do we could find the compression algorithm to uncompress embedded 
>> message?
>>
>> Thank you for your help.
>>
>> Alexandre.
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Protocol Buffers" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to prot...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/protobuf/bf597ee7-6a69-4abf-9e95-d4917bbbab7d%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/8a447438-a7c0-4a7e-b5a0-d1fc7d0869b2%40googlegroups.com.


Re: [protobuf] What version of protobuf builds with -std=c++98 or -std=c++03?

2019-07-10 Thread Simon Elliott
On Monday, July 8, 2019 at 11:05:53 PM UTC+1, Adam Cozzette wrote:
>
> The 3.5.x branch contains the most recent code that still builds without 
> requiring C++11.
>

I've tried 3.5.1 and 3.5.2 and both require va_copy which is C++11 and 
later. 

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/bd05cd1d-0062-4284-aaae-04b0dc42f02a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[protobuf] What version of protobuf builds with -std=c++98 or -std=c++03?

2019-07-04 Thread Simon Elliott
In https://github.com/protocolbuffers/protobuf/issues/2780 it's suggested 
that "We may create a branch that works for C++98. The branch will only 
accept bug fixes, but not new features, optimization, etc" 

https://github.com/protocolbuffers/protobuf/issues/3492 "Code should 
compile with --std=c++03 before we switch to c++11 only" has been closed, 
but I can't find the corresponding commit. 

I've tried to build  a few versions but always fall foul of "error: use of 
undeclared identifier 'va_copy'" which as c++ developers will be aware is 
specific to c++11 and later. 

Can anyone advise which version builds with -std=c++98 or -std=c++03?

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/986b414f-53ca-480f-8b4b-510ae70786aa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[protobuf] proto3 hasField return error

2017-01-04 Thread simon . zhang . xi
public class Test {
public static void main(String[] args) throws Exception {

Device device = Device.newBuilder()
.setMeterAperture(0)
.build();
// device.getMeterAlarm();

System.out.println(device.hasField(Device.getDescriptor().findFieldByNumber(Device.METER_APERTURE_FIELD_NUMBER)));
// PRINT false 
}
}

hasField can't return true;

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] 2.6.0rc1 fails to build on mac 10.9

2014-08-21 Thread Simon Newton
$ g++ --version
Configured with:
--prefix=/Applications/Xcode.app/Contents/Developer/usr
--with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.3.0
Thread model: posix


I get the same errors when I use clang++


Errors:

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I/opt/local/include/
-D_THREAD_SAFE -Wall -Wwrite-strings -Woverloaded-virtual
-Wno-sign-compare -O2 -g -DNDEBUG -MT unknown_field_set.lo -MD -MP -MF
.deps/unknown_field_set.Tpo -c google/protobuf/unknown_field_set.cc
-fno-common -DPIC -o .libs/unknown_field_set.o
google/protobuf/message.cc:130:60: error: implicit instantiation of
undefined template 'std::__1::basic_istreamchar,
std::__1::char_traitschar '

  return ParseFromZeroCopyStream(zero_copy_input)  input-eof();

   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iosfwd:109:33:
note: template is declared here

class _LIBCPP_TYPE_VIS_ONLY basic_istream;

^
google/protobuf/message.cc:135:67: error: implicit instantiation of
undefined template 'std::__1::basic_istreamchar,
std::__1::char_traitschar '

  return ParsePartialFromZeroCopyStream(zero_copy_input)  input-eof();

  ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iosfwd:109:33:
note: template is declared here

class _LIBCPP_TYPE_VIS_ONLY basic_istream;

^
google/protobuf/message.cc:175:16: error: implicit instantiation of
undefined template 'std::__1::basic_ostreamchar,
std::__1::char_traitschar '

  return output-good();

   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iosfwd:111:33:
note: template is declared here

class _LIBCPP_TYPE_VIS_ONLY basic_ostream;

^


Let me know if you'd like me to do more testing.

Simon

-- 
You received this message because you are subscribed to the Google Groups 
Protocol Buffers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] Re: 2.6.0 release candidate

2014-08-21 Thread Simon Newton



On Tuesday, August 19, 2014 1:39:28 PM UTC-7, Jie Luo wrote:

 Hi all, 

 I have uploaded the release candidate of protobuf-2.6.0 
 (protobuf-2.6.0rc1) here: 

 https://protobuf.googlecode.com/svn/rc/ 

 The RC1 has been tested on Linux, Mac, Cygwin, MinGW and MSVC (2010, 
 2013). 

 Feel free to try it out. 
 Feedback is highly appreciated. 


There is at least one missing header:

zero_copy_stream_impl_lite.h includes google/protobuf/stubs/stl_util.h 
but stl_util.h isn't installed.

In src/Makefile.am stl_util.h is listed in libprotobuf_lite_la_SOURCES 
rather than nobase_include_HEADERS.
Simon
 


 Thanks, 
 Jie 


-- 
You received this message because you are subscribed to the Google Groups 
Protocol Buffers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


Re: [protobuf] 2.6.0 release candidate

2014-08-21 Thread Simon Newton
On Thu, Aug 21, 2014 at 8:49 AM, Simon Newton si...@nomis52.net wrote:
 I get a build failures on Mac OS X 10.9:

Sorry please ignore that, I was building the wrong RC.

Simon


 $ g++ --version
 Configured with:
 --prefix=/Applications/Xcode.app/Contents/Developer/usr
 --with-gxx-include-dir=/usr/include/c++/4.2.1
 Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
 Target: x86_64-apple-darwin13.3.0
 Thread model: posix

 I get the same errors when I use clang++

 Errors:

 libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I/opt/local/include/
 -D_THREAD_SAFE -Wall -Wwrite-strings -Woverloaded-virtual
 -Wno-sign-compare -O2 -g -DNDEBUG -MT unknown_field_set.lo -MD -MP -MF
 .deps/unknown_field_set.Tpo -c google/protobuf/unknown_field_set.cc
 -fno-common -DPIC -o .libs/unknown_field_set.o
 google/protobuf/message.cc:130:60: error: implicit instantiation of
 undefined template 'std::__1::basic_istreamchar, std::__1::char_traitschar 
 '
   return ParseFromZeroCopyStream(zero_copy_input)  input-eof();
^
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iosfwd:109:33:
 note: template is declared here
 class _LIBCPP_TYPE_VIS_ONLY basic_istream;
 ^
 google/protobuf/message.cc:135:67: error: implicit instantiation of
 undefined template 'std::__1::basic_istreamchar, std::__1::char_traitschar 
 '
   return ParsePartialFromZeroCopyStream(zero_copy_input)  input-eof();
   ^
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iosfwd:109:33:
 note: template is declared here
 class _LIBCPP_TYPE_VIS_ONLY basic_istream;
 ^
 google/protobuf/message.cc:175:16: error: implicit instantiation of
 undefined template 'std::__1::basic_ostreamchar, std::__1::char_traitschar 
 '
   return output-good();
^
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iosfwd:111:33:note:
 template is declared here
 class _LIBCPP_TYPE_VIS_ONLY basic_ostream;
 ^

 Let me know if you'd like me to do more testing.

 On Tue, Aug 19, 2014 at 1:39 PM, 'Jie Luo' via Protocol Buffers
 protobuf@googlegroups.com wrote:
 Hi all,

 I have uploaded the release candidate of protobuf-2.6.0
 (protobuf-2.6.0rc1) here:

 https://protobuf.googlecode.com/svn/rc/

 The RC1 has been tested on Linux, Mac, Cygwin, MinGW and MSVC (2010, 2013).

 Feel free to try it out.
 Feedback is highly appreciated.

 Thanks,
 Jie

 --
 You received this message because you are subscribed to the Google Groups 
 Protocol Buffers group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to protobuf+unsubscr...@googlegroups.com.
 To post to this group, send email to protobuf@googlegroups.com.
 Visit this group at http://groups.google.com/group/protobuf.
 For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
Protocol Buffers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


Re: [protobuf] 2.6.0 release candidate

2014-08-21 Thread Simon Newton
I get a build failures on Mac OS X 10.9:

$ g++ --version
Configured with:
--prefix=/Applications/Xcode.app/Contents/Developer/usr
--with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.3.0
Thread model: posix

I get the same errors when I use clang++

Errors:

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I/opt/local/include/
-D_THREAD_SAFE -Wall -Wwrite-strings -Woverloaded-virtual
-Wno-sign-compare -O2 -g -DNDEBUG -MT unknown_field_set.lo -MD -MP -MF
.deps/unknown_field_set.Tpo -c google/protobuf/unknown_field_set.cc
-fno-common -DPIC -o .libs/unknown_field_set.o
google/protobuf/message.cc:130:60: error: implicit instantiation of
undefined template 'std::__1::basic_istreamchar, std::__1::char_traitschar '
  return ParseFromZeroCopyStream(zero_copy_input)  input-eof();
   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iosfwd:109:33:
note: template is declared here
class _LIBCPP_TYPE_VIS_ONLY basic_istream;
^
google/protobuf/message.cc:135:67: error: implicit instantiation of
undefined template 'std::__1::basic_istreamchar, std::__1::char_traitschar '
  return ParsePartialFromZeroCopyStream(zero_copy_input)  input-eof();
  ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iosfwd:109:33:
note: template is declared here
class _LIBCPP_TYPE_VIS_ONLY basic_istream;
^
google/protobuf/message.cc:175:16: error: implicit instantiation of
undefined template 'std::__1::basic_ostreamchar, std::__1::char_traitschar '
  return output-good();
   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/iosfwd:111:33:note:
template is declared here
class _LIBCPP_TYPE_VIS_ONLY basic_ostream;
^

Let me know if you'd like me to do more testing.

On Tue, Aug 19, 2014 at 1:39 PM, 'Jie Luo' via Protocol Buffers
protobuf@googlegroups.com wrote:
 Hi all,

 I have uploaded the release candidate of protobuf-2.6.0
 (protobuf-2.6.0rc1) here:

 https://protobuf.googlecode.com/svn/rc/

 The RC1 has been tested on Linux, Mac, Cygwin, MinGW and MSVC (2010, 2013).

 Feel free to try it out.
 Feedback is highly appreciated.

 Thanks,
 Jie

 --
 You received this message because you are subscribed to the Google Groups 
 Protocol Buffers group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to protobuf+unsubscr...@googlegroups.com.
 To post to this group, send email to protobuf@googlegroups.com.
 Visit this group at http://groups.google.com/group/protobuf.
 For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
Protocol Buffers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to protobuf+unsubscr...@googlegroups.com.
To post to this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] Problem with accent

2012-03-26 Thread Simon
Hi guys,

I have an annoying problem with some accent.
I build my proto-object, no problem, and when i want to read it the
browser, using .toString function, i have \303\240 instead of à,
\303\250 instead of è, etc...

So i'm wondering where can be the problem ?
Eclipse encode the files in UTF-8, Maven the same.

I just don't know where to look for :/

Thanks !

-- 
You received this message because you are subscribed to the Google Groups 
Protocol Buffers group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.



Re: [protobuf] different results parsing from string in Java and Python

2010-03-01 Thread simon
Thanks, that fixed the problem.

On Sun, Feb 28, 2010 at 11:44:53PM -0800, Kenton Varda wrote:
 2.0.3 is pretty old, and I think it had an endianness issue in Python.  Use
 2.3.0 instead.
 
 On Sun, Feb 28, 2010 at 5:33 PM, metapieman s.d.c.w...@googlemail.comwrote:
 
  Hi,
 
  I'm having a problem reading messages produced in Java using Python.
  I'm using version 2.0.3 on a PowerPC Mac (OS X 10.4.11). I wrote a
  Java program that saves a series of messages to a file. Also using
  Java, I've succeeded in reading the messages back in from the file
  with the parseFrom() method. The problem arises when I try to read
  them in using Python. When I do this, using the ParseFromString()
  method, I get partially correct messages, but all the double fields
  are completely wrong, e.g., instead of the number 1.25 I get
  3.08924426375e-319. Apart from the double fields, the messages are
  read in correctly.
 
  I'd be very grateful for any ideas about what could be going wrong
  here. Thanks!
 
  --
  You received this message because you are subscribed to the Google Groups
  Protocol Buffers group.
  To post to this group, send email to proto...@googlegroups.com.
  To unsubscribe from this group, send email to
  protobuf+unsubscr...@googlegroups.comprotobuf%2bunsubscr...@googlegroups.com
  .
  For more options, visit this group at
  http://groups.google.com/group/protobuf?hl=en.
 
 

-- 
You received this message because you are subscribed to the Google Groups 
Protocol Buffers group.
To post to this group, send email to proto...@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.