Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3276)

Issue 13334050: code review 13334050: go.tools/oracle: set AllASTs=true always, and simplify. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 7 months ago by adonovan
Modified:
10 years, 7 months ago
CC:
crawshaw1, Dominik Honnef, golang-dev
Visibility:
Public.

Description

go.tools/oracle: set AllASTs=true always, and simplify. Every one of the oracle's query modes needs to have typed ASTs available, at least transiently, so that the -pos flag can be interpreted. (The only mode that doesn't need the -pos flag is callgraph, but that needs PTA.) So we hard-code it to true. This change fixes a bug in the 'implements' query that causes -pos parsing to fail. (This wasn't exposed by the tests because they are degenerate in that the query always occurs in the main package, which is specified ad-hoc, i.e. as a source file not an import path. That's unfortunate, but this change renders the distinction uninteresting in future.)

Patch Set 1 #

Patch Set 2 : diff -r b54591dcca46 https://code.google.com/p/go.tools #

Patch Set 3 : diff -r b54591dcca46 https://code.google.com/p/go.tools #

Patch Set 4 : diff -r b54591dcca46 https://code.google.com/p/go.tools #

Patch Set 5 : diff -r e6067e8f6d11 https://code.google.com/p/go.tools #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -12 lines) Patch
M oracle/oracle.go View 1 3 chunks +11 lines, -12 lines 0 comments Download

Messages

Total messages: 4
adonovan
Hello crawshaw@google.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go.tools
10 years, 7 months ago (2013-09-11 14:02:46 UTC) #1
Dominik Honnef
LGTM
10 years, 7 months ago (2013-09-11 14:11:12 UTC) #2
crawshaw1
LGTM
10 years, 7 months ago (2013-09-12 11:33:58 UTC) #3
adonovan
10 years, 7 months ago (2013-09-12 14:55:26 UTC) #4
*** Submitted as
https://code.google.com/p/go/source/detail?r=3d3b3db2eb1e&repo=tools ***

go.tools/oracle: set AllASTs=true always, and simplify.

Every one of the oracle's query modes needs to have typed ASTs
available, at least transiently, so that the -pos flag can be
interpreted.  (The only mode that doesn't need the -pos flag
is callgraph, but that needs PTA.)  So we hard-code it to true.

This change fixes a bug in the 'implements' query that causes
-pos parsing to fail.  (This wasn't exposed by the tests
because they are degenerate in that the query always occurs in
the main package, which is specified ad-hoc, i.e. as a source
file not an import path.  That's unfortunate, but this
change renders the distinction uninteresting in future.)

R=crawshaw, dominik.honnef
CC=golang-dev
https://codereview.appspot.com/13334050
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b