@@ -43,12 +43,7 @@ GOTAGSLIST := sqlite_unlock_notify sqlite_omit_load_extension
4343# e.g. make GOTAGSCUSTOM=msgtrace
4444GOTAGSLIST += ${GOTAGSCUSTOM}
4545
46- # If available, use gotestsum instead of 'go test'.
47- ifeq (, $(shell which gotestsum) )
48- export GOTESTCOMMAND =go test
49- else
50- export GOTESTCOMMAND =gotestsum --format pkgname --jsonfile testresults.json --
51- endif
46+ GOTESTCOMMAND := go tool -modfile=tool.mod gotestsum --format pkgname --jsonfile testresults.json --
5247
5348ifeq ($(OS_TYPE ) , darwin)
5449# M1 Mac--homebrew install location in /opt/homebrew
@@ -109,8 +104,8 @@ fix: build
109104modernize :
110105 GOTOOLCHAIN=auto go run golang.org/x/tools/go/analysis/passes/modernize/cmd/modernize@latest -any=false -bloop=false -rangeint=false -fmtappendf=false -waitgroup=false -stringsbuilder=false -omitzero=false -fix ./...
111106
112- lint : deps
113- $( GOBIN ) /golangci-lint run -c .golangci.yml
107+ lint :
108+ go run github.com /golangci/golangci -lint/v2/cmd/golangci-lint@v2.6.1 run -c .golangci.yml
114109
115110warninglint : custom-golangci-lint
116111 ./custom-golangci-lint run -c .golangci-warnings.yml
@@ -143,7 +138,7 @@ cover:
143138prof :
144139 cd node && go test $(GOTAGS ) -cpuprofile=cpu.out -memprofile=mem.out -mutexprofile=mutex.out
145140
146- generate : deps
141+ generate :
147142 PATH=$(GOBIN ) :$$ PATH go generate ./...
148143
149144msgp : $(patsubst % ,% /msgp_gen.go,$(MSGP_GENERATE ) )
@@ -154,13 +149,13 @@ api:
154149logic :
155150 make -C data/transactions/logic
156151
157-
158- % /msgp_gen.go : deps ALWAYS
152+ MSGP := go run github.com/algorand/msgp@v1.1.61
153+ % /msgp_gen.go : ALWAYS
159154 @set +e; \
160- printf " msgp: $( @D) ..." ; \
161- $(GOBIN ) /msgp -file ./$(@D ) -o $@ -warnmask github.com/algorand/go-algorand > ./$@ .out 2>&1 ; \
155+ printf " $( MSGP ) $( @D) ..." ; \
156+ $(MSGP ) -file ./$(@D ) -o $@ -warnmask github.com/algorand/go-algorand > ./$@ .out 2>&1 ; \
162157 if [ " $$ ?" != " 0" ]; then \
163- printf " failed:\n$( GOBIN ) /msgp -file ./$( @D) -o $@ -warnmask github.com/algorand/go-algorand\n" ; \
158+ printf " failed:\n$( MSGP ) -file ./$( @D) -o $@ -warnmask github.com/algorand/go-algorand\n" ; \
164159 cat ./$@ .out; \
165160 rm ./$@ .out; \
166161 exit 1; \
234229 echo "OS_TYPE must be darwin for universal builds, skipping"
235230endif
236231
237- deps :
238- ./scripts/check_deps.sh
239-
240232# artifacts
241233
242234# Regenerate kmd swagger spec files
@@ -263,15 +255,15 @@ $(KMD_API_SWAGGER_SPEC): $(KMD_API_FILES) crypto/libs/$(OS_TYPE)/$(ARCH)/lib/lib
263255 touch $@ ; \
264256 fi
265257
266- $(KMD_API_SWAGGER_INJECT ) : deps $(KMD_API_SWAGGER_SPEC ) $(KMD_API_SWAGGER_SPEC ) .validated
258+ $(KMD_API_SWAGGER_INJECT ) : $(KMD_API_SWAGGER_SPEC ) $(KMD_API_SWAGGER_SPEC ) .validated
267259 ./daemon/kmd/lib/kmdapi/bundle_swagger_json.sh
268260
269261# generated files we should make sure we clean
270262GENERATED_FILES := \
271263 $(KMD_API_SWAGGER_INJECT ) \
272264 $(KMD_API_SWAGGER_SPEC ) $(KMD_API_SWAGGER_SPEC ) .validated
273265
274- rebuild_kmd_swagger : deps
266+ rebuild_kmd_swagger :
275267 rm -f $(GENERATED_FILES )
276268 # we need to invoke the make here since we want to ensure that the deletion and re-creating are sequential
277269 make $(KMD_API_SWAGGER_INJECT )
@@ -418,7 +410,7 @@ dump: $(addprefix gen/,$(addsuffix /genesis.dump, $(NETWORKS)))
418410install : build
419411 scripts/dev_install.sh -p $(GOBIN )
420412
421- .PHONY : default fmt lint check_shell sanity cover prof deps build build-race build-e2e test fulltest shorttest clean cleango deploy node_exporter install % gen gen NONGO_BIN check-go-version rebuild_kmd_swagger universal libsodium modernize
413+ .PHONY : default fmt lint check_shell sanity cover prof build build-race build-e2e test fulltest shorttest clean cleango deploy node_exporter install % gen gen NONGO_BIN check-go-version rebuild_kmd_swagger universal libsodium modernize
422414
423415# ##### TARGETS FOR CICD PROCESS ######
424416include ./scripts/release/mule/Makefile.mule
0 commit comments