Skip to content

Commit

Permalink
Document go 1.22 and golangci-lint 1.56 requirements (#172)
Browse files Browse the repository at this point in the history
TL;DR: Due to an incompatibility with go 1.23 and a dependency of
abigen, devs must explicitly install go 1.22 (ex: using brew install
[email protected]) and golangci-lint 1.56.

xmtpd requires abigen which uses memsize. memsize relies on access to
`runtime.stopTheWorld` and `runtime.startTheWorld` [1] which was OK in
go 1.22 and forbidden in go 1.23

[1] golang/go#68167
  • Loading branch information
ephemeranski authored Sep 24, 2024
1 parent 2427b56 commit c27d0ba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ To keep up with and provide feedback about `xmtpd` development, see the [Issues

## Prerequisites

- [Go](https://go.dev/doc/install)
- [Go 1.22](https://go.dev/doc/install) -- On macOS install with `brew install [email protected]`
- [Docker](https://www.docker.com/get-started/)

Note that a dependency of this repo will not compile with version of go newer than 1.22.

## Install and build dependencies

To install dependencies and build background services needed by the node, run:
Expand Down
4 changes: 2 additions & 2 deletions dev/up
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ git submodule update --init --recursive

if ! which forge &>/dev/null; then curl -L https://foundry.paradigm.xyz | bash ; fi
if ! which migrate &>/dev/null; then go install github.com/golang-migrate/migrate/v4/cmd/migrate; fi
if ! which golangci-lint &>/dev/null; then brew install golangci-lint; fi
if ! which golangci-lint &>/dev/null; then curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.56.0; fi
if ! which shellcheck &>/dev/null; then brew install shellcheck; fi
if ! which mockery &>/dev/null; then go install github.com/vektra/mockery/v2; fi
if ! which sqlc &> /dev/null; then go install github.com/sqlc-dev/sqlc/cmd/sqlc; fi
Expand All @@ -17,4 +17,4 @@ if ! which abigen &>/dev/null; then go install github.com/ethereum/go-ethereum/c

dev/generate
dev/docker/up
dev/contracts/deploy-local
dev/contracts/deploy-local

0 comments on commit c27d0ba

Please sign in to comment.