Re: [protobuf] How to generate google.protobuf.Type object from a file

2017-10-24 Thread 'Adam Cozzette' via Protocol Buffers
Yes, I agree that we should update the docs. I'm working on changing the
wording to say that the type server functionality is an optional feature
that one might choose to set up.

On Fri, Oct 20, 2017 at 8:57 PM, Josh Humphries 
wrote:

> On Fri, Oct 20, 2017 at 9:05 PM, 'Adam Cozzette' via Protocol Buffers <
> protobuf@googlegroups.com> wrote:
>
>> I've CC'd Jisi who can confirm this, but I believe we actually went in a
>> different direction and did not implement the type server idea. In practice
>> we use the type_url field as an identifier but there is no actual server
>> returning Type objects.
>>
>
> I've heard this a couple of times before, that the type server stuff was
> abandoned. Could the docs be updated to reflect this? They still indicate
> that type definitions will be downloadable from servers via the type URL.
>
>
>>
>> On Thu, Oct 19, 2017 at 11:52 AM,  wrote:
>>
>>> Hi All,
>>>
>>> The documentation for google.protobuf.Any says that an HTTP GET on the
>>> URL should return a Type object in binary. However, I can't find any
>>> documentation on how create a Type object from a protobuf definition file.
>>> Given a compiled Message, how can I get a Type?
>>>
>>> Thanks,
>>> Pradeep
>>>
>>> --
>>> 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.
>>
>
>

-- 
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 generate google.protobuf.Type object from a file

2017-10-20 Thread Josh Humphries
On Fri, Oct 20, 2017 at 9:05 PM, 'Adam Cozzette' via Protocol Buffers <
protobuf@googlegroups.com> wrote:

> I've CC'd Jisi who can confirm this, but I believe we actually went in a
> different direction and did not implement the type server idea. In practice
> we use the type_url field as an identifier but there is no actual server
> returning Type objects.
>

I've heard this a couple of times before, that the type server stuff was
abandoned. Could the docs be updated to reflect this? They still indicate
that type definitions will be downloadable from servers via the type URL.


>
> On Thu, Oct 19, 2017 at 11:52 AM,  wrote:
>
>> Hi All,
>>
>> The documentation for google.protobuf.Any says that an HTTP GET on the
>> URL should return a Type object in binary. However, I can't find any
>> documentation on how create a Type object from a protobuf definition file.
>> Given a compiled Message, how can I get a Type?
>>
>> Thanks,
>> Pradeep
>>
>> --
>> 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.
>

-- 
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 generate google.protobuf.Type object from a file

2017-10-20 Thread Josh Humphries
FWIW, I've implemented this logic in Go in a library called protoreflect,
with the intention that it could be used for the type server functionality,
as documented.

Take a look at the methods MessageAsPType and EnumAsPType in MessageRegistry:
https://godoc.org/github.com/jhump/protoreflect/dynamic/msgregistry


*Josh Humphries*
jh...@bluegosling.com

On Thu, Oct 19, 2017 at 2:52 PM,  wrote:

> Hi All,
>
> The documentation for google.protobuf.Any says that an HTTP GET on the URL
> should return a Type object in binary. However, I can't find any
> documentation on how create a Type object from a protobuf definition file.
> Given a compiled Message, how can I get a Type?
>
> Thanks,
> Pradeep
>
> --
> 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.


[protobuf] How to generate google.protobuf.Type object from a file

2017-10-19 Thread pradeepg26
Hi All,

The documentation for google.protobuf.Any says that an HTTP GET on the URL 
should return a Type object in binary. However, I can't find any 
documentation on how create a Type object from a protobuf definition file. 
Given a compiled Message, how can I get a Type?

Thanks,
Pradeep

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