Skip to content

Commit

Permalink
Merge PR cosmos#3338: Remove unused code and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jackzampolin authored and cwgoes committed Jan 24, 2019
1 parent 493bbaa commit 0043912
Show file tree
Hide file tree
Showing 71 changed files with 24 additions and 5,037 deletions.
2 changes: 0 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ jobs:
command: |
export PATH="$GOBIN:$PATH"
make install
make install_examples
- persist_to_workspace:
root: /tmp/workspace
paths:
Expand Down Expand Up @@ -103,7 +102,6 @@ jobs:
command: |
export PATH="$GOBIN:$PATH"
make test_cli
make test_examples
test_sim_gaia_nondeterminism:
<<: *linux_defaults
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ dist
devtools-stamp

# Data - ideally these don't exist
examples/basecoin/app/data
baseapp/data/*
client/lcd/keys/*
client/lcd/statik/statik.go
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ If you open a PR on the Cosmos SDK, it is mandatory to update the relevant docum

* If your change relates to the core SDK (baseapp, store, ...), please update the docs/gaia folder, the docs/examples folder and possibly the docs/spec folder.
* If your changes relate specifically to the gaia application (not including modules), please modify the docs/gaia folder.
* If your changes relate to a module, please update the module's spec in docs/spec. If the module is used by gaia and/or basecoin, you might also need to modify docs/gaia and/or docs/examples.
* If your changes relate to a module, please update the module's spec in docs/spec. If the module is used by gaia, you might also need to modify docs/gaia and/or docs/examples.
* If your changes relate to the core of the CLI or Light-client (not specifically to module's CLI/Rest), please modify the docs/clients folder.

## Forking
Expand All @@ -85,7 +85,7 @@ For instance, to create a fork and work on a branch of it, I would:
- Create the fork on github, using the fork button.
- Go to the original repo checked out locally (i.e. `$GOPATH/src/github.com/cosmos/cosmos-sdk`)
- `git remote rename origin upstream`
- `git remote add origin [email protected]:ebuchman/basecoin.git`
- `git remote add origin [email protected]:ebuchman/cosmos-sdk.git`

Now `origin` refers to my fork and `upstream` refers to the Cosmos-SDK version.
So I can `git push -u origin master` to update my fork, and make pull requests to Cosmos-SDK from there.
Expand Down
1 change: 0 additions & 1 deletion Gopkg.lock

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

45 changes: 5 additions & 40 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ GOTOOLS = \
github.com/alecthomas/gometalinter \
github.com/rakyll/statik
GOBIN ?= $(GOPATH)/bin
all: devtools vendor-deps install install_examples install_cosmos-sdk-cli test_lint test

all: devtools get_vendor_deps install test_lint test

# The below include contains the tools target.
include scripts/Makefile
Expand Down Expand Up @@ -54,13 +55,11 @@ build:
ifeq ($(OS),Windows_NT)
go build $(BUILD_FLAGS) -o build/gaiad.exe ./cmd/gaia/cmd/gaiad
go build $(BUILD_FLAGS) -o build/gaiacli.exe ./cmd/gaia/cmd/gaiacli
go build $(BUILD_FLAGS) -o build/logjack ./cmd/logjack
else
go build $(BUILD_FLAGS) -o build/gaiad ./cmd/gaia/cmd/gaiad
go build $(BUILD_FLAGS) -o build/gaiacli ./cmd/gaia/cmd/gaiacli
go build $(BUILD_FLAGS) -o build/gaiareplay ./cmd/gaia/cmd/gaiareplay
go build $(BUILD_FLAGS) -o build/gaiakeyutil ./cmd/gaia/cmd/gaiakeyutil
go build $(BUILD_FLAGS) -o build/logjack ./cmd/logjack
endif

build-linux:
Expand All @@ -69,41 +68,11 @@ build-linux:
update_gaia_lite_docs:
@statik -src=client/lcd/swagger-ui -dest=client/lcd -f

build_cosmos-sdk-cli:
ifeq ($(OS),Windows_NT)
go build $(BUILD_FLAGS) -o build/cosmos-sdk-cli.exe ./cmd/cosmos-sdk-cli
else
go build $(BUILD_FLAGS) -o build/cosmos-sdk-cli ./cmd/cosmos-sdk-cli
endif

build_examples:
ifeq ($(OS),Windows_NT)
go build $(BUILD_FLAGS) -o build/basecoind.exe ./docs/examples/basecoin/cmd/basecoind
go build $(BUILD_FLAGS) -o build/basecli.exe ./docs/examples/basecoin/cmd/basecli
go build $(BUILD_FLAGS) -o build/democoind.exe ./docs/examples/democoin/cmd/democoind
go build $(BUILD_FLAGS) -o build/democli.exe ./docs/examples/democoin/cmd/democli
else
go build $(BUILD_FLAGS) -o build/basecoind ./docs/examples/basecoin/cmd/basecoind
go build $(BUILD_FLAGS) -o build/basecli ./docs/examples/basecoin/cmd/basecli
go build $(BUILD_FLAGS) -o build/democoind ./docs/examples/democoin/cmd/democoind
go build $(BUILD_FLAGS) -o build/democli ./docs/examples/democoin/cmd/democli
endif

install: check-ledger update_gaia_lite_docs
go install $(BUILD_FLAGS) ./cmd/gaia/cmd/gaiad
go install $(BUILD_FLAGS) ./cmd/gaia/cmd/gaiacli
go install $(BUILD_FLAGS) ./cmd/gaia/cmd/gaiareplay
go install $(BUILD_FLAGS) ./cmd/gaia/cmd/gaiakeyutil
go install $(BUILD_FLAGS) ./cmd/logjack

install_examples:
go install $(BUILD_FLAGS) ./docs/examples/basecoin/cmd/basecoind
go install $(BUILD_FLAGS) ./docs/examples/basecoin/cmd/basecli
go install $(BUILD_FLAGS) ./docs/examples/democoin/cmd/democoind
go install $(BUILD_FLAGS) ./docs/examples/democoin/cmd/democli

install_cosmos-sdk-cli:
go install $(BUILD_FLAGS) ./cmd/cosmos-sdk-cli

install_debug:
go install $(BUILD_FLAGS) ./cmd/gaia/cmd/gaiadebug
Expand Down Expand Up @@ -171,10 +140,6 @@ test: test_unit
test_cli:
@go test -p 4 `go list github.com/cosmos/cosmos-sdk/cmd/gaia/cli_test` -tags=cli_test

test_examples:
@go test -count 1 -p 1 `go list github.com/cosmos/cosmos-sdk/docs/examples/basecoin/cli_test` -tags=cli_test
@go test -count 1 -p 1 `go list github.com/cosmos/cosmos-sdk/docs/examples/democoin/cli_test` -tags=cli_test

test_unit:
@VERSION=$(VERSION) go test $(PACKAGES_NOSIMULATION)

Expand Down Expand Up @@ -217,7 +182,7 @@ test_cover:

test_lint:
gometalinter --config=tools/gometalinter.json ./...
!(gometalinter --exclude /usr/lib/go/src/ --exclude client/lcd/statik/statik.go --exclude 'vendor/*' --exclude 'cmd/logjack/*' --disable-all --enable='errcheck' --vendor ./... | grep -v "client/")
!(gometalinter --exclude /usr/lib/go/src/ --exclude client/lcd/statik/statik.go --exclude 'vendor/*' --disable-all --enable='errcheck' --vendor ./... | grep -v "client/")
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" | xargs gofmt -d -s
dep status >> /dev/null
!(grep -n branch Gopkg.toml)
Expand Down Expand Up @@ -273,8 +238,8 @@ localnet-stop:
# To avoid unintended conflicts with file names, always add to .PHONY
# unless there is a reason not to.
# https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html
.PHONY: build build_cosmos-sdk-cli build_examples install install_examples install_cosmos-sdk-cli install_debug dist \
check_tools check_dev_tools draw_deps test test_cli test_unit \
.PHONY: build install install_debug dist \
check_tools check_dev_tools get_vendor_deps draw_deps test test_cli test_unit \
test_cover test_lint benchmark devdoc_init devdoc devdoc_save devdoc_update \
build-linux build-docker-gaiadnode localnet-start localnet-stop \
format check-ledger test_sim_gaia_nondeterminism test_sim_modules test_sim_gaia_fast \
Expand Down
2 changes: 0 additions & 2 deletions baseapp/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@ functionality and act as a bridge between the ABCI interface and the SDK
abstractions.
BaseApp has no state except the CommitMultiStore you provide upon init.
See examples/basecoin/app/* for usage.
*/
package baseapp
2 changes: 1 addition & 1 deletion baseapp/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (app *BaseApp) Deliver(tx sdk.Tx) (result sdk.Result) {
return app.runTx(runTxModeDeliver, nil, tx)
}

// RunForever - BasecoinApp execution and cleanup
// RunForever BasecoinApp execution and cleanup
func RunForever(app abci.Application) {

// Start the ABCI server
Expand Down
162 changes: 0 additions & 162 deletions cmd/cosmos-sdk-cli/cmd/init.go

This file was deleted.

21 changes: 0 additions & 21 deletions cmd/cosmos-sdk-cli/cmd/root.go

This file was deleted.

9 changes: 0 additions & 9 deletions cmd/cosmos-sdk-cli/main.go

This file was deleted.

Loading

0 comments on commit 0043912

Please sign in to comment.