From 3203401fc5187de903a34e2b6314d95dc4a66e17 Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Wed, 26 Jun 2019 19:47:17 -0500 Subject: [PATCH] main: Add requires for new version modules. This adds requires for newer module versions that are not yet fully integrated to the main go.mod file and a new file with a build tag to ignore it which imports those modules to prevent go mod tidy from removing the otherwise unused entries. --- go.mod | 5 ++++- go.sum | 2 -- require.go | 20 ++++++++++++++++++++ 3 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 require.go diff --git a/go.mod b/go.mod index 09e40790..cd61c438 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( github.com/decred/dcrd/chaincfg v1.5.1 github.com/decred/dcrd/chaincfg/chainhash v1.0.1 github.com/decred/dcrd/connmgr v1.0.2 - github.com/decred/dcrd/database v1.0.3 + github.com/decred/dcrd/database v1.1.0 github.com/decred/dcrd/dcrec v1.0.0 github.com/decred/dcrd/dcrec/secp256k1 v1.0.2 github.com/decred/dcrd/dcrjson/v2 v2.0.0 @@ -43,10 +43,12 @@ replace ( github.com/decred/dcrd/blockchain/stake => ./blockchain/stake github.com/decred/dcrd/certgen => ./certgen github.com/decred/dcrd/chaincfg/chainhash => ./chaincfg/chainhash + github.com/decred/dcrd/chaincfg/v2 => ./chaincfg github.com/decred/dcrd/connmgr => ./connmgr github.com/decred/dcrd/database => ./database github.com/decred/dcrd/dcrec => ./dcrec github.com/decred/dcrd/dcrjson/v2 => ./dcrjson + github.com/decred/dcrd/dcrutil/v2 => ./dcrutil github.com/decred/dcrd/fees => ./fees github.com/decred/dcrd/gcs => ./gcs github.com/decred/dcrd/hdkeychain/v2 => ./hdkeychain @@ -56,5 +58,6 @@ replace ( github.com/decred/dcrd/mining => ./mining github.com/decred/dcrd/peer => ./peer github.com/decred/dcrd/rpcclient/v2 => ./rpcclient + github.com/decred/dcrd/txscript/v2 => ./txscript github.com/decred/dcrd/wire => ./wire ) diff --git a/go.sum b/go.sum index 74bc69be..f0620f57 100644 --- a/go.sum +++ b/go.sum @@ -23,8 +23,6 @@ github.com/decred/dcrd/chaincfg v1.4.0 h1:dIJhXQooiVW5AVZ0c4brylsiwkc8KSawpZ3NPq github.com/decred/dcrd/chaincfg v1.4.0/go.mod h1:ypuM30F+XgZmZTFfAkWHWd0lwwkWWAOAQYNRkRDlYLc= github.com/decred/dcrd/chaincfg v1.5.1 h1:u1Xbq0VTnAXIHW5ECqrWe0VYSgf5vWHqpSiwoLBzxAQ= github.com/decred/dcrd/chaincfg v1.5.1/go.mod h1:FukMzTjkwzjPU+hK7CqDMQe3NMbSZAYU5PAcsx1wlv0= -github.com/decred/dcrd/chaincfg/v2 v2.0.2 h1:VeGY52lHuYT01tIGbvYj+OO0GaGxGaJmnh+4vGca1+U= -github.com/decred/dcrd/chaincfg/v2 v2.0.2/go.mod h1:hpKvhLCDAD/xDZ3V1Pqpv9fIKVYYi11DyxETguazyvg= github.com/decred/dcrd/dcrec/edwards v0.0.0-20180721005212-59fe2b293f69/go.mod h1:+ehP0Hk/mesyZXttxCtBbhPX23BMpZJ1pcVBqUfbmvU= github.com/decred/dcrd/dcrec/edwards v0.0.0-20181208004914-a0816cf4301f/go.mod h1:+ehP0Hk/mesyZXttxCtBbhPX23BMpZJ1pcVBqUfbmvU= github.com/decred/dcrd/dcrec/edwards v0.0.0-20190130161649-59ed4247a1d5/go.mod h1:+ehP0Hk/mesyZXttxCtBbhPX23BMpZJ1pcVBqUfbmvU= diff --git a/require.go b/require.go new file mode 100644 index 00000000..e25a7a99 --- /dev/null +++ b/require.go @@ -0,0 +1,20 @@ +// Copyright (c) 2019 The Decred developers +// Use of this source code is governed by an ISC +// license that can be found in the LICENSE file. + +// +build ignore + +// This file exists to prevent go mod tidy from removing requires for newer +// module versions that are not yet fully integrated and to allow them to be +// automatically discovered by the testing infrastructure. +// +// It is excluded from the build to avoid including unused modules in the final +// binary. + +package main + +import ( + _ "github.com/decred/dcrd/chaincfg/v2" + _ "github.com/decred/dcrd/dcrutil/v2" + _ "github.com/decred/dcrd/txscript/v2" +)