Upgrading go package without breaking mine

118 views
Skip to first unread message

Metal3d

unread,
Sep 23, 2015, 8:31:41 AM9/23/15
to golang-nuts
Hi,

I passed from Go 1.4 to Go1.5 last week and I wanted to upgrade my packages in GOPATH. I wanted to use the famous:

go get -u ...

But...

There are a lot of packages that are now not available or breaked. There are packages that disapeared from github, others are deprecated now...

And, some of those package breaks some command (as gorename for example) because they are not compatible, broken, and so on.

I wanted to remove the entire gopath (after having saved my own developpements) but I will lose a lot of commands that I've installed (gocode, oracle, goimports...)

So, if I do this, I will lose a lot of time to find which package I've got to reinstall...

Is there any way to update gopath and clean bad packages ?

Dave Cheney

unread,
Sep 23, 2015, 9:08:02 AM9/23/15
to golang-nuts
You should not have to do anything to your gopath after upgrading your go install, the go tool will sense that the cached packages are compiled with an older compiler and rebuild then when you use go install < this is a big hint, always use go install.

If you want to be more sure then you can remove $GOPATH/pkg, but this should not be necessary.

Dave
Reply all
Reply to author
Forward
0 new messages