зеркало из https://github.com/golang/tools.git
gopls/integration: save more precise parsing information
These are changes to treat errors more like responses. They are important for the forthcoming log viewer. Change-Id: Ief8de6ecea716673d4aee417de205842ceab4fc8 Reviewed-on: https://go-review.googlesource.com/c/tools/+/213124 Run-TryBot: Rebecca Stambler <rstambler@golang.org> Reviewed-by: Robert Findley <rfindley@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Родитель
27f5d1b104
Коммит
81ef4df1d3
|
@ -89,7 +89,7 @@ func ReadLogs(fname string) ([]*Logmsg, error) {
|
|||
}
|
||||
msg.Body = v
|
||||
case ReportErr:
|
||||
msg.Body = msg.ID // cause?
|
||||
msg.Body = msg.Rest // save cause
|
||||
}
|
||||
byid[msg.ID]++
|
||||
msgs = append(msgs, msg)
|
||||
|
@ -152,6 +152,7 @@ func parselog(first, rest string) (*Logmsg, error) {
|
|||
msg.Method = both[:idx]
|
||||
msg.ID = fixid(both[idx+1:])
|
||||
msg.Rest = strings.Join(flds[6:], " ")
|
||||
msg.Rest = `"` + msg.Rest + `"`
|
||||
default:
|
||||
return nil, fmt.Errorf("surprise, first=%q with %d flds", first, len(flds))
|
||||
}
|
||||
|
|
|
@ -70,6 +70,7 @@ func ToRlog(fname string) (*Rlog, error) {
|
|||
ans.ServerNotifs = append(ans.ServerNotifs, l)
|
||||
case ReportErr:
|
||||
ans.ServerReply[l.ID] = l
|
||||
l.Method = ans.ServerCall[l.ID].Method // Method not in log message
|
||||
default:
|
||||
log.Fatalf("eh? %s/%s (%s)", l.Type, l.Method, l.ID)
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче