build: add go.work in gitignore (#13100)

* build: add `go.work` in gitignore

* markdownlint
This commit is contained in:
Julien Robert
2022-08-30 21:08:04 +00:00
committed by GitHub
parent 783f597866
commit 2c527d0650
8 changed files with 2549 additions and 2549 deletions
-3
View File
@@ -102,9 +102,6 @@ jobs:
with:
name: "${{ github.sha }}-${{ matrix.part }}-coverage"
path: ./${{ matrix.part }}profile.out
env:
# Here we don't use the go.work for ensuring that the modules are correctly tagged and tidy-ed.
GOWORK: off
sims-notify-success:
needs: [tests]
-3
View File
@@ -163,9 +163,6 @@ jobs:
with:
name: "${{ github.sha }}-${{ matrix.part }}-coverage"
path: ./${{ matrix.part }}profile.out
env:
# Here we don't use the go.work for ensuring that the modules are correctly tagged and tidy-ed.
GOWORK: off
upload-coverage-report:
runs-on: buildjet-4vcpu-ubuntu-2004
+1
View File
@@ -25,6 +25,7 @@ buf-stamp
artifacts
# Go
go.work
go.work.sum
# Data - ideally these don't exist
+2537 -2537
View File
File diff suppressed because it is too large Load Diff
+9 -1
View File
@@ -10,6 +10,7 @@
* [Requesting Reviews](#requesting-reviews)
* [Updating Documentation](#updating-documentation)
* [Dependencies](#dependencies)
* [`go.work`](#gowork)
* [Protobuf](#protobuf)
* [Branching Model and Release](#branching-model-and-release)
* [PR Targeting](#pr-targeting)
@@ -65,7 +66,7 @@ To synchronize we have few major meetings:
* Cosmos Community SDK Development Call on the last Wednesday of every month at 17:00 UTC.
* Cosmos Roadmap Prioritization every 4 weeks on Tuesday at 15:00 UTC (limited participation).
If you would like to join one of those calls, then please contact us on [Discord](https://discord.com/invite/cosmosnetwork) or reach out directly to Cory Levinson from Regen Network (cory@regen.network).
If you would like to join one of those calls, then please contact us on [Discord](https://discord.com/invite/cosmosnetwork) or reach out directly to Marko (@marbar3778).
## Architecture Decision Records (ADR)
@@ -176,6 +177,13 @@ get away with telling people they can just `go get` our software.
Since some dependencies are not under our control, a third party may break our
build, in which case we can fall back on `go mod tidy -v`.
### `go.work`
The Cosmos SDK is a multi-module repo, for this reason, the use of a `go.work` file is handy.
We provide a [`go.work.example`](./go.work.example) that contains all the modules used in the SDK.
Do note that contributions modifying multiple Go modules should be submitted as separate PRs, this allows us to tag the changes and avoid `replace`s.
For consistency between our CI and the local tests, `GOWORK=off` is set in the `Makefile`. This means that the `go.work` file is not used when using `make test` or any other `make` command.
## Protobuf
We use [Protocol Buffers](https://developers.google.com/protocol-buffers) along with [gogoproto](https://github.com/gogo/protobuf) to generate code for use in Cosmos SDK.
+1 -3
View File
@@ -18,11 +18,9 @@ DOCS_DOMAIN=docs.cosmos.network
# RocksDB is a native dependency, so we don't assume the library is installed.
# Instead, it must be explicitly enabled and we warn when it is not.
ENABLE_ROCKSDB ?= false
export GO111MODULE = on
GOWORK = off # we disable the `go.work` for consistency with our CI
# process build tags
build_tags = netgo
ifeq ($(LEDGER_ENABLED),true)
ifeq ($(OS),Windows_NT)
View File
+1 -2
View File
@@ -21,8 +21,7 @@ execute_mod_tests() {
echo ">>> running $go_mod tests"
cd $mod_dir;
# Here we don't use the go.work for ensuring that the modules are correctly tagged and tidy-ed.
GOWORK=off go test -mod=readonly -timeout 30m -coverprofile=${root_dir}/${coverage_file}.tmp -covermode=atomic -tags='norace ledger test_ledger_mock rocksdb_build' ./...
go test -mod=readonly -timeout 30m -coverprofile=${root_dir}/${coverage_file}.tmp -covermode=atomic -tags='norace ledger test_ledger_mock rocksdb_build' ./...
local ret=$?
echo "test return: " $ret;
cd -;