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

task: add go toolchain #2779

Merged
merged 4 commits into from
Mar 19, 2024
Merged

task: add go toolchain #2779

merged 4 commits into from
Mar 19, 2024

Conversation

gssbzn
Copy link
Collaborator

@gssbzn gssbzn commented Mar 19, 2024

@gssbzn gssbzn marked this pull request as ready for review March 19, 2024 14:47
@gssbzn gssbzn requested a review from a team March 19, 2024 14:47
@@ -28,6 +28,7 @@ export PATH := $(shell go env GOPATH)/bin:$(PATH)
export PATH := ./bin:$(PATH)
export TERM := linux-m
export GO111MODULE := on
export GOTOOLCHAIN := local
Copy link
Collaborator Author

@gssbzn gssbzn Mar 19, 2024

Choose a reason for hiding this comment

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

I found the "auto" behavior with asdf to be dangerous as it installs versions within the version manager so avoiding issues here

Copy link
Collaborator Author

@gssbzn gssbzn Mar 19, 2024

Choose a reason for hiding this comment

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

since go can be its own version manager let's forget about asdf

@@ -2,6 +2,8 @@ module github.com/mongodb/mongodb-atlas-cli/atlascli

go 1.22
Copy link
Collaborator

Choose a reason for hiding this comment

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

checked out to the branch and got:

  • do we need to do any setup to be able to update master?
❯ make deps
==> Installing go.mod dependencies...
go mod download
go: go.mod requires go >= 1.22 (running go 1.21.1; GOTOOLCHAIN=local)
make: *** [deps] Error 1

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

see #2779 (comment)

you need to install/set go1.22 however you are managing your go versions, I have swapped from asdf to using the homebrew version (asdf global golang system) but you can keep using asdf if that works for you

Copy link
Collaborator

Choose a reason for hiding this comment

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

ok, if I set asdf global golang system, I still get the error, but if we set go 1.22.1 at line 3 then it works!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

, I still get the error,

I can't reproduce before doing that change can you confirm you have updated your env correctly, as in reload the shell env, via something like source ~/.zshrc, or restarting your term, and if you still get an error what's the output of go env?

Please consider that

go 1.22.1

should be equivalent to

go 1.22
toolchain go1.22.1

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think if it's not reproducible I can workaround to fix my machine, so I'll leave my stamp.

go.mod Show resolved Hide resolved
@@ -2,6 +2,8 @@ module github.com/mongodb/mongodb-atlas-cli/atlascli

go 1.22
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think if it's not reproducible I can workaround to fix my machine, so I'll leave my stamp.

@gssbzn gssbzn merged commit 29e3a3b into master Mar 19, 2024
17 checks passed
@gssbzn gssbzn deleted the fix-go-version branch March 19, 2024 16:47
@fmenezes fmenezes mentioned this pull request Apr 5, 2024
6 tasks
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.

2 participants