mirror of
https://github.com/golang/go
synced 2024-11-18 14:14:46 -07:00
go.tools/oracle: change -ptalog default to "".
Also: add a TODO. R=crawshaw CC=golang-dev https://golang.org/cl/13352043
This commit is contained in:
parent
6fb9ae0ed5
commit
3184482148
@ -36,7 +36,7 @@ var posFlag = flag.String("pos", "",
|
||||
var modeFlag = flag.String("mode", "",
|
||||
"Mode of query to perform: callers, callees, callstack, callgraph, describe.")
|
||||
|
||||
var ptalogFlag = flag.String("ptalog", "pta.log",
|
||||
var ptalogFlag = flag.String("ptalog", "",
|
||||
"Location of the points-to analysis log file, or empty to disable logging.")
|
||||
|
||||
const usage = `Go source code oracle.
|
||||
|
@ -89,7 +89,6 @@ result."
|
||||
(erase-buffer)
|
||||
(insert "Go Oracle\n")
|
||||
(let ((args (append (list go-oracle-command nil t nil
|
||||
"-ptalog=" ; avoid writing the huge log
|
||||
(format "-pos=%s %s" filename pos)
|
||||
(format "-mode=%s" mode))
|
||||
(split-string go-oracle-scope " " t))))
|
||||
@ -118,6 +117,7 @@ result."
|
||||
(p 1))
|
||||
(while (not (null p))
|
||||
(let ((np (compilation-next-single-property-change p 'compilation-message)))
|
||||
;; TODO(adonovan): this can be verbose in the *Messages* buffer.
|
||||
(message "Post-processing link (%d%%)" (/ (* p 100) (point-max)))
|
||||
(if np
|
||||
(when (equal (line-number-at-pos p) (line-number-at-pos np))
|
||||
|
@ -29,7 +29,7 @@ set errorformat+=%f:%l.%c-%*[0-9].%*[0-9]:\ %m
|
||||
func! s:RunOracle(mode) abort
|
||||
let s:pos = line2byte(line("."))+col(".")
|
||||
let s:errfile = tempname()
|
||||
let s:cmd = printf("!%s -ptalog= -mode=%s '-pos=%s %d' %s >%s",
|
||||
let s:cmd = printf("!%s -mode=%s '-pos=%s %d' %s >%s",
|
||||
\ s:go_oracle, a:mode, bufname(""), s:pos, s:scope, s:errfile)
|
||||
execute s:cmd
|
||||
execute "cfile " . s:errfile
|
||||
|
Loading…
Reference in New Issue
Block a user