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

build: strip GOPATH from build paths #6412

Merged
merged 1 commit into from
Jun 11, 2019
Merged

build: strip GOPATH from build paths #6412

merged 1 commit into from
Jun 11, 2019

Conversation

Stebalien
Copy link
Member

This should help fix some of our problems using plugins with go-ipfs.

This should help fix some of our problems using plugins with go-ipfs.
@Stebalien Stebalien requested a review from Kubuxu June 5, 2019 20:26
@Kubuxu
Copy link
Member

Kubuxu commented Jun 6, 2019

How will that work with out of GOPATH builds?

@Stebalien
Copy link
Member Author

How will that work with out of GOPATH builds?

It will still strip the paths from the go modules.

I'm trying to make it easier to build plugins for go-ipfs. Unfortunately, it looks like go barfs if the paths differ (:anger:). My plan is to:

  • Strip the paths when building plugins.
  • Strip the paths when building go-ipfs with make. This won't completely normalize the go-ipfs paths, but will normalize all the dependencies.
  • Build the dists with go mod (Build directly with go mod distributions#240)

All together, this will mean:

  1. If we're building against a local copy of go-ipfs by using a "replace" directive in the plugin's go.mod, all the paths will match (all stripped except maybe the go-ipfs one).
  2. If we're building against a published version of go-ipfs, all the paths will match (all stripped).

We should also consider extracting the plugin interfaces so plugins don't have to depend on go-ipfs itself. That should make this even simpler.

@Kubuxu
Copy link
Member

Kubuxu commented Jun 7, 2019

We can make plugin interface a separate go module (with separate versioning) while keeping it in go-ipfs repo.

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.

2 participants