ava-labs / avash

Avash - The Avalanche Shell Client
BSD 3-Clause "New" or "Revised" License
72 stars 34 forks source link

Broken dependencies #200

Open dben89x opened 2 years ago

dben89x commented 2 years ago

After going through a fresh install of go and this package, I get the following after running go build:

../avalanchego/utils/crypto/secp256k1r.go:15:2: cannot find package "github.com/decred/dcrd/dcrec/secp256k1/v3" in any of:
    /usr/local/go/src/github.com/decred/dcrd/dcrec/secp256k1/v3 (from $GOROOT)
    /Users/doug/go/src/github.com/decred/dcrd/dcrec/secp256k1/v3 (from $GOPATH)
../avalanchego/utils/crypto/secp256k1r.go:13:2: cannot find package "github.com/decred/dcrd/dcrec/secp256k1/v3/ecdsa" in any of:
    /usr/local/go/src/github.com/decred/dcrd/dcrec/secp256k1/v3/ecdsa (from $GOROOT)
    /Users/doug/go/src/github.com/decred/dcrd/dcrec/secp256k1/v3/ecdsa (from $GOPATH)
../../spf13/viper/internal/encoding/hcl/codec.go:8:2: cannot find package "github.com/hashicorp/hcl/hcl/printer" in any of:
    /usr/local/go/src/github.com/hashicorp/hcl/hcl/printer (from $GOROOT)
    /Users/doug/go/src/github.com/hashicorp/hcl/hcl/printer (from $GOPATH)

The first two can be resolved by changing the following lines in ava-labs/avalanchego/utils/crypto/secp256k1r.go:

"github.com/decred/dcrd/dcrec/secp256k1/v3/ecdsa" to "github.com/decred/dcrd/dcrec/secp256k1/ecdsa" secp256k1 "github.com/decred/dcrd/dcrec/secp256k1/v3" to secp256k1 "github.com/decred/dcrd/dcrec/secp256k1"

Output from ls in ~/go/src/github.com/decred/dcrd/dcrec/secp256k1:

README.md           ecdh_test.go            field.go            loadprecomputed.go      privkey_test.go
bench_test.go           ecdsa               field_bench_test.go     modnscalar.go           pubkey.go
compressedbytepoints.go     ellipticadaptor.go      field_test.go           modnscalar_bench_test.go    pubkey_test.go
curve.go            ellipticadaptor_test.go     genprecomps.go          modnscalar_test.go      schnorr
curve_test.go           error.go            genstatics.go           nonce.go
doc.go              error_test.go           go.mod              nonce_test.go
ecdh.go             example_test.go         go.sum              privkey.go

I'm not sure how to resolve the last one, as I'm not familiar with the package. But it seems its directory structure has been altered.

Output from ls in ~/go/src/github.com/hashicorp/hcl:

CHANGELOG.md            eval_context.go         guide               json                schema.go
LICENSE             expr_call.go            hcldec              merged.go           spec.md
README.md           expr_list.go            hcled               merged_test.go          specsuite
cmd             expr_map.go         hclparse            ops.go              static_expr.go
diagnostic.go           expr_unwrap.go          hclsimple           ops_test.go         structure.go
diagnostic_text.go      ext             hclsyntax           pos.go              structure_at_pos.go
diagnostic_text_test.go     go.mod              hcltest             pos_scanner.go          traversal.go
didyoumean.go           go.sum              hclwrite            pos_scanner_test.go     traversal_for_expr.go
doc.go              gohcl               integrationtest         pos_test.go         traversal_for_expr_test.go

My go version:

go version go1.17.4 darwin/amd64

I'm unsure whether this is an isolated issue with just my environment, but considering I just did a fresh install of go, I doubt it.

theprojectabot commented 2 years ago

any resolution to this?

theprojectabot commented 2 years ago

I found that doing: export GO111MODULE=auto then go get github.com/ava-labs/avash cd $GOPATH/src/github.com/ava-labs/avash go build

resolved this all