Skip to content

Commit 239063f

Browse files
committed
wip
1 parent 06d4055 commit 239063f

File tree

11 files changed

+63
-77
lines changed

11 files changed

+63
-77
lines changed

.codeclimate.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

.codecov.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ codecov:
99

1010
ignore:
1111
- "_.*"
12-
- "vendor"
1312
- "scripts"
1413
- "contracts"
1514
- "Makefile"
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Go mod tidy check
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
- develop
9+
- '**/feature/**'
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
tidy-check:
16+
name: Ensure `go mod tidy` is clean
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Set up Go
23+
uses: actions/setup-go@v5
24+
with:
25+
# Use the latest stable Go to run tidy. The repo's Makefile also runs plain `go mod tidy`.
26+
# Using `stable` avoids pinning to a possibly non-existent Go version in go.mod.
27+
go-version: stable
28+
cache: true
29+
30+
- name: Show Go version
31+
run: go version
32+
33+
- name: Run go mod tidy (via Makefile if available)
34+
run: |
35+
if make -n tidy >/dev/null 2>&1; then
36+
make tidy
37+
else
38+
go mod tidy
39+
fi
40+
41+
- name: Fail if go.mod or go.sum changed
42+
run: |
43+
git status --porcelain
44+
# Only check for changes in go.mod / go.sum
45+
if ! git diff --exit-code -- go.mod go.sum; then
46+
echo "go mod tidy produced changes. Please run 'go mod tidy' locally and commit the results." >&2
47+
exit 1
48+
fi

.github/workflows/import-check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ jobs:
2020

2121
- name: Run messaging import check
2222
run: |
23-
echo "Finding all Go files outside the messaging and vendor directories..."
24-
files=$(find . -type f -name '*.go' ! -path './messaging/*' ! -path './vendor/*')
23+
echo "Finding all Go files outside the messaging directory..."
24+
files=$(find . -type f -name '*.go' ! -path './messaging/*')
2525
2626
echo "Checking for invalid imports of github.com/status-im/status-go/messaging/*..."
2727
for file in $files; do

.github/workflows/pr.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ jobs:
1919
with:
2020
go-version: 1.24
2121

22+
- name: Get dependencies
23+
run: |
24+
go mod tidy && git diff --exit-code
25+
go mod download
26+
go mod verify
27+
2228
- name: Cache Go dependencies
2329
uses: actions/cache@v4
2430
id: cache-go-deps

.golangci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
version: "2"
22
run:
3-
modules-download-mode: vendor
43
issues-exit-code: 1
54
tests: true
65
linters:
@@ -70,4 +69,3 @@ formatters:
7069
generated: strict
7170
paths:
7271
- static
73-
- vendor

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ RUN mkdir -p /go/src/github.com/status-im/status-go
1818
WORKDIR /go/src/github.com/status-im/status-go
1919

2020
ADD go.mod go.sum ./
21+
RUN go mod download
2122
RUN go install google.golang.org/protobuf/cmd/[email protected]
2223

2324
ADD . .

Makefile

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ all: $(GO_CMD_NAMES)
178178
.PHONY: $(GO_CMD_NAMES) $(GO_CMD_PATHS) $(GO_CMD_BUILDS)
179179
$(GO_CMD_BUILDS): generate
180180
$(GO_CMD_BUILDS): ##@build Build any Go project from cmd folder
181-
$(BUILD_ENV) go build -mod=vendor -v \
181+
$(BUILD_ENV) go build -v \
182182
-tags '$(BUILD_TAGS)' $(BUILD_FLAGS) \
183183
-o ./$@ ./cmd/$(notdir $@)
184184
@echo "Compilation done."
@@ -214,7 +214,7 @@ status-backend: build/bin/status-backend
214214
run-status-backend: PORT ?= 0
215215
run-status-backend: generate
216216
run-status-backend: ##@run Start status-backend server listening to localhost:PORT
217-
go run ./cmd/status-backend --address localhost:${PORT}
217+
go run -mod=mod ./cmd/status-backend --address localhost:${PORT}
218218

219219
push-notification-server: ##@build Build push-notification-server
220220
push-notification-server: build/bin/push-notification-server
@@ -233,7 +233,7 @@ status-go-deps:
233233
statusgo-c-bindings:
234234
## cmd/library/README.md explains the magic incantation behind this
235235
mkdir -p build/bin/statusgo-lib
236-
go run cmd/library/*.go > build/bin/statusgo-lib/main.go
236+
go run -mod=mod cmd/library/*.go > build/bin/statusgo-lib/main.go
237237

238238
statusgo-library: generate
239239
statusgo-library: statusgo-c-bindings $(LIBWAKU) ##@cross-compile Build status-go as static library for current platform
@@ -316,9 +316,9 @@ generate: ##@ Run generate for all given packages using go-generate-fast, fallb
316316
generate-contracts:
317317
go generate ./contracts
318318
download-tokens:
319-
go run ./services/wallet/token/token-lists/default-lists/downloader/main.go
319+
go run -mod=mod ./services/wallet/token/token-lists/default-lists/downloader/main.go
320320
analyze-token-stores:
321-
go run ./services/wallet/token/token-lists/analyzer/main.go
321+
go run -mod=mod ./services/wallet/token/token-lists/analyzer/main.go
322322

323323
prepare-release: clean-release
324324
mkdir -p $(RELEASE_DIR)
@@ -388,7 +388,7 @@ benchmark:
388388

389389
lint-panics: export GOFLAGS ?= -tags='$(BUILD_TAGS)'
390390
lint-panics: generate
391-
go run ./cmd/lint-panics -root="$(PWD)" -skip=./cmd -test=false ./...
391+
go run -mod=mod ./cmd/lint-panics -root="$(PWD)" -skip=./cmd -test=false ./...
392392

393393
lint: generate lint-panics
394394
golangci-lint --build-tags '$(BUILD_TAGS)' run ./...
@@ -405,12 +405,6 @@ deep-clean: clean git-clean
405405
tidy:
406406
go mod tidy
407407

408-
vendor: generate
409-
go mod tidy
410-
go mod vendor
411-
go tool modvendor -copy="**/*.c **/*.h" -v
412-
.PHONY: vendor
413-
414408
migration: DEFAULT_MIGRATION_PATH := appdatabase/migrations/sql
415409
migration:
416410
touch $(DEFAULT_MIGRATION_PATH)/$$(date '+%s')_$(D).up.sql

_assets/ci/Jenkinsfile.tests

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,6 @@ pipeline {
111111
} }
112112
}
113113

114-
stage('Vendor Check') {
115-
steps { script {
116-
nix.develop('make vendor', pure: false)
117-
/* fail build if vendoring hasn't been done */
118-
nix.develop('git diff --exit-code --no-color --stat vendor/')
119-
} }
120-
}
121-
122114
stage('Unit Tests') {
123115
environment {
124116
TEST_POSTGRES_PORT = "${env.DB_PORT}"

go.mod

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ module github.com/status-im/status-go
33
go 1.24.0
44

55
tool (
6-
github.com/goware/modvendor
76
github.com/kevinburke/go-bindata/v4/go-bindata
87
github.com/wadey/gocovmerge
98
go.uber.org/mock/mockgen
@@ -176,7 +175,6 @@ require (
176175
github.com/google/gopacket v1.1.19 // indirect
177176
github.com/google/pprof v0.0.0-20250202011525-fc3143867406 // indirect
178177
github.com/gorilla/securecookie v1.1.1 // indirect
179-
github.com/goware/modvendor v0.5.0 // indirect
180178
github.com/hashicorp/errwrap v1.1.0 // indirect
181179
github.com/hashicorp/go-bexpr v0.1.10 // indirect
182180
github.com/hashicorp/go-multierror v1.1.1 // indirect
@@ -209,7 +207,6 @@ require (
209207
github.com/mattn/go-colorable v0.1.13 // indirect
210208
github.com/mattn/go-isatty v0.0.20 // indirect
211209
github.com/mattn/go-runewidth v0.0.15 // indirect
212-
github.com/mattn/go-zglob v0.0.2-0.20191112051448-a8912a37f9e7 // indirect
213210
github.com/miekg/dns v1.1.63 // indirect
214211
github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b // indirect
215212
github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc // indirect

0 commit comments

Comments
 (0)