mesos/mesos-go

os/user.Current doesn't work without cgo

pires opened this issue · 4 comments

pires commented

We need to make sure users of this library are aware of this when cross-compiling their apps.

See https://github.com/golang/go/blob/master/src/os/user/cgo_lookup_unix.go#L46-L50

jdef commented

... and this applies for users of the v0 API, correct?

pires commented

That's correct. I haven't tried v1 yet but I'm assuming it no longer uses HTTP Mesos API (which doesn't automagically find the user for you).

jdef commented

let's clarify things a bit:

  • v0 implements the Mesos "libmesos" protocol which makes some interesting assumptions about using HTTP as an RPC layer. It does not rely on precompiled Mesos library files and implements all libmesos protocols in pure golang. Many ideas were borrowed and/or copied directly from the mesos c++ scheduler and executor driver (and libprocess) implementations in order to achieve compatibility w/ Mesos. The implementation is complex and many assumptions are scattered throughout the code. This is on maintenance/life-support mode -- future development efforts are focused on a stable, robust v1 implementation.
  • v1 uses the Mesos v1 HTTP API and is also implemented in pure golang. We've tried to set a higher bar in terms of code quality: implementation, modularization, organization, extensibility, etc -- and have consistently aimed to NOT make the same kind of mistakes that ended up landing in the v0 implementation. All current development efforts are focused on this API.
jdef commented

Looks like golang 1.9 made some changes related to this? https://golang.org/doc/go1.9#os/user