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

Update dependencies of test/dependencies/go.mod #8310

Closed
3 tasks done
schomatis opened this issue Jul 28, 2021 · 6 comments · Fixed by #8928
Closed
3 tasks done

Update dependencies of test/dependencies/go.mod #8310

schomatis opened this issue Jul 28, 2021 · 6 comments · Fixed by #8928
Labels
exp/beginner Can be confidently tackled by newcomers exp/novice Someone with a little familiarity can pick up kind/bug A bug in existing code (including security flaws) P2 Medium: Good to have, but can wait until someone steps up status/ready Ready to be worked
Milestone

Comments

@schomatis
Copy link
Contributor

Checklist

Installation method

built from source

Version

..

Config

..

Description

I'm not sure the rationale for this separate go.mod file but we should update its dependencies to match as close as possible the main one (at least its go version).

@schomatis schomatis added kind/bug A bug in existing code (including security flaws) need/triage Needs initial labeling and prioritization labels Jul 28, 2021
@aschmahmann aschmahmann added P2 Medium: Good to have, but can wait until someone steps up status/ready Ready to be worked exp/novice Someone with a little familiarity can pick up and removed need/triage Needs initial labeling and prioritization labels Jul 30, 2021
@BigLep
Copy link
Contributor

BigLep commented Sep 24, 2021

@schomatis : feel free to take this one on.

@schomatis schomatis self-assigned this Sep 28, 2021
@schomatis
Copy link
Contributor Author

@BigLep I'm temporarily un-assigning myself as I'm sinking too much time without any concrete progress. Will need input on the proper way to approach this. My last fail attempt is in #8478.

More background: I'm failing to do a simple go get -u ./... for this handful of packages as there is an inconsistency in the libp2p and libp2p-core latest minor versions that make this command fail (see libp2p/go-libp2p#1196 for more details on that). Updating each module manually (as I was attempting in the above PR) starts to hit a lot dependency entanglements where I can never reach a checkpoint where I can successfully build all dependencies and hence I'm left at a state where I'm not sure if I'm making progress at all by the updates I'm doing.

@schomatis schomatis removed their assignment Oct 1, 2021
@aschmahmann
Copy link
Contributor

Doing go get -u is unlikely to ever be very useful.

If you update the dependencies to match what they are in go-ipfs you should be fine though. You can then do go get {repo}@latest on the non go-ipfs related dependencies to see if you're able to upgrade to them or not (they might be breaking changes not worth upgrading to).

An easy way to do the go-ipfs dependency matching is:

go get github.com/ipfs/go-ipfs@latest
go mod edit -droprequire github.com/ipfs/go-ipfs
go mod tidy

@schomatis schomatis self-assigned this Oct 4, 2021
@schomatis
Copy link
Contributor Author

Re-assigned myself to give Adin's comment a try.

@BigLep BigLep added the exp/beginner Can be confidently tackled by newcomers label Nov 12, 2021
@schomatis
Copy link
Contributor Author

Working on this again.

@schomatis
Copy link
Contributor Author

I'm still having many errors updating these dependencies (probably due to my own inexperience with Go modules) so I'm un-assigning myself permanently from this issue as I'm not even sure if I'm making any progress and the ROI is very low.

After running Adin's commands I still have issues with the libp2p core versions, see https://discuss.ipfs.io/t/good-tutorials-for-go-ipfs-library/11924/4.
After that I then have issues with graphsync, but I never have too much information to understand what is happening or what should I do (this is definitively my fault given my inexperience), for example:

$ make test_sharness_deps

graphsync-get/graphsync-get.go:27:2: missing go.sum entry for module providing package github.com/libp2p/go-libp2p (imported by github.com/ipfs/go-ipfs/test/dependencies/graphsync-get); to add:
	go get github.com/ipfs/go-ipfs/test/dependencies/graphsync-get

$ go get github.com/ipfs/go-ipfs/test/dependencies/graphsync-get

# github.com/ipfs/go-ipfs/test/dependencies/graphsync-get
graphsync-get/graphsync-get.go:37:3: undefined: storeutil.LoaderForBlockstore
graphsync-get/graphsync-get.go:38:3: undefined: storeutil.StorerForBlockstore
graphsync-get/graphsync-get.go:43:40: undefined: "github.com/ipld/go-ipld-prime/node/basic".Style

In general the restriction of having a single dependency tree for many independent tools seems to put a lot of pressure on how to make all the pieces fit without (AFAICT) a clear benefit other than maintaining a single go.mod file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exp/beginner Can be confidently tackled by newcomers exp/novice Someone with a little familiarity can pick up kind/bug A bug in existing code (including security flaws) P2 Medium: Good to have, but can wait until someone steps up status/ready Ready to be worked
Projects
No open projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants