Closed briancaine closed 6 years ago
When I run dep prune
, I get:
Pruning is now performed automatically by dep ensure.
Set prune settings in Gopkg.toml and it it will be applied when running ensure.
dep prune will be removed in a future version, and this command will exit non-0.
Please update your scripts.
It doesn't look pruned
What do you suggest I do?
you have to git checkout
the code in the go-ethereum
package in order to preserve the C header files it uses, after you prune. The pruner doesn't work with cgo yet
Yeah, I was trying to figure that out.
What am I git checkout
-ing? The go-ethereum
package doesn't make it clear.
The C header files in the vendored go-ethereum package have been manually committed because the dep pruner removes them, yet they are necessary.
After you dep ensure
, when you do git status
it will show that some go-ethereum
files were deleted, if you do git checkout vendor/github.com/go-ethereum/path/to/headers
it will restore them. Then you commit the changes as normal
Yeah, I understand that much.
I tried a few different sets of paths for git checkout
, but they either gave me no output, or ... did not match any file(s) known to git.
So I just checked out the go-ethereum repo by hand.
I think this resolves the issue for now.
Although we'll need to figure out the proper command to run because we'll need to do this regularly, I think.
git status
would show which go-ethereum
files to keep if you don't commit the unpruned vendor folder first
OH, I gotcha.
I was doing all of this after I had already made the commit where the files got deleted.
https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
as mentioned here dep
seems to be deleting the transitive
dependencies which can be included in the import graph by listing them in required
and it works fine for the most part by defining
required = [
"github.com/ethereum/go-ethereum",
"github.com/ethereum/go-ethereum/crypto",
"github.com/ethereum/go-ethereum/core",
"github.com/ethereum/go-ethereum/eth",
"github.com/ethereum/go-ethereum/crypto/secp256k1",
]
but fails when we add github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1
and errros out with
Could not introduce github.com/ethereum/go-ethereum@v1.8.1, as its subpackage github.com/ethereum/go-ethereum/crypto/secp256k1/libsecp256k1 does not contain usable Go code (*build.NoGoError).. (Package is required by (root).)
Not sure right now how to fix this error
--- Edit --- https://github.com/golang/dep/issues/1306 seems we can't fix it right now, manually checking it out before commit seems to be the only solution for the time being.
Did you do
dep prune
?