Re: [protobuf] How to get all dependency .proto files of a given .proto file hierarchically?

2019-12-04 Thread Yuri Vic
This worked, thanks Nadav!

On Monday, December 2, 2019 at 7:49:50 PM UTC-8, Nadav Samet wrote:
>
> Hi Yuri,
>
> Try this:
>
> protoc --include_imports --descriptor_set_out=/dev/stdout file1.proto 
> fie2.proto ...  | protoc --decode=google.protobuf.FileDescriptorSet 
> google/protobuf/descriptor.proto | grep "^  name: "
>
>
> On Mon, Dec 2, 2019 at 7:30 PM Yuri Vic > 
> wrote:
>
>> On Sunday, December 1, 2019 at 11:53:01 AM UTC-8, Marc Gravell wrote:
>>>
>>> Untested, but can't you just use protoc with the descriptor-set mode to 
>>> build a FileDescriptorSet (IIRC) which will be the processed output of 
>>> protoc's efforts? Then parse it using the details from descriptor.proto, 
>>> and see what descriptors are in the FileDescriptorSet? 
>>>
>>
>>  
>> Doesn't this require building another app just to parse the 
>> FileDescriptorSet file?
>>
>> -- 
>> 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/08957a5c-7821-47ba-8db7-d7b39a7c0ea0%40googlegroups.com
>>  
>> 
>> .
>>
>
>
> -- 
> -Nadav
>

-- 
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/b94f649f-b03b-414b-9052-d26040abb8c3%40googlegroups.com.


Re: [protobuf] How to get all dependency .proto files of a given .proto file hierarchically?

2019-12-03 Thread John Krzemien
Just tried it out. Seems to grab everything!

On Tuesday, December 3, 2019 at 10:35:29 AM UTC-8, John Krzemien wrote:
>
> Won't this only give the 1st level of dependencies? He'll likely need the 
> transitive closure if he's trying to generate and build.
>
> On Monday, December 2, 2019 at 7:49:50 PM UTC-8, Nadav Samet wrote:
>>
>> Hi Yuri,
>>
>> Try this:
>>
>> protoc --include_imports --descriptor_set_out=/dev/stdout file1.proto 
>> fie2.proto ...  | protoc --decode=google.protobuf.FileDescriptorSet 
>> google/protobuf/descriptor.proto | grep "^  name: "
>>
>>
>> On Mon, Dec 2, 2019 at 7:30 PM Yuri Vic  wrote:
>>
>>> On Sunday, December 1, 2019 at 11:53:01 AM UTC-8, Marc Gravell wrote:

 Untested, but can't you just use protoc with the descriptor-set mode to 
 build a FileDescriptorSet (IIRC) which will be the processed output of 
 protoc's efforts? Then parse it using the details from descriptor.proto, 
 and see what descriptors are in the FileDescriptorSet? 

>>>
>>>  
>>> Doesn't this require building another app just to parse the 
>>> FileDescriptorSet file?
>>>
>>> -- 
>>> 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/08957a5c-7821-47ba-8db7-d7b39a7c0ea0%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>>
>>
>> -- 
>> -Nadav
>>
>

-- 
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/a81a0784-5496-4769-8b54-691cbbf23705%40googlegroups.com.


Re: [protobuf] How to get all dependency .proto files of a given .proto file hierarchically?

2019-12-03 Thread Nadav Samet
--include_imports should make protoc provide the full transitive closure.

On Tue, Dec 3, 2019 at 10:35 AM John Krzemien  wrote:

> Won't this only give the 1st level of dependencies? He'll likely need the
> transitive closure if he's trying to generate and build.
>
> On Monday, December 2, 2019 at 7:49:50 PM UTC-8, Nadav Samet wrote:
>>
>> Hi Yuri,
>>
>> Try this:
>>
>> protoc --include_imports --descriptor_set_out=/dev/stdout file1.proto
>> fie2.proto ...  | protoc --decode=google.protobuf.FileDescriptorSet
>> google/protobuf/descriptor.proto | grep "^  name: "
>>
>>
>> On Mon, Dec 2, 2019 at 7:30 PM Yuri Vic  wrote:
>>
>>> On Sunday, December 1, 2019 at 11:53:01 AM UTC-8, Marc Gravell wrote:

 Untested, but can't you just use protoc with the descriptor-set mode to
 build a FileDescriptorSet (IIRC) which will be the processed output of
 protoc's efforts? Then parse it using the details from descriptor.proto,
 and see what descriptors are in the FileDescriptorSet?

>>>
>>>
>>> Doesn't this require building another app just to parse the
>>> FileDescriptorSet file?
>>>
>>> --
>>> 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/08957a5c-7821-47ba-8db7-d7b39a7c0ea0%40googlegroups.com
>>> 
>>> .
>>>
>>
>>
>> --
>> -Nadav
>>
> --
> 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/46aefe6b-d56b-493e-ab22-efaf6f95c1ee%40googlegroups.com
> 
> .
>


-- 
-Nadav

-- 
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/CANZcNEo0ZJE2i52Rq_bXT3yU7MaNMh4m5AceVfG7gMq%3DHH70Ng%40mail.gmail.com.


Re: [protobuf] How to get all dependency .proto files of a given .proto file hierarchically?

2019-12-03 Thread John Krzemien
Won't this only give the 1st level of dependencies? He'll likely need the 
transitive closure if he's trying to generate and build.

On Monday, December 2, 2019 at 7:49:50 PM UTC-8, Nadav Samet wrote:
>
> Hi Yuri,
>
> Try this:
>
> protoc --include_imports --descriptor_set_out=/dev/stdout file1.proto 
> fie2.proto ...  | protoc --decode=google.protobuf.FileDescriptorSet 
> google/protobuf/descriptor.proto | grep "^  name: "
>
>
> On Mon, Dec 2, 2019 at 7:30 PM Yuri Vic > 
> wrote:
>
>> On Sunday, December 1, 2019 at 11:53:01 AM UTC-8, Marc Gravell wrote:
>>>
>>> Untested, but can't you just use protoc with the descriptor-set mode to 
>>> build a FileDescriptorSet (IIRC) which will be the processed output of 
>>> protoc's efforts? Then parse it using the details from descriptor.proto, 
>>> and see what descriptors are in the FileDescriptorSet? 
>>>
>>
>>  
>> Doesn't this require building another app just to parse the 
>> FileDescriptorSet file?
>>
>> -- 
>> 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/08957a5c-7821-47ba-8db7-d7b39a7c0ea0%40googlegroups.com
>>  
>> 
>> .
>>
>
>
> -- 
> -Nadav
>

-- 
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/46aefe6b-d56b-493e-ab22-efaf6f95c1ee%40googlegroups.com.


Re: [protobuf] How to get all dependency .proto files of a given .proto file hierarchically?

2019-12-02 Thread Nadav Samet
Hi Yuri,

Try this:

protoc --include_imports --descriptor_set_out=/dev/stdout file1.proto
fie2.proto ...  | protoc --decode=google.protobuf.FileDescriptorSet
google/protobuf/descriptor.proto | grep "^  name: "


On Mon, Dec 2, 2019 at 7:30 PM Yuri Vic  wrote:

> On Sunday, December 1, 2019 at 11:53:01 AM UTC-8, Marc Gravell wrote:
>>
>> Untested, but can't you just use protoc with the descriptor-set mode to
>> build a FileDescriptorSet (IIRC) which will be the processed output of
>> protoc's efforts? Then parse it using the details from descriptor.proto,
>> and see what descriptors are in the FileDescriptorSet?
>>
>
>
> Doesn't this require building another app just to parse the
> FileDescriptorSet file?
>
> --
> 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/08957a5c-7821-47ba-8db7-d7b39a7c0ea0%40googlegroups.com
> 
> .
>


-- 
-Nadav

-- 
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/CANZcNErnpO7TT1-HBeFCxvkNLj%2BqAwq1A%3DOqO_D17rUXA5D0eQ%40mail.gmail.com.


Re: [protobuf] How to get all dependency .proto files of a given .proto file hierarchically?

2019-12-02 Thread Yuri Vic
On Sunday, December 1, 2019 at 11:53:01 AM UTC-8, Marc Gravell wrote:
>
> Untested, but can't you just use protoc with the descriptor-set mode to 
> build a FileDescriptorSet (IIRC) which will be the processed output of 
> protoc's efforts? Then parse it using the details from descriptor.proto, 
> and see what descriptors are in the FileDescriptorSet? 
>

 
Doesn't this require building another app just to parse the 
FileDescriptorSet file?

-- 
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/08957a5c-7821-47ba-8db7-d7b39a7c0ea0%40googlegroups.com.


Re: [protobuf] How to get all dependency .proto files of a given .proto file hierarchically?

2019-12-01 Thread Marc Gravell
Untested, but can't you just use protoc with the descriptor-set mode to
build a FileDescriptorSet (IIRC) which will be the processed output of
protoc's efforts? Then parse it using the details from descriptor.proto,
and see what descriptors are in the FileDescriptorSet?

-- 
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/CAF95VAzHeYjXi5JRDW5UcCy%3D4ncgfDdN0X-%3Dm-gCjA6oxAxD4A%40mail.gmail.com.