Skip to content

Use go tool to trace tool dependencies #255

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

Merged
merged 2 commits into from
Apr 17, 2025

Conversation

yshngg
Copy link
Contributor

@yshngg yshngg commented Apr 11, 2025

Track tool dependencies using commands such as go get -tool golang.org/x/tools/cmd/stringer and go tool golang.org/x/tools/cmd/stringer.

Currently, the migrate tool does not integrate properly with the new go tool feature released in Go 1.24.

Fix #237

Makefile Outdated
@@ -6,6 +6,15 @@ BASE_STACK = docker compose -f docker-compose.yml
INTEGRATION_TEST_STACK = $(BASE_STACK) -f docker-compose-integration-test.yml
ALL_STACK = $(INTEGRATION_TEST_STACK)

# go tool
GCI = go tool github.com/daixiang0/gci
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, why so complex? Now I can't use it like simple cmd from terminal?

Copy link
Contributor Author

@yshngg yshngg Apr 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, you can use the go install tool  command to install these tools into GOBIN.
Hmm, it does seem a bit too complicated—I think that's because this feature was newly released.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, we should use this installation command, I guess. It may help us to get a better experience with pure command line usages and Makefile usages. What do you think about this?

@yshngg yshngg force-pushed the feature/go-tool branch 2 times, most recently from ef8e3e1 to 4d3c7bc Compare April 16, 2025 15:39
@soltanoff
Copy link
Member

@yshngg, this branch has conflicts. Could you rebase/fix your branch?

yshngg added 2 commits April 17, 2025 23:05
… and using direct calls

This commit removes the unnecessary Go tool variables and directly uses the tool commands, streamlining the Makefile and reducing maintenance overhead.
@yshngg
Copy link
Contributor Author

yshngg commented Apr 17, 2025

@yshngg, this branch has conflicts. Could you rebase/fix your branch?

Hi @soltanoff , I have already successfully resolved the conflict.

@soltanoff soltanoff merged commit 72b6f4b into evrone:master Apr 17, 2025
7 checks passed
@soltanoff
Copy link
Member

@yshngg looks good, thank you

@yshngg yshngg deleted the feature/go-tool branch April 18, 2025 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is there any plan to upgrade the Go version to 1.24?
2 participants