mesos-go icon indicating copy to clipboard operation
mesos-go copied to clipboard

os/user.Current doesn't work without cgo

Open pires opened this issue 8 years ago • 4 comments

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

pires avatar Apr 21 '17 04:04 pires

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

jdef avatar Apr 21 '17 12:04 jdef

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

pires avatar Apr 21 '17 12:04 pires

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 avatar Apr 21 '17 19:04 jdef

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

jdef avatar Sep 11 '17 21:09 jdef