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

Code Maintainability and Network Reliability of Godef and it's Dependencies #368

Closed
razic opened this issue Apr 3, 2015 · 6 comments
Closed
Labels

Comments

@razic
Copy link

razic commented Apr 3, 2015

This is a discussion topic to help ensure vim-go users have a smooth installation when running GoInstallBinaries.

Right now, if you try to run vim +PluginInstall +GoInstallBinaries +qall you'll exit with a timeout error. The problem is that https://github.com/rogpeppe/godef imports code from a go library hosted on http://9fans.net which has been down for at least 2 days.

I also noticed that godef itself moved from Google Code to GitHub recently. All the network issues and maintainability problems scare me a little.

Fortunately for us, the 9fans guys seem to have made the same move from Google Code to Github, although perhaps undisclosed. So the code is actually available to download on GitHub at https://github.com/9fans/go. However, they made the same mistake as godef, and the go files in their library continue to import from http://9fans.net.

Is there any alternative solutions to godef that is more actively maintained?

In the meantime, I get around this by installing https://github.com/9fans/go using git instead of go get. This allows me to set the file path location for the downloaded code, appearing to go as if it were downloaded directly from http://9fans.net.

The workaround:

git clone https://github.com/9fans/go /go/src/9fans.net/go
go get github.com/rogpeppe/godef
go install github.com/rogpeppe/godef
vim +PluginInstall +GoInstallBinaries +qall

If we want to fix this, I think a pull request on https://github.com/9fans/go to replace all instances of 9fans.net with github.com/9fans/go would probably buy us at least another year.

Furthermore, we may want to discuss a more robust binary installation algorithm for the GoInstallBinaries command that takes network errors into account, and perhaps even providing alternative download links.

@razic razic changed the title Code Maintainability and Network Reliability of Godef Code Maintainability and Network Reliability of Godef's Dependencies Apr 3, 2015
@razic razic changed the title Code Maintainability and Network Reliability of Godef's Dependencies Code Maintainability and Network Reliability of Godef and it's Dependencies Apr 3, 2015
@razic
Copy link
Author

razic commented Apr 3, 2015

/cc @fatih

@ochapman
Copy link

ochapman commented Apr 3, 2015

thanks razic for your walkaround!

@fatih
Copy link
Owner

fatih commented Apr 4, 2015

Hi @razic. Thanks for the wonderful workaround and notification, really appreciated.

There is currently an open issue on Godef which deals with the same problem: rogpeppe/godef#4

Let's wait a little bit if this can be resolved either by their respective authors or contributions from outside. If there is no solution we can always create a repository here on Github and point vim-go to use it until there is a fix.

@fatih
Copy link
Owner

fatih commented Apr 4, 2015

Furthermore, we may want to discuss a more robust binary installation algorithm for the GoInstallBinaries command that takes network errors into account, and perhaps even providing alternative download links.

I have the github.com/vim-go accounts just for these future purposes. It can be used later in the future to have vendored versions (go packages) of all necessary binaries/commands needed by vim-go. However it would introduce another step in my life that I need to maintain. I'm doing this all on my spare times and honestly I don't have that much time and the current approach works real well expect in those situations when the package moves, etc.. I'm always in favor of simplicity and don't try to introduce complex things into vim-go.

Lets have this issue opened until the real issue with godef is resolved. Thanks again for @razic bringing this up.

@fatih fatih added the bug label Apr 4, 2015
@fatih
Copy link
Owner

fatih commented May 22, 2015

This is fixed 9fans/go#3 as seen here: https://godoc.org/9fans.net/go. So closing this. If we hit again the same problem. I'll talk with @rogpeppe about vendoring it into godef. Thanks for all participants

@fatih fatih closed this as completed May 22, 2015
@razic
Copy link
Author

razic commented May 22, 2015

You rock!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants