exp/cmd/apidiff
Jonathan Amsterdam 69215a2ee9 cmd/apidiff: store package path with export data
BREAKING CHANGE: If you have old files saved with -w, they will
no longer work.

When writing export data for a package, save the path of the package.

The export data format doesn't store this information. Previously
it didn't matter, because gcexportdata.Reader.Read would return
the package that was written. But since golang.org/cl/198742, that
is no longer true.

This was apidiff's bug, not gcexportdata's: for the path argument of
Read I was passing garbage (the filename) rather than the import path.
Read's doc doesn't specify what happens if you do that.

Also, update golang.org/x/tools to latest.

Fixes golang/go#34849.

Change-Id: I9d590270a9c2bb1fcc6c9071d4a2ca82c85d84d6
Reviewed-on: https://go-review.googlesource.com/c/exp/+/200997
Reviewed-by: Jay Conrod <jayconrod@google.com>
2019-10-14 17:15:48 +00:00
..
main.go cmd/apidiff: store package path with export data 2019-10-14 17:15:48 +00:00