-
Notifications
You must be signed in to change notification settings - Fork 10
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
Migrate to Go 1.24 and new tools #490
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
a143c2e
Migrate to go 1.24
mkysel 2ed263f
git changes
mkysel 7e125a4
missed docs
mkysel b4c5b89
another doc change
mkysel ee8ef2a
remove abigen
mkysel 1972ae5
separate go tools
mkysel c7d87a4
use abigen tool
mkysel 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,6 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
- uses: bufbuild/[email protected] | ||
- name: Generate Protos | ||
run: dev/gen-protos | ||
- name: Create Pull Request | ||
|
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 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
migrate create -dir pkg/migrations -seq -digits=5 -ext sql $1 | ||
go tool -modfile=tools/go.mod migrate create -dir pkg/migrations -seq -digits=5 -ext sql $1 |
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,7 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
rm -rf pkg/proto/**/*.pb.go pkg/proto/**/*.pb.gw.go pkg/proto/**/*.swagger.json | ||
if ! buf generate https://github.com/xmtp/proto.git#subdir=proto,branch=main; then | ||
if ! go tool -modfile=tools/go.mod buf generate https://github.com/xmtp/proto.git#subdir=proto,branch=main; then | ||
echo "Failed to generate protobuf definitions" | ||
exit 1 | ||
fi |
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 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
golines -w --ignored-dirs=proto --ignored-dirs=mocks --ignored-dirs=abis --ignored-dirs=queries . | ||
go tool -modfile=tools/go.mod golines -w --ignored-dirs=proto --ignored-dirs=mocks --ignored-dirs=abis --ignored-dirs=queries . |
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 |
---|---|---|
|
@@ -2,26 +2,9 @@ | |
set -e | ||
|
||
if ! which forge &>/dev/null; then echo "ERROR: Missing foundry binaries. Run 'curl -L https://foundry.paradigm.xyz | bash' and follow the instructions" && exit 1; 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 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 | ||
if ! which buf &> /dev/null; then go install github.com/bufbuild/buf/cmd/buf; fi | ||
if ! which golines &>/dev/null; then go install github.com/segmentio/golines@latest; fi | ||
if ! which jq &>/dev/null; then brew install jq; fi | ||
|
||
# Pin abigen version at can introduce breaking changes between releases, rendering different ABIs. | ||
if ! which abigen &>/dev/null; then | ||
go install github.com/ethereum/go-ethereum/cmd/[email protected] | ||
fi | ||
|
||
abigen_version=$(abigen --version | awk '{print $3}') | ||
if [[ ${abigen_version} != "1.14.12-stable" ]]; then | ||
echo "ERROR: abigen version is not 1.14.12. Please install the correct version." | ||
exit 1 | ||
fi | ||
|
||
echo -e "→ Generate smart contracts bindings" | ||
contracts/dev/generate | ||
|
||
|
This file was deleted.
Oops, something went wrong.
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.
💡 Verification agent
🧩 Analysis chain
Fix the command structure and verify the module file path.
The current command structure has two issues:
--modfile
flag is incorrectly placed. It should be passed toabigen
, not togo tool
.Apply this diff to fix the command structure:
Let's verify the module file exists at the expected location:
🏁 Script executed:
Length of output: 173
Review Update: Adjust Command Structure and Validate go.mod File Location
--modfile
flag directly toabigen
(i.e. aftergo tool abigen
).tools/go.mod
was not found in the repository. Please confirm whether the path should be different or if the file needs to be added.Apply this diff as a starting point, ensuring you update the module file path if needed:
📝 Committable suggestion