[release-branch.go1.10] cmd/guru: fix .golden file (fix build)

This regression is due to https://go-review.googlesource.com/c/go/+/100235
which made the go/scanner behavior match the compiler's scanner by
not modifying filenames in line directives in any form. Specifically,
relative filenames now remain relative. This makes it easier to reason
about the behavior of the scanner but may require clients to adjust
those filenames.

If removing the longer path in the .golden file is not satisfactory,
the (scanner) client may have to massage positions returned via line
directives; or better, the line directives are created with extended
path information.

R=​adonovan

Change-Id: I836571a6dafef5e6d81e4c7add203c994e107055
Reviewed-on: https://go-review.googlesource.com/101015
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
(cherry picked from commit c4b4e4b0fa)
Reviewed-on: https://go-review.googlesource.com/102798
Run-TryBot: Andrew Bonventre <andybons@golang.org>
This commit is contained in:
Robert Griesemer 2018-03-15 17:47:48 -07:00 committed by Andrew Bonventre
parent 25101aadb9
commit 4c772e4117
1 changed files with 1 additions and 1 deletions

View File

@ -56,5 +56,5 @@ references to field f int
-------- @referrers ref-type-U -------- -------- @referrers ref-type-U --------
references to type U int references to type U int
open testdata/src/referrers/nosuchfile.y: no such file or directory (+ 1 more refs in this file) open nosuchfile.y: no such file or directory (+ 1 more refs in this file)