mesos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From haosdent <haosd...@gmail.com>
Subject Re: Mesos v1 API issues for Go
Date Mon, 20 Jun 2016 15:30:00 GMT
Hi, @mincai. I am a bit curious about why need
> (2) mesos/v1/master/allocator.proto ==> mesos/v1/allocator/allocator.proto

Because seems I could generate the proto files for golang successfully.

```
$ cd include
$ find mesos/v1 -name '*.proto' |xargs -I {} protoc
--go_out=/tmp/mesos_proto {}
```

According to dsymonds comment in
https://github.com/golang/protobuf/issues/10
> If two files are in the same package, one shouldn't import the other, but
rather both filenames should be passed to protoc together.

Seems we put allocator.proto and master.proto under mesos/v1/master and
they belongs to the same package is also allowed.

May you share the detail about this? Thank you in advance.

On Sat, Jun 18, 2016 at 2:41 PM, Zhitao Li <zhitaoli.cs@gmail.com> wrote:

> Hi Vinod,
>
> I filed MESOS-5642 for fixing allocator.proto and sent the patch at
> https://reviews.apache.org/r/48902/. Can you please take a look?
>
> Thanks.
>
> On Thu, Jun 16, 2016 at 4:19 PM, Vinod Kone <vinodkone@apache.org> wrote:
>
> > +dev
> >
> > Hey Min,
> >
> > Thanks for the report!
> >
> > (1) and (3) are already fixed (thanks to @haosdent) and upstreamed. We'll
> > make sure to fix (2) in 1.0. Do you mind creating an issue and/or
> sending a
> > review for (2)? I'll be happy to shepherd.
> >
> >
> > P.S: Don't think your email to dev@ was delivered. Make sure you are
> > subscribed to it by sending an email to dev-subscribe@mesos.apache.org
> >
> >
> > On Thu, Jun 16, 2016 at 2:53 PM, Zhitao Li <zhitaoli.cs@gmail.com>
> wrote:
> >
> >>
> >> ---------- Forwarded message ----------
> >> From: Min Cai <mincai@gmail.com>
> >> Date: Wed, Jun 15, 2016 at 12:12 PM
> >> Subject: Mesos v1 API issues for Go
> >> To: dev@mesos.apache.org, zhitaoli.cs@gmail.com
> >>
> >>
> >> Hey,
> >>
> >> We are building a Mesos framework in Go and would like to use the latest
> >> Mesos v1 API. However, when we emit the Go stubs from Mesos v1 API, we
> >> encountered a few issues:
> >>
> >> (1) A circular package importing from mesos.v1.master to
> >> mesos.v1.maintenance to mesos.v1.master.
> >>
> >> mesos.v1.master (mesos/v1/master.proto)
> >>   ==> mesos.v1.maintenance (mesos/v1/maintenance/maintenance.proto)
> >>      ==> mesos.v1.master (mesos/v1/master/allocator.proto)
> >>
> >> (2) We have the same package (mesos.v1.master) with different files in
> >> different directories (mesos/v1/master.proto and
> >> mesos/v1/master/allocator.proto)
> >>
> >> (3) Go doesn't support multiple packages in a single directory. So we
> >> need to move agent.proto and master.proto to its own subdirectory.
> >>
> >> I was able to get around the issues by moving the proto files in my
> local
> >> repro. It would be nice to fix them on the upstream especially for the
> >> circular package dependency.
> >>
> >> (1) mesos/v1/master.proto ==> mesos/v1/master/master.proto
> >> (2) mesos/v1/master/allocator.proto ==>
> mesos/v1/allocator/allocator.proto
> >> (3) mesos/v1/agent.proto ==> mesos/v1/agent/agent.proto
> >>
> >>
> >> Thanks, - Min
> >>
> >>
> >>
> >>
> >> --
> >> Cheers,
> >>
> >> Zhitao Li
> >>
> >
> >
>
>
> --
> Cheers,
>
> Zhitao Li
>



-- 
Best Regards,
Haosdent Huang

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message