libp2p / go-libp2p-examples

Example libp2p applications
MIT License
338 stars 145 forks source link

Add builds to each example #31

Closed petroav closed 5 years ago

petroav commented 5 years ago

When going through the examples I found myself creating a package.json for each example using gx. Unless the imports in the examples are re-written the binaries don't build. I'd like to upstream the Makefiles and the package.json files and save other users the time.

Let me know if you think this is a good/bad idea, thanks! @vyzo @raulk @Stebalien

Stebalien commented 5 years ago

The binaries should build without gx. That's why we aren't using it (we don't want to make users think they have to use gx to use libp2p).

Make sure you have a clean gopath.

raulk commented 5 years ago

Agree with @stebalien. I’d prefer to avoid imposing our world view (gx) to Go developers, unless inevitable. It seems unnecessary in this case, and what you’re seeing is probably the product of some dependency not being clean in your gopath.

Try running a go get -d -u ./.... That’ll update your local deps and scream in case of local changes.

petroav commented 5 years ago

@Stebalien @raulk yep, that makes sense. I definitely don't have a clean gopath as I've checked out and built the other repos. I also got confused by this comment https://github.com/libp2p/go-libp2p-examples/blob/master/http-proxy/proxy.go#L14.

Should I update the README warning other developers of this (not having a clean gopath) and removing the above comment?

Stebalien commented 5 years ago

Please do submit a PR to remove that comment. And yes, a comment in the README stating that this repo does not use gx would be great!