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

goenv global 1.20rc2 fails #389

Open
skaji opened this issue Aug 3, 2024 · 6 comments
Open

goenv global 1.20rc2 fails #389

skaji opened this issue Aug 3, 2024 · 6 comments

Comments

@skaji
Copy link

skaji commented Aug 3, 2024

Since #374, we cannot set RC go via goenv global or goenv local.

Steps to reproduce

❯ goenv install 1.20rc2
Downloading go1.20rc2.darwin-arm64.tar.gz...
-> go1.20rc2.darwin-arm64.tar.gz
############################################################################################# 100.0%############################################################################################# 100.0%
Installing Go Darwin arm 1.20rc2...
Installed Go Darwin arm 1.20rc2 to /Users/skaji/env/goenv/versions/1.20rc2

❯ goenv global 1.20rc2
goenv: version '1.20rc2' not installed

❯ echo $?
1

My environment

  • macos 14.5, arm64
  • goenv 2.2.1
@ChronosMasterOfAllTime
Copy link
Collaborator

@reneleonhardt can you please assist?

@reneleonhardt
Copy link
Contributor

I restored support for release candidates in local, global, install and installed, please review #392.

Please note:

  • There are no tests yet
  • install 1.20rc1 installs the latest release candidate rc2, like it does for other minor versions (1.22 installs 1.22.6)
  • goenv supports only a fraction of release candidates (it doesn't sync them like final releases)
  • goenv does not allow installing an arbitrary version (unknown to goenv hashsums in plugins/go-build/share/go-build)

@ChronosMasterOfAllTime
Copy link
Collaborator

I was thinking as a future feature and would make usage a lot more flexible, we add a going sync command. It will autogenerate the version files using the go API and only pick the ones relevant to your OS and Arch.

@skaji
Copy link
Author

skaji commented Aug 11, 2024

@reneleonhardt @ChronosMasterOfAllTime

Thanks for looking into this.

Unfortunately, it seems that goenv global 1.20rc2 is still failing:

❯ goenv --version
goenv 2.2.3

❯ goenv install 1.20rc2
Using latest patch version 1.20rc2
Downloading go1.20rc2.darwin-arm64.tar.gz...
-> go1.20rc2.darwin-arm64.tar.gz
############################################################################################# 100.0%############################################################################################# 100.0%
Installing Go Darwin arm 1.20rc2...
Installed Go Darwin arm 1.20rc2 to /Users/skaji/env/goenv/versions/1.20rc2

❯ goenv global 1.20rc2
goenv: version '1.20rc2' not installed

❯ echo $?
1

@ChronosMasterOfAllTime
Copy link
Collaborator

Thanks for letting us know. It would be worth writing a quick test to recreate the issue first and then trying to fix that.

@skaji
Copy link
Author

skaji commented Aug 16, 2024

A quick test would be:

diff --git test/goenv-global.bats test/goenv-global.bats
index 7dd589f..c99e5f9 100644
--- test/goenv-global.bats
+++ test/goenv-global.bats
@@ -57,6 +57,12 @@ OUT
   assert_success ""
   run goenv-global
   assert_success "1.2.3"
+
+  mkdir -p "$GOENV_ROOT/versions/1.20rc2"
+  run goenv-global 1.20rc2
+  assert_success
+  run goenv-global
+  assert_success "1.20rc2"
 }

 @test "sets properly sorted latest global version when 'latest' version is given and any version is installed" {

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

No branches or pull requests

3 participants