Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This makes it easier to understand what went wrong when depaware fails in a CI or other non-local context. The diff could be improved, in that a single addition can cause cascading diffs. For example, adding a bufio dependency to a package can cause this: - bytes from encoding/json+ + bytes from bufio+ Observe that bytes didn't really change meaningfully--it was imported by >=2 packages before, and it still is. But now it is imported by bufio, which is alphabetically prior to encoding/json. This adds a bunch of noise to the diffs. It's not obvious what the best fix to this is. Sample output, from running on this commit: $ TERM=dumb go run depaware-main.go -check . The list of dependencies in /Users/josh/t/depaware/depaware.txt are out of date. --- before +++ after @@ -1,16 +1,23 @@ github.com/tailscale/depaware dependencies: (generated by github.com/tailscale/depaware) + github.com/pkg/diff from github.com/tailscale/depaware/depaware + github.com/pkg/diff/ctxt from github.com/pkg/diff + github.com/pkg/diff/edit from github.com/pkg/diff/ctxt+ + github.com/pkg/diff/intern from github.com/pkg/diff + github.com/pkg/diff/myers from github.com/pkg/diff + github.com/pkg/diff/write from github.com/pkg/diff+ github.com/tailscale/depaware/depaware from github.com/tailscale/depaware - bytes from encoding/json+ - context from os/exec + bufio from github.com/pkg/diff+ + bytes from bufio+ + context from github.com/pkg/diff+ encoding from encoding/json encoding/base64 from encoding/json encoding/binary from encoding/base64 encoding/json from github.com/tailscale/depaware/depaware - errors from bytes+ + errors from bufio+ flag from github.com/tailscale/depaware/depaware fmt from encoding/json+ - io from bytes+ + io from bufio+ io/ioutil from github.com/tailscale/depaware/depaware log from github.com/tailscale/depaware/depaware math from encoding/binary+ @@ -21,12 +28,12 @@ reflect from encoding/binary+ sort from encoding/json+ strconv from encoding/base64+ - strings from encoding/json+ + strings from bufio+ sync from context+ sync/atomic from context+ syscall from internal/poll+ time from context+ unicode from bytes+ unicode/utf16 from encoding/json+ - unicode/utf8 from bytes+ + unicode/utf8 from bufio+ unsafe from internal/bytealg+ exit status 1
- Loading branch information