0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

anyenv使ってますか?

Posted at

anyenv - all in one for **env

This is a simple wrapper for rbenv style environment managers.
You don't have to git clone or modify your shell profile for each **env anymore if you install anyenv.

はい。
anyenvとはrbenvやndenv、goenv、plenvなどをオールインワンでやってくれる素敵なツールです。

anyenvの紹介はほどほどにしておいて…

では、皆さんにもう一点質問です。

goenv、何使ってますか?

anyenvを使っていない人は、 brew install goenv で入るものを使っている方が多いのでは、と思います。

ref: syndbg/goenv

❯ brew info goenv
goenv: stable 1.4.0, HEAD
Go version management
https://github.com/syndbg/goenv
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/goenv.rb

僕はanyenvを使っているので kaneshin/goenvを参照しています。

でもね、これが辛いんです。

何が辛いの

二つのgoenvのバージョン指定に一部互換性がありません。
末尾が0のメンテバージョンの指定方法に違いがあります。

正確に言うとsyndbg/goenv はメンテバージョンまで指定する必要があるのですが、
kaneshin/goenvはメンテバージョンをつけたものが存在しません。
つまりインストールの指定方法が二種類あります。

# kaneshin/goenv
❯ goenv install 1.9.0
Not found: 1.9.0
❯ goenv install --list | grep 1.9
...
gae-1.9.1
gae-1.9.0
1.9

# syndbg/goenv
❯ brew info goenv
goenv: stable 1.4.0, HEAD
Go version management
https://github.com/syndbg/goenv
/usr/local/Cellar/goenv/1.4.0 (127 files, 231.3KB) *
  Built from source on 2017-10-04 at 10:39:00
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/goenv.rb
❯ /usr/local/Cellar/goenv/1.4.0/bin/goenv install -l | grep 1.9.0
  1.9.0

jenkinsでinstallする際とか色々まあ運用面が辛い。

PR作ったよ

anyenvにpr出しました。
homebrewで採用されてるし、こっちの方がメンテされてそうだし、いいよねみたいな。
マージされるといいけど、今anyenv使っているユーザーの環境が壊れるのですぐは厳しそうかな…
https://github.com/riywo/anyenv/pull/56

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?