Skip to content

Commit

Permalink
Merge pull request #1823 from guggero/go-mod-pain-relief
Browse files Browse the repository at this point in the history
Remove circular dependency issue between `btcec/v2` and main package
  • Loading branch information
Roasbeef committed Mar 10, 2022
2 parents 21b37c0 + 999514c commit 425ed7c
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 5 deletions.
5 changes: 3 additions & 2 deletions btcec/go.mod
Expand Up @@ -3,7 +3,7 @@ module github.com/btcsuite/btcd/btcec/v2
go 1.17

require (
github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0
github.com/davecgh/go-spew v1.1.1
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1
)
Expand All @@ -12,4 +12,5 @@ require github.com/decred/dcrd/crypto/blake256 v1.0.0 // indirect

// We depend on chainhash as is, so we need to replace to use the version of
// chainhash included in the version of btcd we're building in.
replace github.com/btcsuite/btcd => ../
// TODO(guggero): Remove this as soon as we have a tagged version of chainhash.
replace github.com/btcsuite/btcd/chaincfg/chainhash => ../chaincfg/chainhash
9 changes: 8 additions & 1 deletion btcutil/go.mod
Expand Up @@ -5,13 +5,20 @@ go 1.16
require (
github.com/aead/siphash v1.0.1
github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c
github.com/btcsuite/btcd/btcec/v2 v2.1.0
github.com/btcsuite/btcd/btcec/v2 v2.1.1
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0
github.com/davecgh/go-spew v1.1.1
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1
github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
)

// TODO(guggero): Remove this as soon as we have a tagged version of btcec/v2.
replace github.com/btcsuite/btcd/btcec/v2 => ../btcec

replace github.com/btcsuite/btcd => ../

// We depend on chainhash as is, so we need to replace to use the version of
// chainhash included in the version of btcd we're building in.
// TODO(guggero): Remove this as soon as we have a tagged version of chainhash.
replace github.com/btcsuite/btcd/chaincfg/chainhash => ../chaincfg/chainhash
9 changes: 8 additions & 1 deletion btcutil/psbt/go.mod
Expand Up @@ -4,8 +4,9 @@ go 1.17

require (
github.com/btcsuite/btcd v0.22.0-beta.0.20220111032746-97732e52810c
github.com/btcsuite/btcd/btcec/v2 v2.1.0
github.com/btcsuite/btcd/btcec/v2 v2.1.1
github.com/btcsuite/btcd/btcutil v1.1.0
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0
github.com/davecgh/go-spew v1.1.1
)

Expand All @@ -15,8 +16,14 @@ require (
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 // indirect
)

// TODO(guggero): Remove this as soon as we have a tagged version of btcec/v2.
replace github.com/btcsuite/btcd/btcec/v2 => ../../btcec

replace github.com/btcsuite/btcd/btcutil => ../

replace github.com/btcsuite/btcd => ../..

// We depend on chainhash as is, so we need to replace to use the version of
// chainhash included in the version of btcd we're building in.
// TODO(guggero): Remove this as soon as we have a tagged version of chainhash.
replace github.com/btcsuite/btcd/chaincfg/chainhash => ../../chaincfg/chainhash
3 changes: 3 additions & 0 deletions chaincfg/chainhash/go.mod
@@ -0,0 +1,3 @@
module github.com/btcsuite/btcd/chaincfg/chainhash

go 1.17
9 changes: 8 additions & 1 deletion go.mod
@@ -1,8 +1,9 @@
module github.com/btcsuite/btcd

require (
github.com/btcsuite/btcd/btcec/v2 v2.1.0
github.com/btcsuite/btcd/btcec/v2 v2.1.1
github.com/btcsuite/btcd/btcutil v1.1.0
github.com/btcsuite/btcd/chaincfg/chainhash v1.0.0
github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f
github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd
github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792
Expand All @@ -24,8 +25,14 @@ require (

replace github.com/btcsuite/btcd/btcutil => ./btcutil

// TODO(guggero): Remove this as soon as we have a tagged version of btcec/v2.
replace github.com/btcsuite/btcd/btcec/v2 => ./btcec

// We depend on chainhash as is, so we need to replace to use the version of
// chainhash included in the version of btcd we're building in.
// TODO(guggero): Remove this as soon as we have a tagged version of chainhash.
replace github.com/btcsuite/btcd/chaincfg/chainhash => ./chaincfg/chainhash

// The retract statements below fixes an accidental push of the tags of a btcd
// fork.
retract (
Expand Down

0 comments on commit 425ed7c

Please sign in to comment.