Re: [protobuf] how to build executable protoc-gen-javalite

2018-08-22 Thread Luan Cooper
FYI
https://github.com/protocolbuffers/protobuf/issues/5072

On Thursday, August 23, 2018 at 12:02:52 AM UTC+8, Feng Xiao wrote:
>
> Can you help creat a github issue for this?
>
> On Wed, Aug 22, 2018 at 06:07 Luan Cooper > 
> wrote:
>
>> Hi
>>
>> *We need to build protoc/protoc-gen-javalite ourself, because we changed 
>> some java lite code generate behavior*
>>
>> I followed Github C++ Installation Wiki 
>> https://github.com/protocolbuffers/protobuf/blob/21fc01b63c7f60bae4e230c817a82bd8571a4a70/src/README.md
>> $ ./autogen.sh
>> $ ./configure
>> $ make
>> $ make check
>> $ sudo make install
>>
>> and protoc works well, but javalite does not work
>>
>> this is how I use javalite
>>
>> $ protoc --plugin=/usr/local/lib --javalite_out=tracker-builder-lite/src/
>> main/java/ tracker.proto
>>
>> protoc-gen-javalite: program not found or is not executable
>>
>> --javalite_out: protoc-gen-javalite: Plugin failed with status code 1.
>>
>> this is where I install proto lib to
>>
>> $ l /usr/local/lib/libproto*
>>
>> -rwxr-xr-x  1 root  admin   467K  8 22 21:01 /usr/local/lib/libprotobuf-
>> lite.15.dylib
>>
>> -rw-r--r--  1 root  admin   5.4M  8 22 21:01 /usr/local/lib/libprotobuf-
>> lite.a
>>
>> lrwxr-xr-x  1 root  admin25B  8 22 21:01 /usr/local/lib/libprotobuf-
>> lite.dylib -> libprotobuf-lite.15.dylib
>>
>> -rwxr-xr-x  1 root  admin   979B  8 22 21:01 /usr/local/lib/libprotobuf-
>> lite.la
>>
>> -rwxr-xr-x  1 root  admin   3.2M  8 22 21:01 /usr/local/lib/libprotobuf.
>> 15.dylib
>>
>> -rw-r--r--  1 root  admin54M  8 22 21:01 /usr/local/lib/libprotobuf.a
>>
>> lrwxr-xr-x  1 root  admin20B  8 22 21:01 /usr/local/lib/libprotobuf.
>> dylib -> libprotobuf.15.dylib
>>
>> -rwxr-xr-x  1 root  admin   949B  8 22 21:01 /usr/local/lib/libprotobuf.
>> la
>>
>> -rwxr-xr-x  1 root  admin   2.7M  8 22 21:01 /usr/local/lib/libprotoc.
>> 15.dylib
>>
>> -rw-r--r--  1 root  admin93M  8 22 21:01 /usr/local/lib/libprotoc.a
>>
>> lrwxr-xr-x  1 root  admin18B  8 22 21:01 /usr/local/lib/libprotoc.
>> dylib -> libprotoc.15.dylib
>>
>> -rwxr-xr-x  1 root  admin   967B  8 22 21:01 /usr/local/lib/libprotoc.la
>>
>> Is there anything wrong ? What did I miss?
>>
>> Can anybody help me ?
>>
>>
>> Cooper
>> Shanghai Xingin Ltd
>>
>> -- 
>> 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 post to this group, send email to prot...@googlegroups.com 
>> .
>> Visit this group at https://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 https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


Re: [protobuf] how to build executable protoc-gen-javalite

2018-08-22 Thread 'Feng Xiao' via Protocol Buffers
Can you help creat a github issue for this?

On Wed, Aug 22, 2018 at 06:07 Luan Cooper  wrote:

> Hi
>
> *We need to build protoc/protoc-gen-javalite ourself, because we changed
> some java lite code generate behavior*
>
> I followed Github C++ Installation Wiki
> https://github.com/protocolbuffers/protobuf/blob/21fc01b63c7f60bae4e230c817a82bd8571a4a70/src/README.md
> $ ./autogen.sh
> $ ./configure
> $ make
> $ make check
> $ sudo make install
>
> and protoc works well, but javalite does not work
>
> this is how I use javalite
>
> $ protoc --plugin=/usr/local/lib --javalite_out=tracker-builder-lite/src/
> main/java/ tracker.proto
>
> protoc-gen-javalite: program not found or is not executable
>
> --javalite_out: protoc-gen-javalite: Plugin failed with status code 1.
>
> this is where I install proto lib to
>
> $ l /usr/local/lib/libproto*
>
> -rwxr-xr-x  1 root  admin   467K  8 22 21:01 /usr/local/lib/libprotobuf-
> lite.15.dylib
>
> -rw-r--r--  1 root  admin   5.4M  8 22 21:01 /usr/local/lib/libprotobuf-
> lite.a
>
> lrwxr-xr-x  1 root  admin25B  8 22 21:01 /usr/local/lib/libprotobuf-
> lite.dylib -> libprotobuf-lite.15.dylib
>
> -rwxr-xr-x  1 root  admin   979B  8 22 21:01 /usr/local/lib/libprotobuf-
> lite.la
>
> -rwxr-xr-x  1 root  admin   3.2M  8 22 21:01 /usr/local/lib/libprotobuf.
> 15.dylib
>
> -rw-r--r--  1 root  admin54M  8 22 21:01 /usr/local/lib/libprotobuf.a
>
> lrwxr-xr-x  1 root  admin20B  8 22 21:01 /usr/local/lib/libprotobuf.
> dylib -> libprotobuf.15.dylib
>
> -rwxr-xr-x  1 root  admin   949B  8 22 21:01 /usr/local/lib/libprotobuf.la
>
> -rwxr-xr-x  1 root  admin   2.7M  8 22 21:01 /usr/local/lib/libprotoc.
> 15.dylib
>
> -rw-r--r--  1 root  admin93M  8 22 21:01 /usr/local/lib/libprotoc.a
>
> lrwxr-xr-x  1 root  admin18B  8 22 21:01 /usr/local/lib/libprotoc.
> dylib -> libprotoc.15.dylib
>
> -rwxr-xr-x  1 root  admin   967B  8 22 21:01 /usr/local/lib/libprotoc.la
>
> Is there anything wrong ? What did I miss?
>
> Can anybody help me ?
>
>
> Cooper
> Shanghai Xingin Ltd
>
> --
> 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.
>

-- 
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.


Re: [protobuf] Proposal: a mechanism to deal with sensitive/redacted fields in string output

2018-08-22 Thread Zellyn
Apologies for the long delay, but I got radically reassigned at work, so I 
haven't had much time to work on this. But it keeps niggling at me, because 
I hate our internal protobuf forks so much.

Here is the proposal: Proto Proposal: a “sensitive” field option 

.

Zellyn

On Wednesday, February 22, 2017 at 12:10:14 PM UTC-5, Adam Cozzette wrote:
>
> Hi Zellyn, this sounds like a reasonable idea. As the next step could you 
> perhaps write up a short proposal with more details on what exactly it 
> would mean for a field to be redacted? To me it seems like the important 
> thing would be to make sure it's clear how redacted fields are supposed to 
> be behave in each situation (i.e. when they should be dropped or not), so 
> that there's no uncertainty about when they're dropped and when they're 
> preserved. (For example, we might say that they're never shown when a proto 
> is implicitly stringified but maybe preserved in all other situations?) We 
> might also need to be careful to get this right for all languages early; 
> even if there's some language where we don't care about redaction for now, 
> it will be hard to change later without making a breaking change.
>
> On Thu, Feb 16, 2017 at 1:45 PM, zellyn via Protocol Buffers <
> prot...@googlegroups.com > wrote:
>
>> There are many ways that protocol buffers might be stringified into logs, 
>> accidentally or on purpose, printed in stack traces, etc. The built-in 
>> behavior stringifies the entire protobuf recursively, including all field 
>> data.
>>
>> At Square, we deal with payments, and often have data of varying 
>> sensitivity in protobuf fields, which we'd like to be elided from 
>> stringified output.
>>
>> We use an internal fork of protoc to handle a custom field option, 
>> "redacted", and have also patched the stringification code to print 
>> "[REDACTED]" for those fields. We do the same in Go, and in the C 
>> implementation (for Ruby).
>>
>> Last year, we chatted with the protobuf team, and they were sympathetic 
>> to our use case (in fact, they mentioned that the part of Google that deals 
>> with payments has something similar internally: I think that's where the 
>> "sensitive" name came from). I'd like to get that discussion rolling again.
>>
>> We'd like to see one of the following happen (in decreasing order of 
>> awesomeness for us):
>>
>>- upstreaming of the "redacted" field option, and modification of the 
>>runtimes to elide redacted fields when stringifying
>>- introduction of generic interception points to selectively override 
>>default stringification behavior in Java, Go, and Ruby (at least).
>>- addition of a "SerializeToString" or equivalent method, and removal 
>>of default full-stringification behavior of the toString (Java), String 
>>(Go), etc. - that way you only serialize on purpose
>>   - many tests rely on string comparison, even though nobody is 
>>   supposed to rely on it being stable - perhaps the default behavior 
>> could 
>>   compute a hash?
>>
>> Josh Humpries (who now works at Fullstory) created a proposal 
>>  a while back, but it 
>> didn't go anywhere. I reached out to the protobuf team, and Damien Neil 
>> suggested that this group was the appropriate place to propose such changes.
>>
>> Bikeshed away!
>>
>> Zellyn
>>
>> -- 
>> 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 post to this group, send email to prot...@googlegroups.com 
>> .
>> Visit this group at https://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 https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.


[protobuf] how to build executable protoc-gen-javalite

2018-08-22 Thread Luan Cooper
Hi

*We need to build protoc/protoc-gen-javalite ourself, because we changed 
some java lite code generate behavior*

I followed Github C++ Installation 
Wiki 
https://github.com/protocolbuffers/protobuf/blob/21fc01b63c7f60bae4e230c817a82bd8571a4a70/src/README.md
$ ./autogen.sh
$ ./configure
$ make
$ make check
$ sudo make install

and protoc works well, but javalite does not work

this is how I use javalite

$ protoc --plugin=/usr/local/lib --javalite_out=tracker-builder-lite/src/
main/java/ tracker.proto

protoc-gen-javalite: program not found or is not executable

--javalite_out: protoc-gen-javalite: Plugin failed with status code 1.

this is where I install proto lib to

$ l /usr/local/lib/libproto*

-rwxr-xr-x  1 root  admin   467K  8 22 21:01 /usr/local/lib/libprotobuf-lite
.15.dylib

-rw-r--r--  1 root  admin   5.4M  8 22 21:01 /usr/local/lib/libprotobuf-lite
.a

lrwxr-xr-x  1 root  admin25B  8 22 21:01 /usr/local/lib/libprotobuf-lite
.dylib -> libprotobuf-lite.15.dylib

-rwxr-xr-x  1 root  admin   979B  8 22 21:01 /usr/local/lib/libprotobuf-lite
.la

-rwxr-xr-x  1 root  admin   3.2M  8 22 21:01 /usr/local/lib/libprotobuf.
15.dylib

-rw-r--r--  1 root  admin54M  8 22 21:01 /usr/local/lib/libprotobuf.a

lrwxr-xr-x  1 root  admin20B  8 22 21:01 /usr/local/lib/libprotobuf.
dylib -> libprotobuf.15.dylib

-rwxr-xr-x  1 root  admin   949B  8 22 21:01 /usr/local/lib/libprotobuf.la

-rwxr-xr-x  1 root  admin   2.7M  8 22 21:01 /usr/local/lib/libprotoc.
15.dylib

-rw-r--r--  1 root  admin93M  8 22 21:01 /usr/local/lib/libprotoc.a

lrwxr-xr-x  1 root  admin18B  8 22 21:01 /usr/local/lib/libprotoc.dylib 
-> libprotoc.15.dylib

-rwxr-xr-x  1 root  admin   967B  8 22 21:01 /usr/local/lib/libprotoc.la

Is there anything wrong ? What did I miss?

Can anybody help me ?


Cooper
Shanghai Xingin Ltd

-- 
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.