Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os/user.Current doesn't work without cgo #290

Open
pires opened this issue Apr 21, 2017 · 4 comments
Open

os/user.Current doesn't work without cgo #290

pires opened this issue Apr 21, 2017 · 4 comments

Comments

@pires
Copy link
Contributor

pires commented Apr 21, 2017

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
Copy link
Contributor

jdef commented Apr 21, 2017

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

@pires
Copy link
Contributor Author

pires commented Apr 21, 2017

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
Copy link
Contributor

jdef commented Apr 21, 2017

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
Copy link
Contributor

jdef commented Sep 11, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants