Include more context in case a known problem is encountered during an update of a binary. There are currently 4 types of known issues which are described in a TROUBLESHOOTING.md file. Links to relevant sections in that file are printed to the console while running go-global-update and such a common problem is detected.
Upgrading gofumpt to v0.3.1 ... ❌
Could not upgrade package
go: downloading mvdan.cc/gofumpt v0.3.1
go: downloading golang.org/x/sync v0.0.0-2021022003[29](https://github.com/Gelio/go-global-update/runs/5640347027?check_suite_focus=true#step:6:29)51-036812b2e83c
go: downloading golang.org/x/sys v0.0.0-20220[31](https://github.com/Gelio/go-global-update/runs/5640347027?check_suite_focus=true#step:6:31)9134239-a9b59b0215f8
go: downloading github.com/google/go-cmp v0.5.7
go: downloading golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3
go: downloading golang.org/x/tools v0.1.10
//go:build comment without // +build comment
I changed the tests to use https://github.com/google/gnostic as the binary to install instead of gofumpt. It seems to work on go 1.16. This surfaces a flaw with the integration tests - they rely on the code of the latest version of the binaries. They are not idempotent and can fail in the future because a new version of some binary was released even though the code changed.
Include more context in case a known problem is encountered during an update of a binary. There are currently 4 types of known issues which are described in a TROUBLESHOOTING.md file. Links to relevant sections in that file are printed to the console while running
go-global-update
and such a common problem is detected.This PR also adds automatically generating table of contents in some Markdown files using https://github.com/jonschlinkert/markdown-toc and formatting of Markdown files using https://prettier.io/. Both of these are checked in CI.
Moreover, during the course of this PR gofumpt@v0.3.1 was released which uses a
go:build
comment in the tests code. Updating to gofumpt@v0.3.1 on go 1.16 fails with the following error:I changed the tests to use https://github.com/google/gnostic as the binary to install instead of gofumpt. It seems to work on go 1.16. This surfaces a flaw with the integration tests - they rely on the code of the latest version of the binaries. They are not idempotent and can fail in the future because a new version of some binary was released even though the code changed.
Closes #4