-
Notifications
You must be signed in to change notification settings - Fork 18k
x/website: highlight removal of previous Go install in Linux installation instructions #44426
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
Comments
Given how important the step of removing the previous /usr/local/go directory before extracting, I think we must include it in the numbered steps. The current instructions link to https://golang.org/doc/manage-install#uninstalling, but that's less ideal for two reasons: 1) we only need the /usr/local/go directory to be removed, while Uninstalling Go involves removing Go bin directory from PATH, which doesn't need to be done, and 2) it links to another page, taking the reader out of context; it's better to keep the installation instructions contained on a single page. Step 1 also repeats "Download the archive" unnecessary: that was done in the https://golang.org/doc/install#download step above. I came up with two alternatives that might work better. Alternative AThe first one avoids including the "rm -rf" command, asking the user to take it on themselves to know how to remove a directory on Linux. It also adds the Alternative BThe second one combines "rm -rf /usr/local/go" with the "tar" command, and includes an Important note about what will happen and that the user should backup data as needed. Hopefully this is safe and convenient. It's unfortunate that the command is either long or split across two lines though. I'm currently slightly leaning towards B, because it seems more convenient, reliable, and safe. But if there are concerns with suggesting "rm -rf" then A should be the next best thing. Let me know if you have thoughts or ideas for how to improve this. |
Alternative B seems better to me. I think it's better to be clear that the old tree is removed while having something pasteable. |
Change https://golang.org/cl/294369 mentions this issue: |
Fixes golang/go#44426. Change-Id: Ie7eb15c239e522d28412a4d8fe2db37bab55f4a4 Reviewed-on: https://go-review.googlesource.com/c/website/+/294369 Trust: Dmitri Shuralyov <dmitshur@golang.org> Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com>
Experience and feedback in #44320 (thank you @jpmieville, @davecheney, @agnivade) suggests that the current Linux installation instructions are prone to a user mistake: missing the step of removing the previous Go installation at /usr/local/go before extracting the new Go version into the same location.
Making that mistake results in a corrupted Go installation which may produce strange errors. Worse yet, there is a possibility of it failing silently but producing incorrect results, compromising the reliability of the installed Go version.
There is a mention that the previous Go installation should be removed above the numbered steps:
This issue is about highlighting it to reduce the chances of this important step being overlooked by users.
CC @straut, @jayconrod, @golang/release.
The text was updated successfully, but these errors were encountered: