From 3184482148e9d88645bbab180d4d2561475fc243 Mon Sep 17 00:00:00 2001 From: Alan Donovan Date: Thu, 29 Aug 2013 21:32:49 -0400 Subject: [PATCH] go.tools/oracle: change -ptalog default to "". Also: add a TODO. R=crawshaw CC=golang-dev https://golang.org/cl/13352043 --- cmd/oracle/main.go | 2 +- cmd/oracle/oracle.el | 2 +- cmd/oracle/oracle.vim | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/oracle/main.go b/cmd/oracle/main.go index 6ebd731cdf..c69d6721cb 100644 --- a/cmd/oracle/main.go +++ b/cmd/oracle/main.go @@ -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. diff --git a/cmd/oracle/oracle.el b/cmd/oracle/oracle.el index 4cae84f2de..7b64a851a4 100644 --- a/cmd/oracle/oracle.el +++ b/cmd/oracle/oracle.el @@ -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)) diff --git a/cmd/oracle/oracle.vim b/cmd/oracle/oracle.vim index ac84826d5f..68c16584c7 100644 --- a/cmd/oracle/oracle.vim +++ b/cmd/oracle/oracle.vim @@ -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