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

*: drop go 1.13 and add go 1.16 support #65

Merged
merged 3 commits into from
Mar 2, 2021
Merged

Conversation

AnnaShaleva
Copy link
Member

Depends on nspcc-dev/neo-go#1795.

And move to go 1.14.
@roman-khimov
Copy link
Member

FTBFS here:

=> Building Go Node image registry.nspcc.ru/neo-bench/neo-go:bench
Sending build context to Docker daemon    116MB
Step 1/17 : FROM golang:1.16-alpine as builder
 ---> fe5c000a4768
Step 2/17 : WORKDIR /neo-go
 ---> Using cache
 ---> 723ea821e5cc
Step 3/17 : RUN apk add --no-cache git
 ---> Using cache
 ---> 5f6fec169386
Step 4/17 : ARG REV="3dacd8391840df1450c52a28064895c68d7bc528"
 ---> Using cache
 ---> 102bfe705510
Step 5/17 : ARG REPO="github.com/nspcc-dev/neo-go"
 ---> Using cache
 ---> c2c57623f402
Step 6/17 : RUN set -x     && git clone https://${REPO}.git /neo-go     && git checkout ${REV}     && export GOGC=off     && export CGO_ENABLED=0     && export GO111MODULE=on     && export MODULE=$(go list -m)     && export VERSION=$(git describe --tags 2>/dev/null | sed 's/^v//')     && export LDFLAGS="-X ${MODULE}/config.Version=${VERSION}"     && go build         -v         -o /go/bin/neo-go         -trimpath         -ldflags "${LDFLAGS}"         ./cli
 ---> Running in 44309565fcc7
+ git clone https://github.com/nspcc-dev/neo-go.git /neo-go
Cloning into '/neo-go'...
+ git checkout 3dacd8391840df1450c52a28064895c68d7bc528
Note: switching to '3dacd8391840df1450c52a28064895c68d7bc528'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 3dacd839 *: add go 1.16 support
+ export 'GOGC=off'
+ export 'CGO_ENABLED=0'
+ export 'GO111MODULE=on'
+ go list -m
+ export 'MODULE=github.com/nspcc-dev/neo-go'
+ git describe --tags
+ sed s/^v//
+ export 'VERSION=0.94.0-pre-92-g3dacd839'
+ export 'LDFLAGS=-X github.com/nspcc-dev/neo-go/config.Version=0.94.0-pre-92-g3dacd839'
+ go build -v -o /go/bin/neo-go -trimpath -ldflags '-X github.com/nspcc-dev/neo-go/config.Version=0.94.0-pre-92-g3dacd839' ./cli
go: downloading github.com/abiosoft/readline v0.0.0-20180607040430-155bce2042db
go: downloading go.uber.org/zap v1.10.0
go: downloading github.com/dgraph-io/badger/v2 v2.0.3
go: downloading github.com/go-redis/redis v6.10.2+incompatible
go: downloading github.com/Workiva/go-datastructures v1.0.50
go: downloading github.com/gorilla/websocket v1.4.2
go: downloading github.com/mr-tron/base58 v1.1.2
go: downloading golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4
go: downloading github.com/btcsuite/btcd v0.20.1-beta
go: downloading github.com/hashicorp/golang-lru v0.5.4
go: downloading github.com/nspcc-dev/rfc6979 v0.2.0
go: downloading go.uber.org/atomic v1.4.0
go: downloading github.com/nspcc-dev/dbft v0.0.0-20210301163629-41cee092ceb5
go: downloading github.com/PaesslerAG/jsonpath v0.1.1
go: downloading github.com/PaesslerAG/gval v1.0.0
go: downloading github.com/spaolacci/murmur3 v1.1.0
go: downloading github.com/nspcc-dev/neofs-crypto v0.2.3
go: downloading github.com/pkg/errors v0.8.1
go: downloading go.uber.org/multierr v1.1.0
go: downloading github.com/dustin/go-humanize v1.0.0
go: downloading github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2
go: downloading github.com/golang/protobuf v1.3.2
go: downloading github.com/dgraph-io/ristretto v0.0.2-0.20200115201040-8f368f2f2ab3
go: downloading github.com/cespare/xxhash v1.1.0
go: downloading github.com/golang/snappy v0.0.1
pkg/network/compress.go:8:2: missing go.sum entry for module providing package github.com/pierrec/lz4 (imported by github.com/nspcc-dev/neo-go/pkg/network); to add:
        go get github.com/nspcc-dev/neo-go/pkg/network
pkg/core/mempool/prometheus.go:3:8: missing go.sum entry for module providing package github.com/prometheus/client_golang/prometheus (imported by github.com/nspcc-dev/neo-go/pkg/core); to add:
        go get github.com/nspcc-dev/neo-go/pkg/core
pkg/network/metrics/prometheus.go:6:2: missing go.sum entry for module providing package github.com/prometheus/client_golang/prometheus/promhttp (imported by github.com/nspcc-dev/neo-go/pkg/network/metrics); to add:
        go get github.com/nspcc-dev/neo-go/pkg/network/metrics
pkg/core/storage/leveldb_store.go:4:2: missing go.sum entry for module providing package github.com/syndtr/goleveldb/leveldb (imported by github.com/nspcc-dev/neo-go/pkg/core/storage); to add:
        go get github.com/nspcc-dev/neo-go/pkg/core/storage
pkg/core/storage/leveldb_store.go:5:2: missing go.sum entry for module providing package github.com/syndtr/goleveldb/leveldb/filter (imported by github.com/nspcc-dev/neo-go/pkg/core/storage); to add:
        go get github.com/nspcc-dev/neo-go/pkg/core/storage
pkg/core/storage/leveldb_store.go:6:2: missing go.sum entry for module providing package github.com/syndtr/goleveldb/leveldb/opt (imported by github.com/nspcc-dev/neo-go/pkg/core/storage); to add:
        go get github.com/nspcc-dev/neo-go/pkg/core/storage
pkg/core/storage/boltdb_store.go:9:2: missing go.sum entry for module providing package github.com/syndtr/goleveldb/leveldb/util (imported by github.com/nspcc-dev/neo-go/pkg/core/storage); to add:
        go get github.com/nspcc-dev/neo-go/pkg/core/storage
cli/options/options.go:13:2: missing go.sum entry for module providing package github.com/urfave/cli (imported by github.com/nspcc-dev/neo-go/cli); to add:
        go get github.com/nspcc-dev/neo-go/cli
pkg/core/storage/boltdb_store.go:10:2: missing go.sum entry for module providing package go.etcd.io/bbolt (imported by github.com/nspcc-dev/neo-go/pkg/core/storage); to add:
        go get github.com/nspcc-dev/neo-go/pkg/core/storage
/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/y/event_log.go:19:8: missing go.sum entry for module providing package golang.org/x/net/trace (imported by github.com/dgraph-io/badger/v2); to add:
        go get github.com/dgraph-io/badger/[email protected]
/go/pkg/mod/github.com/dgraph-io/badger/[email protected]/y/file_dsync.go:21:8: missing go.sum entry for module providing package golang.org/x/sys/unix (imported by github.com/dgraph-io/badger/v2); to add:
        go get github.com/dgraph-io/badger/[email protected]
cli/input/input.go:8:2: missing go.sum entry for module providing package golang.org/x/term (imported by github.com/nspcc-dev/neo-go/cli/input); to add:
        go get github.com/nspcc-dev/neo-go/cli/input
pkg/crypto/keys/nep2.go:11:2: missing go.sum entry for module providing package golang.org/x/text/unicode/norm (imported by github.com/nspcc-dev/neo-go/pkg/crypto/keys); to add:
        go get github.com/nspcc-dev/neo-go/pkg/crypto/keys
pkg/compiler/analysis.go:12:2: missing go.sum entry for module providing package golang.org/x/tools/go/loader (imported by github.com/nspcc-dev/neo-go/pkg/compiler); to add:
        go get github.com/nspcc-dev/neo-go/pkg/compiler
pkg/vm/cli/cli.go:25:2: missing go.sum entry for module providing package gopkg.in/abiosoft/ishell.v2 (imported by github.com/nspcc-dev/neo-go/pkg/vm/cli); to add:
        go get github.com/nspcc-dev/neo-go/pkg/vm/cli
pkg/config/config.go:9:2: missing go.sum entry for module providing package gopkg.in/yaml.v2 (imported by github.com/nspcc-dev/neo-go/cli/smartcontract); to add:
        go get github.com/nspcc-dev/neo-go/cli/smartcontract
The command '/bin/sh -c set -x     && git clone https://${REPO}.git /neo-go     && git checkout ${REV}     && export GOGC=off     && export CGO_ENABLED=0     && export GO111MODULE=on     && export MODULE=$(go list -m)     && export VERSION=$(git describe --tags 2>/dev/null | sed 's/^v//')     && export LDFLAGS="-X ${MODULE}/config.Version=${VERSION}"     && go build         -v         -o /go/bin/neo-go         -trimpath         -ldflags "${LDFLAGS}"         ./cli' returned a non-zero code: 1

@AnnaShaleva
Copy link
Member Author

@roman-khimov, could you, please, try again? I updated modules to the go 1.16 master of neo-go and it builds on my machine.

@roman-khimov
Copy link
Member

Yep, it builds now, let me check the numbers.

@roman-khimov
Copy link
Member

BoltDB, average from three runs:

        Single     Four
1.14 18509.738 5630.285
1.15 18029.719 5508.910
1.16 19375.047 5729.854

1.16 wins, yay! And it seems to be more stable in its results (less min-max difference).

@roman-khimov roman-khimov merged commit 8c81d0c into master Mar 2, 2021
@roman-khimov roman-khimov deleted the drop-go-1-13 branch March 2, 2021 18:42
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