Merge pull request #587 from harmony-ek/rel1903_build_fix

rel1903 build fix
pull/586/head
Eugene Kim 6 years ago committed by GitHub
commit 7c591429b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      .gitmodules
  2. 7
      .travis.yml
  3. 4
      core/genesis.go
  4. 2
      core/types/log.go
  5. 2
      core/types/receipt.go
  6. 2
      core/types/transaction.go
  7. 2
      core/vm/logger.go
  8. 17
      go.mod
  9. 4
      scripts/go_executable_build.sh
  10. 2
      scripts/gogenerate.sh
  11. 25
      scripts/travis_checker.sh
  12. 1
      vendor/github.com/ethereum/go-ethereum
  13. 1
      vendor/github.com/libp2p/go-libp2p-kad-dht

7
.gitmodules vendored

@ -1,7 +0,0 @@
[submodule "vendor/github.com/ethereum/go-ethereum"]
path = vendor/github.com/ethereum/go-ethereum
url = https://github.com/harmony-one/go-ethereum
branch = master
[submodule "vendor/github.com/libp2p/go-libp2p-kad-dht"]
path = vendor/github.com/libp2p/go-libp2p-kad-dht
url = https://github.com/libp2p/go-libp2p-kad-dht

@ -3,7 +3,7 @@ go:
- stable
go_import_path: github.com/harmony-one/harmony
install:
- env GO111MODULE=on
- export GO111MODULE=on
- export GOPATH=$HOME/gopath
- export CGO_CPPFLAGS="-I$GOPATH/src/github.com/harmony-one/bls/include -I$GOPATH/src/github.com/harmony-one/mcl/include"
- export CGO_LDFLAGS="-L$GOPATH/src/github.com/harmony-one/bls/lib -L$GOPATH/src/github.com/harmony-one/mcl/lib"
@ -19,7 +19,7 @@ install:
- cd bls
- make
- cd ../harmony
- go get -t -v ./...
- go get -v ./...
- go get -u golang.org/x/lint/golint
- go get -u golang.org/x/tools/cmd/goimports
- go get gopkg.in/check.v1
@ -27,9 +27,8 @@ install:
- go get github.com/golang/mock/mockgen
- go get github.com/golang/protobuf/protoc-gen-go
- ./scripts/install_protoc.sh -V 3.6.1
- ./scripts/travis_checker.sh
- go build -v ./...
script:
- go build -v ./...
- ./scripts/travis_checker.sh
notifications:
slack: harmonyone:gggCd1QQopsQAW8JYgBWiH7M

@ -37,8 +37,8 @@ import (
"github.com/harmony-one/harmony/internal/utils"
)
//go:generate gencodec -type Genesis -field-override genesisSpecMarshaling -out gen_genesis.go
//go:generate gencodec -type GenesisAccount -field-override genesisAccountMarshaling -out gen_genesis_account.go
// no go:generate gencodec -type Genesis -field-override genesisSpecMarshaling -out gen_genesis.go
// no go:generate gencodec -type GenesisAccount -field-override genesisAccountMarshaling -out gen_genesis_account.go
var errGenesisNoConfig = errors.New("genesis has no chain configuration")

@ -24,7 +24,7 @@ import (
"github.com/ethereum/go-ethereum/rlp"
)
//go:generate gencodec -type Log -field-override logMarshaling -out gen_log_json.go
// no go:generate gencodec -type Log -field-override logMarshaling -out gen_log_json.go
// Log represents a contract log event. These events are generated by the LOG opcode and
// stored/indexed by the node.

@ -27,7 +27,7 @@ import (
"github.com/ethereum/go-ethereum/rlp"
)
//go:generate gencodec -type Receipt -field-override receiptMarshaling -out gen_receipt_json.go
// no go:generate gencodec -type Receipt -field-override receiptMarshaling -out gen_receipt_json.go
var (
receiptStatusFailedRLP = []byte{}

@ -29,7 +29,7 @@ import (
"github.com/ethereum/go-ethereum/rlp"
)
//go:generate gencodec -type txdata -field-override txdataMarshaling -out gen_tx_json.go
// no go:generate gencodec -type txdata -field-override txdataMarshaling -out gen_tx_json.go
// Errors constants for Transaction.
var (

@ -51,7 +51,7 @@ type LogConfig struct {
Limit int // maximum length of output, but zero means unlimited
}
//go:generate gencodec -type StructLog -field-override structLogMarshaling -out gen_structlog.go
// no go:generate gencodec -type StructLog -field-override structLogMarshaling -out gen_structlog.go
// StructLog is emitted to the EVM each cycle and lists information about the current internal state
// prior to the execution of the statement.

@ -3,18 +3,25 @@ module github.com/harmony-one/harmony
go 1.12
require (
github.com/StackExchange/wmi v0.0.0-20181212234831-e0a55b97c705 // indirect
github.com/Workiva/go-datastructures v1.0.50
github.com/allegro/bigcache v1.2.0 // indirect
github.com/aristanetworks/goarista v0.0.0-20190308231643-e9fb69a13f45 // indirect
github.com/cespare/cp v1.1.1 // indirect
github.com/deckarep/golang-set v1.7.1 // indirect
github.com/edsrzf/mmap-go v1.0.0 // indirect
github.com/ethereum/go-ethereum v1.8.23
github.com/fjl/memsize v0.0.0-20180929194037-2a09253e352a // indirect
github.com/go-ole/go-ole v1.2.4 // indirect
github.com/go-stack/stack v1.8.0 // indirect
github.com/golang/mock v1.2.0
github.com/golang/protobuf v1.3.0
github.com/gorilla/mux v1.7.0
github.com/harmony-one/bls v0.0.1
github.com/hashicorp/golang-lru v0.5.1
github.com/ipfs/go-datastore v3.2.0+incompatible
github.com/ipfs/go-datastore v0.0.1
github.com/ipfs/go-log v0.0.1
github.com/karalabe/hid v0.0.0-20181128192157-d815e0c1a2e2 // indirect
github.com/libp2p/go-libp2p v0.0.2
github.com/libp2p/go-libp2p-crypto v0.0.1
github.com/libp2p/go-libp2p-discovery v0.0.1
@ -28,8 +35,14 @@ require (
github.com/multiformats/go-multiaddr-net v0.0.1
github.com/pborman/uuid v1.2.0 // indirect
github.com/rjeczalik/notify v0.9.2 // indirect
github.com/rs/cors v1.6.0 // indirect
github.com/shirou/gopsutil v2.18.12+incompatible
github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4 // indirect
github.com/stretchr/testify v1.3.0
github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2
google.golang.org/grpc v1.19.0
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
gopkg.in/urfave/cli.v1 v1.20.0 // indirect
)

@ -1,7 +1,5 @@
#!/usr/bin/env bash
export GO111MODULE=on
declare -A SRC
SRC[harmony]=cmd/harmony/main.go
SRC[txgen]=cmd/client/txgen/main.go
@ -89,7 +87,7 @@ function build_only
if [[ -z "$build" || "$bin" == "$build" ]]; then
rm -f $BINDIR/$bin
echo "building ${SRC[$bin]}"
env GOOS=$GOOS GOARCH=$GOARCH go build -ldflags="-X main.version=v${VERSION} -X main.commit=${COMMIT} -X main.builtAt=${BUILTAT} -X main.builtBy=${BUILTBY}" -o $BINDIR/$bin $RACE ${SRC[$bin]}
env GOOS=$GOOS GOARCH=$GOARCH go build -v -x -ldflags="-X main.version=v${VERSION} -X main.commit=${COMMIT} -X main.builtAt=${BUILTAT} -X main.builtBy=${BUILTBY}" -o $BINDIR/$bin $RACE ${SRC[$bin]}
if [ "$(uname -s)" == "Linux" ]; then
$BINDIR/$bin -version
fi

@ -6,4 +6,4 @@ case "${0}" in
*) progdir=.;;
esac
git grep -l '^//go:generate ' -- '*.go' | \
"${progdir}/xargs_by_dir.sh" go generate
"${progdir}/xargs_by_dir.sh" go generate -v -x

@ -1,6 +1,6 @@
#!/bin/bash
unset -v ok tmpdir goimports_output golint_output progdir
unset -v ok tmpdir gomod_diff_output goimports_output golint_output progdir
ok=true
case "${0}" in
@ -16,13 +16,17 @@ tmpdir=$(mktemp -d)
. "${progdir}/setup_bls_build_flags.sh"
echo "Running go test..."
if go test -v -count=1 ./...
echo "Checking go.mod..."
gomod_diff_output="${tmpdir}/gomod.diff"
if git diff --exit-code -- go.mod > "${gomod_diff_output}"
then
echo "go test succeeded."
echo "go.mod stayed the same as in the repository."
else
echo "go test FAILED!"
ok=false
echo "go.mod has changed from the repository version!"
"${progdir}/print_file.sh" "${gomod_diff_output}" "go.mod diff"
"${progdir}/print_file.sh" go.mod "go.mod changed contents"
#ok=false
echo "Not treating this as an error, but consider updating go.mod!"
fi
echo "Running golint..."
@ -74,6 +78,15 @@ else
ok=false
fi
echo "Running go test..."
if go test -v -count=1 ./...
then
echo "go test succeeded."
else
echo "go test FAILED!"
ok=false
fi
if ! ${ok}
then
echo "Some checks failed; see output above."

@ -1 +0,0 @@
Subproject commit 38cce9ac333d674616047be14c270d7cfbd43641

@ -1 +0,0 @@
Subproject commit 838d43da02fc33899794e1c63fe4bd4d0bfd749a
Loading…
Cancel
Save