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

[WIP] Fix build, learn gx #50

Closed
wants to merge 2 commits into from
Closed

[WIP] Fix build, learn gx #50

wants to merge 2 commits into from

Conversation

lidel
Copy link
Member

@lidel lidel commented Jan 23, 2018

This PR aims to fix build issues mentioned in #48 and teach me some gx ;-)

Do not merge until all is solved:


@whyrusleeping is the error below due to my lack of experience with gx or a real issue?
Seems that go install fails due to non-gx transitive deps that I don't have locally. Any tips how to solve it?

make install
(..)
[done] [install] fallback-ipfs-shell      QmWFzKEP8iYC6zDWsvp15UKDjfu2qbSqtCoJewozp6HZ9j 0s
go install] 0s                                                                             
../../../gx/ipfs/QmdidTt1eZtEAn1Qv1rF9kHPusm57RkfNnsZsrQndsm8TT/go-ipfs-api/pubsub.go:7:2: cannot find package "github.com/libp2p/go-floodsub" in any of:
	/usr/lib64/go/src/github.com/libp2p/go-floodsub (from $GOROOT)
	/home/lidel/.local/gopath/src/github.com/libp2p/go-floodsub (from $GOPATH)
../../../gx/ipfs/QmdidTt1eZtEAn1Qv1rF9kHPusm57RkfNnsZsrQndsm8TT/go-ipfs-api/dag.go:11:2: cannot find package "github.com/whyrusleeping/go-multipart-files" in any of:
	/usr/lib64/go/src/github.com/whyrusleeping/go-multipart-files (from $GOROOT)
	/home/lidel/.local/gopath/src/github.com/whyrusleeping/go-multipart-files (from $GOPATH)
make: *** [Makefile:38: install] Error 1

old version fails to build due to missing pin
@Stebalien
Copy link
Member

You haven't done anything wrong. go-ipfs-api is missing some deps from its package.json. I'm fixing it now.

@Stebalien
Copy link
Member

Ah. Wait, nevermind. It's an issue with ipfsget.

@Stebalien
Copy link
Member

Wrong again... fallback-ipfs-shell has a bunch of outdated deps that need updating. This was a bug in go-ipfs-api which appears to have been fixed.

@Stebalien
Copy link
Member

We have gx dependency hell:

  1. fallback-ipfs-shell and ipfs-embedded-shell have out of date dependencies with bad package.json's
  2. go-ipfs-api depends on go-libp2p-pubsub, the package that contains the pubsub protobufs.
  3. go-floodsub still contains the pubsub protobufs and doesn't depend on go-libp2p-pubsub. Therefore, we can't load both of these packages at the same time.
  4. go-ipfs depends on go-floodsub.

This means that it's currently impossible to use both go-ipfs-api and go-ipfs in the same package.

Unfortunately, ipfs-embedded-shell does exactly this.

The solution is to:

  1. Make go-floodsub use go-libp2p-pubsub (which should be done ASAP anyways).
  2. Bubble up the update to go-ipfs.
  3. Wait for a go-ipfs release.
  4. Fix ipfs-embedded-shell.
  5. Update fallback-ipfs-shell.

@ghost
Copy link

ghost commented Jan 26, 2018

Make go-floodsub use go-libp2p-pubsub (which should be done ASAP anyways).

That's something I proposed a while back and which was rejected back then -- I just failed to clean up the go-libp2p-pubsub package I had created for that...

@djdv djdv mentioned this pull request Feb 13, 2018
@Stebalien
Copy link
Member

So, the correct solution is to make go-ipfs-api not depend on go-libp2p-pubsub and delete that package. However, I'm not sure exactly what that entails (i.e., what go-ipfs-api should use instead).

@djdv
Copy link
Contributor

djdv commented Mar 27, 2018

@lidel
Can I request a status update?
I've had reports of some users not being able to build go-ipfs because of connection issues with the public gateway.

I'd like to add ipget as an alternative to wget, curl, et al. in the go-ipfs makefiles, along with #51.
I figure this should help those users out as they seem to have no issue connecting to other peers, just the public gateway itself. Likewise, I run a daemon on a local-network machine that I'd rather pull from than hammering the public gateway when testing.

@victorb
Copy link
Member

victorb commented Mar 27, 2018

I've had reports of some users not being able to build go-ipfs because of connection issues with the public gateway.

That's no good. Are these users possibly in China? Could they download a daemon, run it locally and build it that way? It's probably advisable to have that ready as a fallback in any case.

@djdv
Copy link
Contributor

djdv commented Mar 27, 2018

@victorbjelkholm

Are these users possibly in China

It seems to be so:
ipfs/kubo#4745 ipfs/kubo#4851
Given the random nature of it, I wonder if it's just a concentration of misconfigured proxies/VPNs or if it's something else.
Most likely the GFW ipfs/ipfs-update#80 ipfs/kubo#4765

Could they download a daemon, run it locally and build it that way?

That's the current workaround I've been suggesting, it seems to work well.

@lidel
Copy link
Member Author

lidel commented Mar 27, 2018

@djdv No update from me, parked it until deps are fixed (details in #50 (comment))
@Stebalien do you know where are we on the 'fix roadmap'?
Did anything relevant landed/changed with go-ipfs v0.4.14?

@Stebalien
Copy link
Member

See: libp2p/go-libp2p-pubsub#4

@whyrusleeping
Copy link
Member

I think that at this point, we can use entirely gx deps for ipget without depending on go-ipfs!

Everything needed should now be extracted and gx'ed.

@Stebalien
Copy link
Member

@whyrusleeping the issue here is that both go-libp2p-pubsub and go-floodsub register protobuf definitions. go-libp2p-pubsub was a failed extraction.

@Stebalien
Copy link
Member

Replaced by #55.

@Stebalien Stebalien closed this Jan 30, 2019
@lidel lidel deleted the fix-build branch January 31, 2019 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants