Dep: Possible bug with non-go pruning

Created on 1 Mar 2018  路  3Comments  路  Source: golang/dep

I've created a sample project to demonstrate this issue. The project has a Gopkg.toml file that clearly states not to prune "non-go" files for the specified package yet after the dep ensure some C files are missing thus go build does not work: https://github.com/tapir/dep-prune-test

To reproduce

go get -d github.com/tapir/dep-prune-test
cd $GOPATH/src/github.com/tapir/dep-prune-test
dep ensure
go build

What version of dep are you using (dep version)?

0.4.1

What dep command did you run?

dep ensure
go build

What did you expect to see?

Expected that the project built correctly

What did you see instead?

test/vendor/github.com/ethereum/go-ethereum/crypto/secp256k1
vendor/github.com/ethereum/go-ethereum/crypto/secp256k1/curve.go:43:10: fatal error: libsecp256k1/include/secp256k1.h: No such file or directory #include "libsecp256k1/include/secp256k1.h"

Most helpful comment

I came across the same issue and determined that for go-ethereum I had to specify:

[[prune.project]]
    name = "github.com/ethereum/go-ethereum"
    non-go = false
    unused-packages = false

specifically, setting unused-packages = false for pruning option for go-ethereum. There must be an edge case throwing off dep for pruning unused packages that use a C library

All 3 comments

I came across the same issue and determined that for go-ethereum I had to specify:

[[prune.project]]
    name = "github.com/ethereum/go-ethereum"
    non-go = false
    unused-packages = false

specifically, setting unused-packages = false for pruning option for go-ethereum. There must be an edge case throwing off dep for pruning unused packages that use a C library

Sorry i didn't respond at the time, but yes, @pkieltyka has the expected resolution. Glad you folks got this sorted!

@pkieltyka 3Q very much.It is very helpful

Was this page helpful?
0 / 5 - 0 ratings