Skip to content

Commit

Permalink
Merge pull request #834 from oasisprotocol/ptrus/feature/go-1.23
Browse files Browse the repository at this point in the history
Update go to 1.23.x
  • Loading branch information
ptrus authored Dec 25, 2024
2 parents 0d27e93 + a8c6668 commit bdfb7d5
Show file tree
Hide file tree
Showing 12 changed files with 92 additions and 89 deletions.
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

0 comments on commit bdfb7d5

Please sign in to comment.