I have made a fork of a repository (specifically, github.com/ethereum/go-ethereum) and am trying to make sure that I can build the main application (cmd/geth
) before developing on the fork. However, due to the upstream source importing internal packages, the build does not work in my fork.
I have tried this both using GOPATH and Go modules. In each case, when I try to run go install github.com/<me>/go-ethereum/cmd/geth
) I get the following error:
cmd/geth/main.go:40:2: use of internal package github.com/ethereum/go-ethereum/internal/debug not allowed
In the Go module approach, I have tried adding a replace directive to use my fork instead:
replace github.com/ethereum/go-ethereum => github.com/<me>/go-ethereum master
But this leads to the same error.
I am happy to provide more information (e.g., build output) if that would be helpful, but it seems like there is something straightforward that I am missing, rather than simply replacing all instances of ethereum/go-ethereum/internal
with <me>/go-ethereum/internal
.