Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update go to 1.23.x #834

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .changelog/834.internal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update Go to v1.23.3
2 changes: 1 addition & 1 deletion .github/workflows/ci-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,6 @@ jobs:
uses: golangci/golangci-lint-action@v3
with:
# Update README.md instructions when bumping this.
version: v1.55.1
version: v1.62.2
# Always run this step so that all linting errors can be seen at once.
if: always()
8 changes: 4 additions & 4 deletions .github/workflows/ci-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22.x
go-version: 1.23.x
- name: Install Go tools
run: go install github.com/deepmap/oapi-codegen/cmd/[email protected]
- name: Build Go
Expand All @@ -60,7 +60,7 @@ jobs:
# NOTE: This should run _after_ the build step, so that oapi-codegen has already run
# and generated the Go code that points to some of the dependencies.
run: |
go mod tidy -v -x -compat=1.22 # goreleaser does the same; can find lingering issues
go mod tidy -v -x -compat=1.23 # goreleaser does the same; can find lingering issues
echo TIDY RESULTS START; git diff || true; echo TIDY RESULTS END
- name: Upload to codecov.io
uses: codecov/[email protected]
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22.x
go-version: 1.23.x
- name: Autogenerate Go code
run: |
go install github.com/deepmap/oapi-codegen/cmd/[email protected]
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22.x
go-version: 1.23.x
- name: Autogenerate Go code
run: |
go install github.com/deepmap/oapi-codegen/cmd/[email protected]
Expand Down
12 changes: 8 additions & 4 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@

run:
timeout: 5m
skip-dirs:

issues:
exclude-dirs:
# Contains a cloned subset of oasis-core. Some types are unused, some
# formatting is haphazard. We don't care much; this code is meant to be
# frozen in time.
- coreapi

issues:
exclude-rules:
- path: '(.+)_test\.go'
linters:
Expand All @@ -36,7 +37,6 @@ linters:
- dogsled
- errcheck
- exhaustive
- exportloopref
- goconst
- gocritic
- gocyclo
Expand Down Expand Up @@ -74,7 +74,11 @@ linters-settings:
default-signifies-exhaustive: true
govet:
# Enabled checking for shadowed variables.
check-shadowing: true
shadow: true
gosec:
excludes:
# https://github.com/securego/gosec#available-rules
- G115
goimports:
# Put local imports after 3rd-party packages.
local-prefixes: github.com/oasisprotocol/nexus
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ create a PR, but without them, you're at the mercy of CI.

```sh
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh \
| sh -s -- -b $(go env GOPATH)/bin v1.55.1
| sh -s -- -b $(go env GOPATH)/bin v1.62.2
```

- **gofumpt**: `go install mvdan.cc/gofumpt@latest`
Expand Down
6 changes: 3 additions & 3 deletions docker/nexus/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
FROM golang:1.22-bookworm AS nexus-builder
FROM golang:1.23-bookworm AS nexus-builder

WORKDIR /code/go

COPY . ./

RUN \
go install github.com/deepmap/oapi-codegen/cmd/[email protected] && \
go install github.com/deepmap/oapi-codegen/cmd/[email protected] && \
make codegen-go && \
go mod download && \
go build
Expand All @@ -20,7 +20,7 @@ RUN npx redoc-cli build api/spec/v1.yaml -o api/spec/v1.html

############

FROM golang:1.22-bookworm AS nexus
FROM golang:1.23-bookworm AS nexus

WORKDIR /nexus

Expand Down
4 changes: 2 additions & 2 deletions docker/oasis-net-runner/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM golang:1.22-bookworm AS oasis-core
FROM golang:1.23-bookworm AS oasis-core

ARG OASIS_CORE_VERSION=23.0.2
ARG OASIS_CORE_VERSION=24.3.1

WORKDIR /code/go

Expand Down
4 changes: 2 additions & 2 deletions docker/oasis-node/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM golang:1.22-bookworm AS oasis-node
FROM golang:1.23-bookworm AS oasis-node

ARG OASIS_CORE_VERSION=23.0.2
ARG OASIS_CORE_VERSION=24.3.1

WORKDIR /code/go

Expand Down
28 changes: 14 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/oasisprotocol/nexus

go 1.22.2
go 1.23.4

replace (
github.com/cometbft/cometbft => github.com/oasisprotocol/cometbft v0.37.2-oasis1
Expand All @@ -19,10 +19,10 @@ require (
github.com/google/uuid v1.6.0
github.com/jackc/pgx/v5 v5.5.4
github.com/knadh/koanf v1.4.1
github.com/prometheus/client_golang v1.20.4
github.com/prometheus/client_golang v1.20.5
github.com/spf13/cobra v1.8.1
github.com/stretchr/testify v1.9.0
golang.org/x/sync v0.8.0
golang.org/x/sync v0.10.0
google.golang.org/grpc v1.67.1
gopkg.in/yaml.v2 v2.4.0 // indirect
)
Expand Down Expand Up @@ -91,13 +91,13 @@ require (
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/klauspost/compress v1.17.10 // indirect
github.com/klauspost/compress v1.17.11 // indirect
github.com/klauspost/cpuid/v2 v2.2.8 // indirect
github.com/labstack/echo/v4 v4.9.1 // indirect
github.com/labstack/gommon v0.4.0 // indirect
github.com/lib/pq v1.10.9 // indirect
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
github.com/libp2p/go-libp2p v0.36.5 // indirect
github.com/libp2p/go-libp2p v0.37.2 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
Expand All @@ -117,7 +117,7 @@ require (
github.com/multiformats/go-multibase v0.2.0 // indirect
github.com/multiformats/go-multicodec v0.9.0 // indirect
github.com/multiformats/go-multihash v0.2.3 // indirect
github.com/multiformats/go-multistream v0.5.0 // indirect
github.com/multiformats/go-multistream v0.6.0 // indirect
github.com/multiformats/go-varint v0.0.7 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/oasisprotocol/deoxysii v0.0.0-20220228165953-2091330c22b7 // indirect
Expand All @@ -128,7 +128,7 @@ require (
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.59.1 // indirect
github.com/prometheus/common v0.60.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
Expand All @@ -154,11 +154,11 @@ require (
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/mod v0.20.0 // indirect
golang.org/x/mod v0.21.0 // indirect
golang.org/x/net v0.30.0 // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/text v0.19.0 // indirect
golang.org/x/tools v0.24.0 // indirect
golang.org/x/sys v0.28.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/tools v0.26.0 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect
google.golang.org/grpc/security/advancedtls v0.0.0-20221004221323-12db695f1648 // indirect
google.golang.org/protobuf v1.35.1 // indirect
Expand All @@ -176,10 +176,10 @@ require (
github.com/fxamacker/cbor/v2 v2.4.0
github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a
github.com/oasisprotocol/metadata-registry-tools v0.0.0-20240304080528-3218befba9ca
github.com/oasisprotocol/oasis-core/go v0.2403.0
github.com/oasisprotocol/oasis-core/go v0.2403.1
github.com/oasisprotocol/oasis-sdk/client-sdk/go v0.11.1
github.com/rs/cors v1.8.3
go.dedis.ch/kyber/v3 v3.1.0
golang.org/x/crypto v0.28.0
golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa
golang.org/x/crypto v0.31.0
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c
)
Loading
Loading