forked from cosmos/cosmos-sdk
-
Notifications
You must be signed in to change notification settings - Fork 34
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
chore: bump to Go 1.22 #375
Merged
rootulp
merged 8 commits into
celestiaorg:release/v0.46.x-celestia
from
rootulp:rp/bump-go
Mar 10, 2024
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
99f791a
chore: bump to Go 1.22
rootulp 4950d8c
ci: fix CI by bumping Go in dockerfiles
rootulp 3b4cb85
chore(deps): bump golangci-lint
rootulp 8cd9f4c
lint: gofumpt file
rootulp 8ee806f
fix: WriteFile permissions
rootulp 5ac4256
fix: resolve implicit memory aliasing in for loop
rootulp 9b0a75e
lint: remove depguard
rootulp 09df21b
lint: resolve nakedret
rootulp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,9 +22,10 @@ jobs: | |
install-tparse: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v3 | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.19 | ||
go-version-file: 'go.mod' | ||
- name: Display go version | ||
run: go version | ||
- name: install tparse | ||
|
@@ -38,9 +39,9 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.19 | ||
go-version-file: 'go.mod' | ||
- uses: technote-space/[email protected] | ||
id: git_diff | ||
with: | ||
|
@@ -55,9 +56,9 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.19 | ||
go-version-file: 'go.mod' | ||
- name: Create a file with all core Cosmos SDK pkgs | ||
run: go list ./... > pkgs.txt | ||
- name: Split pkgs into 4 files | ||
|
@@ -89,9 +90,9 @@ jobs: | |
part: ["00", "01", "02", "03"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.19 | ||
go-version-file: 'go.mod' | ||
- uses: technote-space/[email protected] | ||
with: | ||
PATTERNS: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,9 +26,9 @@ jobs: | |
go-arch: ["amd64", "arm", "arm64"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.19 | ||
go-version-file: 'go.mod' | ||
- uses: technote-space/[email protected] | ||
id: git_diff | ||
with: | ||
|
@@ -44,9 +44,9 @@ jobs: | |
container: tendermintdev/docker-tm-db-testing | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.19 | ||
go-version-file: 'go.mod' | ||
- uses: technote-space/[email protected] | ||
id: git_diff | ||
with: | ||
|
@@ -67,9 +67,9 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.19 | ||
go-version-file: 'go.mod' | ||
- name: Create a file with all core Cosmos SDK pkgs | ||
run: go list ./... > pkgs.txt | ||
- name: Split pkgs into 4 files | ||
|
@@ -101,9 +101,9 @@ jobs: | |
part: ["00", "01", "02", "03"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.19 | ||
go-version-file: 'go.mod' | ||
- uses: technote-space/[email protected] | ||
with: | ||
PATTERNS: | | ||
|
@@ -180,9 +180,9 @@ jobs: | |
timeout-minutes: 15 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.19 | ||
go-version-file: 'go.mod' | ||
- uses: technote-space/[email protected] | ||
id: git_diff | ||
with: | ||
|
@@ -203,9 +203,10 @@ jobs: | |
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- uses: actions/setup-go@v3 | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.19 | ||
go-version-file: 'go.mod' | ||
- name: Display go version | ||
run: go version | ||
- name: Install runsim | ||
|
@@ -220,9 +221,9 @@ jobs: | |
needs: [build, install-runsim] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.19 | ||
go-version-file: 'go.mod' | ||
- name: Display go version | ||
run: go version | ||
- uses: technote-space/[email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM golang:1.19-alpine AS build | ||
FROM golang:1.22.1-alpine AS build | ||
|
||
RUN apk add build-base git linux-headers | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM golang:1.19-alpine as build | ||
FROM golang:1.22.1-alpine as build | ||
|
||
RUN apk add --no-cache tar git | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM golang:1.19-alpine as build | ||
FROM golang:1.22.1-alpine as build | ||
|
||
RUN apk add git gcc libc-dev --no-cache | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -719,7 +719,7 @@ func newRealPrompt(dir string, buf io.Reader) func(string) (string, error) { | |
continue | ||
} | ||
|
||
if err := os.WriteFile(dir+"/keyhash", passwordHash, 0o555); err != nil { | ||
if err := os.WriteFile(dir+"/keyhash", passwordHash, 0o600); err != nil { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Resolve this lint warning:
Inspired by the implementation on Cosmos SDK main |
||
return "", err | ||
} | ||
|
||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed this linter because it has a ton of warnings. To resolve I think we need to define every library that is acceptable to import in this repo.
The
main
branch of Cosmos SDK no longer uses this linter and I think it wasn't actually working on the previous golangci-lint version