From: Russ Cox Date: Mon, 16 Mar 2015 19:18:49 +0000 (-0400) Subject: cmd/dist: add //line to copied bootstrap files X-Git-Tag: go1.5beta1~1507 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a5e18416fcf4eb66b852074141df48ce4988783f;p=gostls13.git cmd/dist: add //line to copied bootstrap files This way the error messages will show the original file name in addition to the bootstrap file name, so that you have some chance of making the correction in the original instead of the copy (which will be blown away). Before: /Users/rsc/g/go/pkg/bootstrap/src/bootstrap/5g/gsubr.go:863: undefined: a After: /Users/rsc/g/go/src/cmd/5g/gsubr.go:860[/Users/rsc/g/go/pkg/bootstrap/src/bootstrap/5g/gsubr.go:863]: undefined: a Change-Id: I8d6006abd9499edb16d9f27fe8b7dc6cae143fca Reviewed-on: https://go-review.googlesource.com/7741 Reviewed-by: Josh Bleecher Snyder Reviewed-by: Ian Lance Taylor --- diff --git a/src/cmd/dist/buildtool.go b/src/cmd/dist/buildtool.go index acacd1d8e8..69e077c002 100644 --- a/src/cmd/dist/buildtool.go +++ b/src/cmd/dist/buildtool.go @@ -139,7 +139,7 @@ func bootstrapFixImports(text, srcFile string) string { } } - lines[0] = "// Do not edit. Bootstrap copy of " + srcFile + "\n\n" + lines[0] + lines[0] = "// Do not edit. Bootstrap copy of " + srcFile + "\n\n//line " + srcFile + ":1\n" + lines[0] return strings.Join(lines, "") }