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

Simplify repo module structure #1642

Merged
merged 1 commit into from
Feb 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 13 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,32 +83,28 @@ Building or updating from source requires the following build dependencies:
Installation instructions can be found here: https://golang.org/doc/install.
It is recommended to add `$GOPATH/bin` to your `PATH` at this point.

To build and install from a checked-out repo, run `go install` in the repo's
root directory. Some notes:
To build from a local repo, run `go install` in the repo's root directory.

* Set the `GO111MODULE=on` environment variable if building from within
`GOPATH`.
Some notes:

* Module builds are required. When working with a source tree under
`$GOPATH/src`, set the `GO111MODULE=on` environment variable.

* The `dcrwallet` executable will be installed to `$GOPATH/bin`. `GOPATH`
defaults to `$HOME/go` (or `%USERPROFILE%\go` on Windows) if unset.

## Docker

All tests and linters may be run in a docker container using the script
`run_tests.sh`. This script defaults to using the current supported version of
go. You can run it with the major version of go you would like to use as the
only argument to test a previous on a previous version of go (generally decred
supports the current version of go and the previous one).
The `go get` command can also be used to fetch sources, build, and install
through a single command, without needing to clone the repo. While outside of
any module (`go env GOMOD` prints an empty newline), run:

```
./run_tests.sh 1.12
GO111MODULE=on go get decred.org/dcrwallet
```

To run the tests locally without docker:

```
./run_tests.sh local
```
An optional version, branch, or tag may be appended following a `@` character
after the package name. The implicit default is to build `@latest`, which is
the latest semantic version tag. Building `@master` will build the latest
development version. See `go help module-get` for more details.

## Getting Started

Expand Down
14 changes: 0 additions & 14 deletions chain/go.mod

This file was deleted.

178 changes: 0 additions & 178 deletions chain/go.sum

This file was deleted.

6 changes: 3 additions & 3 deletions chain/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ import (
"sync"
"sync/atomic"

"decred.org/dcrwallet/errors"
"decred.org/dcrwallet/rpc/client/dcrd"
"decred.org/dcrwallet/wallet"
"github.com/decred/dcrd/chaincfg/chainhash"
"github.com/decred/dcrd/wire"
"github.com/decred/dcrwallet/errors/v2"
"github.com/decred/dcrwallet/rpc/client/dcrd"
"github.com/decred/dcrwallet/wallet/v3"
"github.com/jrick/wsrpc/v2"
"golang.org/x/sync/errgroup"
)
Expand Down
10 changes: 5 additions & 5 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ import (
"sort"
"strings"

"decred.org/dcrwallet/errors"
"decred.org/dcrwallet/internal/cfgutil"
"decred.org/dcrwallet/internal/netparams"
"github.com/decred/dcrd/connmgr"
"decred.org/dcrwallet/version"
"decred.org/dcrwallet/wallet"
"decred.org/dcrwallet/wallet/txrules"
"github.com/decred/dcrd/connmgr/v2"
"github.com/decred/dcrd/dcrutil/v2"
"github.com/decred/dcrwallet/errors/v2"
"github.com/decred/dcrwallet/version"
"github.com/decred/dcrwallet/wallet/v3"
"github.com/decred/dcrwallet/wallet/v3/txrules"
"github.com/decred/go-socks/socks"
"github.com/decred/slog"
flags "github.com/jessevdk/go-flags"
Expand Down
14 changes: 7 additions & 7 deletions dcrwallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ import (
"runtime/pprof"
"time"

"decred.org/dcrwallet/chain"
"decred.org/dcrwallet/errors"
ldr "decred.org/dcrwallet/internal/loader"
"decred.org/dcrwallet/internal/prompt"
"decred.org/dcrwallet/internal/rpc/rpcserver"
"decred.org/dcrwallet/p2p"
"decred.org/dcrwallet/spv"
"decred.org/dcrwallet/ticketbuyer"
"decred.org/dcrwallet/version"
"decred.org/dcrwallet/wallet"
"github.com/decred/dcrd/addrmgr"
"github.com/decred/dcrd/wire"
"github.com/decred/dcrwallet/chain/v3"
"github.com/decred/dcrwallet/errors/v2"
"github.com/decred/dcrwallet/p2p/v2"
"github.com/decred/dcrwallet/spv/v3"
"github.com/decred/dcrwallet/ticketbuyer/v4"
"github.com/decred/dcrwallet/version"
"github.com/decred/dcrwallet/wallet/v3"
)

func init() {
Expand Down
8 changes: 0 additions & 8 deletions deployments/go.mod

This file was deleted.

10 changes: 0 additions & 10 deletions deployments/go.sum

This file was deleted.

5 changes: 0 additions & 5 deletions errors/go.mod

This file was deleted.

2 changes: 0 additions & 2 deletions errors/go.sum

This file was deleted.

44 changes: 9 additions & 35 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,62 +3,36 @@ module decred.org/dcrwallet
go 1.12

require (
decred.org/cspp v0.2.0
github.com/decred/base58 v1.0.2 // indirect
github.com/decred/dcrd/addrmgr v1.1.0
github.com/decred/dcrd/blockchain/stake/v2 v2.0.2
github.com/decred/dcrd/blockchain/standalone v1.1.0
github.com/decred/dcrd/blockchain/v2 v2.1.0
github.com/decred/dcrd/certgen v1.1.0
github.com/decred/dcrd/chaincfg/chainhash v1.0.2
github.com/decred/dcrd/chaincfg/v2 v2.3.0
github.com/decred/dcrd/connmgr v1.1.0
github.com/decred/dcrd/connmgr/v2 v2.1.0
github.com/decred/dcrd/dcrec v1.0.0
github.com/decred/dcrd/dcrec/secp256k1/v2 v2.0.0
github.com/decred/dcrd/dcrjson/v3 v3.0.1
github.com/decred/dcrd/dcrutil/v2 v2.0.1
github.com/decred/dcrd/gcs v1.1.0
github.com/decred/dcrd/hdkeychain/v2 v2.1.0
github.com/decred/dcrd/rpc/jsonrpc/types v1.0.1
github.com/decred/dcrd/txscript/v2 v2.1.0
github.com/decred/dcrd/wire v1.3.0
github.com/decred/dcrwallet/chain/v3 v3.0.1
github.com/decred/dcrwallet/errors/v2 v2.0.0
github.com/decred/dcrwallet/p2p/v2 v2.0.0
github.com/decred/dcrwallet/rpc/client/dcrd v1.0.0
github.com/decred/dcrwallet/rpc/jsonrpc/types v1.4.0
github.com/decred/dcrwallet/rpc/walletrpc v0.3.0
github.com/decred/dcrwallet/spv/v3 v3.0.1
github.com/decred/dcrwallet/ticketbuyer/v4 v4.0.1
github.com/decred/dcrwallet/version v1.0.3
github.com/decred/dcrwallet/wallet/v3 v3.1.0
github.com/decred/dcrwallet/walletseed v1.0.3
github.com/decred/go-socks v1.1.0
github.com/decred/slog v1.0.0
github.com/golang/protobuf v1.3.2
github.com/gorilla/websocket v1.4.1
github.com/jessevdk/go-flags v1.4.0
github.com/jrick/bitset v1.0.0
github.com/jrick/logrotate v1.0.0
github.com/jrick/wsrpc/v2 v2.3.1
go.etcd.io/bbolt v1.3.3
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586
golang.org/x/sync v0.0.0-20190423024810-112230192c58
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7
google.golang.org/grpc v1.25.1
)

replace (
github.com/decred/dcrwallet/errors/v2 => ./errors
github.com/decred/dcrwallet/lru => ./lru
github.com/decred/dcrwallet/p2p/v2 => ./p2p
github.com/decred/dcrwallet/pgpwordlist => ./pgpwordlist
github.com/decred/dcrwallet/rpc/jsonrpc/types => ./rpc/jsonrpc/types
github.com/decred/dcrwallet/rpc/walletrpc => ./rpc/walletrpc
github.com/decred/dcrwallet/validate => ./validate
github.com/decred/dcrwallet/version => ./version
github.com/decred/dcrwallet/wallet/v3 => ./wallet
github.com/decred/dcrwallet/walletseed => ./walletseed
)

replace github.com/decred/dcrwallet/spv/v3 => ./spv

replace github.com/decred/dcrwallet/ticketbuyer/v4 => ./ticketbuyer

replace github.com/decred/dcrwallet/chain/v3 => ./chain

replace github.com/decred/dcrwallet/rpc/client/dcrd => ./rpc/client/dcrd

replace github.com/decred/dcrwallet/deployments/v2 => ./deployments
Loading