Skip to content

Commit

Permalink
feat(go): update to go 1.13
Browse files Browse the repository at this point in the history
  • Loading branch information
gfanton committed Dec 20, 2019
1 parent 5753167 commit 7f0ea80
Show file tree
Hide file tree
Showing 14 changed files with 442 additions and 392 deletions.
66 changes: 66 additions & 0 deletions build/bazel/com_github_libp2p_go_openssl.BUILD.bzl
@@ -0,0 +1,66 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@bazel_gazelle//:def.bzl", "gazelle")

# gazelle:ignore

go_library(
name = "go_default_library",
srcs = [
"bio.go",
"build.go",
"cert.go",
"ciphers.go",
"ciphers_gcm.go",
"conn.go",
"ctx.go",
"dh.go",
"dhparam.go",
"digest.go",
"engine.go",
"fips.go",
"hmac.go",
"hostname.c",
"hostname.go",
"http.go",
"init.go",
"init_posix.go",
"init_windows.go",
"key.go",
"mapping.go",
"md4.go",
"md5.go",
"net.go",
"nid.go",
"pem.go",
"sha1.go",
"sha256.go",
"shim.c",
"shim.h",
"sni.c",
"ssl.go",
"tickets.go",
],
cgo = True,
clinkopts = select({
"@bazel_tools//src/conditions:darwin": [
"-L/usr/local/opt/openssl/lib"
],
"//conditions:default": [],
}) + [
"-lssl",
"-lcrypto",
],
copts = select({
"@bazel_tools//src/conditions:darwin": [
"-I/usr/local/opt/openssl/include"
],
"//conditions:default": [],
}),
importmap = "berty.tech/go/vendor/github.com/libp2p/go-openssl",
importpath = "github.com/libp2p/go-openssl",
visibility = ["//visibility:public"],
deps = [
"//vendor/github.com/libp2p/go-openssl/utils:go_default_library",
"//vendor/github.com/spacemonkeygo/spacelog:go_default_library",
],
)
1 change: 0 additions & 1 deletion go/BUILD.bazel
Expand Up @@ -2,7 +2,6 @@ load("@bazel_gazelle//:def.bzl", "gazelle")

# gazelle:prefix berty.tech/go
# gazelle:proto disable_global
# gazelle:exclude vendor/golang.org/x/crypto/ed25519/ed25519_go113.go
gazelle(
name = "gazelle",
external = "vendored",
Expand Down
6 changes: 3 additions & 3 deletions go/Makefile
Expand Up @@ -81,7 +81,7 @@ re: clean build
.PHONY: go.lint
go.lint: pb.generate
$(call check-program, golangci-lint)
golangci-lint run --verbose ./...
golangci-lint run --timeout=120s --verbose ./...

.PHONY: nobazel.unittest
go.unittest: pb.generate
Expand All @@ -98,7 +98,7 @@ go.install: pb.generate
##

SAMPLE_GAZELLE_GENERATED_FILE ?= pkg/bertyprotocol/BUILD.bazel # should be the path of a git-ignored bazel-generated file
VENDOR_BAZEL_OVERRIDEN_FILES = vendor/github.com/spacemonkeygo/openssl/BUILD.bazel
VENDOR_BAZEL_OVERRIDEN_FILES = vendor/github.com/libp2p/go-openssl/BUILD.bazel


.PHONY: bazel.lint
Expand Down Expand Up @@ -163,7 +163,7 @@ ibazel.unittest: bazel.generate
## Deps
##

vendor/github.com/spacemonkeygo/openssl/BUILD.bazel: $(abspath ../build/bazel/com_github_spacemonkeygo_openssl.BUILD.bazel) vendor
vendor/github.com/libp2p/go-openssl/BUILD.bazel: $(abspath ../build/bazel/com_github_libp2p_go_openssl.BUILD.bzl) vendor
cp $< $@

$(SAMPLE_GAZELLE_GENERATED_FILE): WORKSPACE vendor $(VENDOR_BAZEL_OVERRIDEN_FILES)
Expand Down
3 changes: 2 additions & 1 deletion go/cmd/berty/main.go
Expand Up @@ -11,8 +11,9 @@ import (
"strings"
"time"

// _ "berty.tech/go/internal/buildconstraints" // fail if bad go version

"berty.tech/go/internal/banner"
_ "berty.tech/go/internal/buildconstraints" // fail if bad go version
"berty.tech/go/internal/grpcutil"
"berty.tech/go/pkg/bertyprotocol"
"berty.tech/go/pkg/errcode"
Expand Down
2 changes: 1 addition & 1 deletion go/config.bzl
Expand Up @@ -7,7 +7,7 @@ def berty_go_config():

go_rules_dependencies()

go_register_toolchains(go_version = "1.12.10")
go_register_toolchains(go_version = "1.13.4")

# gazelle config

Expand Down
5 changes: 3 additions & 2 deletions go/framework/bpbridge/bridge.go
Expand Up @@ -8,8 +8,9 @@ import (
"sync"
"time"

_ "berty.tech/go/internal/buildconstraints" // fail if bad go version
_ "github.com/jinzhu/gorm/dialects/sqlite" // required by gorm
// _ "berty.tech/go/internal/buildconstraints" // fail if bad go version

_ "github.com/jinzhu/gorm/dialects/sqlite" // required by gorm
"github.com/pkg/errors"

"berty.tech/go/internal/grpcutil"
Expand Down
2 changes: 1 addition & 1 deletion go/gen.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 18 additions & 19 deletions go/go.mod

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7f0ea80

Please sign in to comment.