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

Issue 167420043: code review 167420043: go.tools/oracle: add whicherrs query mode (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 5 months ago by DMorsing
Modified:
10 years, 4 months ago
Reviewers:
adonovan
CC:
golang-codereviews, Dominik Honnef, adonovan
Visibility:
Public.

Description

x/tools/oracle: add whicherrs query mode The whicherrs query mode takes the position of an error and returns the set of constants, globals and types visible from within the scope of the error being queried. It is meant to be used as a shortcut to find out which errors should be handled for a given functions call.

Patch Set 1 #

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

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

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

Total comments: 61

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

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

Total comments: 12

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

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

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+353 lines, -0 lines) Patch
M cmd/oracle/oracle.el View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download
M oracle/oracle.go View 1 1 chunk +1 line, -0 lines 0 comments Download
M oracle/oracle_test.go View 1 1 chunk +1 line, -0 lines 0 comments Download
M oracle/serial/serial.go View 1 2 3 4 2 chunks +16 lines, -0 lines 0 comments Download
A oracle/testdata/src/main/whicherrs.go View 1 2 3 4 1 chunk +27 lines, -0 lines 0 comments Download
A oracle/testdata/src/main/whicherrs.golden View 1 2 3 4 1 chunk +8 lines, -0 lines 0 comments Download
A oracle/whicherrs.go View 1 2 3 4 5 6 7 1 chunk +294 lines, -0 lines 0 comments Download

Messages

Total messages: 12
DMorsing
Hello golang-codereviews@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go.tools
10 years, 5 months ago (2014-11-09 12:58:53 UTC) #1
Dominik Honnef
Couldn't this be generalized to work with all interfaces, not just the error interface?
10 years, 5 months ago (2014-11-10 07:18:12 UTC) #2
DMorsing
On 2014/11/10 07:18:12, Dominik Honnef wrote: > Couldn't this be generalized to work with all ...
10 years, 5 months ago (2014-11-10 12:39:22 UTC) #3
DMorsing
forgot to CC adonovan.
10 years, 5 months ago (2014-11-12 14:26:37 UTC) #4
DMorsing
On 2014/11/12 14:26:37, DMorsing wrote: > forgot to CC adonovan. Ping.
10 years, 4 months ago (2014-12-04 14:38:05 UTC) #5
adonovan
Hi Daniel, this looks great! Thanks for contributing it, and sorry it took me so ...
10 years, 4 months ago (2014-12-04 17:22:45 UTC) #6
adonovan
On 2014/12/04 17:22:45, adonovan wrote: > Hi Daniel, this looks great! Thanks for contributing it, ...
10 years, 4 months ago (2014-12-04 17:23:08 UTC) #7
DMorsing
PTAL https://codereview.appspot.com/167420043/diff/50001/oracle/serial/serial.go File oracle/serial/serial.go (right): https://codereview.appspot.com/167420043/diff/50001/oracle/serial/serial.go#newcode232 oracle/serial/serial.go:232: type WhichErrs struct { On 2014/12/04 17:22:43, adonovan ...
10 years, 4 months ago (2014-12-04 23:52:01 UTC) #8
adonovan
https://codereview.appspot.com/167420043/diff/90001/oracle/whicherrs.go File oracle/whicherrs.go (right): https://codereview.appspot.com/167420043/diff/90001/oracle/whicherrs.go#newcode29 oracle/whicherrs.go:29: // can be queried recursively somehow. The analysis can ...
10 years, 4 months ago (2014-12-05 02:03:40 UTC) #9
DMorsing
PTAL https://codereview.appspot.com/167420043/diff/90001/oracle/whicherrs.go File oracle/whicherrs.go (right): https://codereview.appspot.com/167420043/diff/90001/oracle/whicherrs.go#newcode30 oracle/whicherrs.go:30: On 2014/12/05 02:03:39, adonovan wrote: > delete blank ...
10 years, 4 months ago (2014-12-05 13:03:59 UTC) #10
adonovan
LGTM https://codereview.appspot.com/167420043/diff/90001/oracle/whicherrs.go File oracle/whicherrs.go (right): https://codereview.appspot.com/167420043/diff/90001/oracle/whicherrs.go#newcode201 oracle/whicherrs.go:201: constants := make(map[ssa.Const]*ssa.NamedConst) On 2014/12/05 13:03:59, DMorsing wrote: ...
10 years, 4 months ago (2014-12-05 15:06:38 UTC) #11
DMorsing
10 years, 4 months ago (2014-12-05 15:51:38 UTC) #12
*** Submitted as
https://code.google.com/p/go/source/detail?r=e41382aa4a20&repo=tools ***

x/tools/oracle: add whicherrs query mode

The whicherrs query mode takes the position of an error and returns the set of
constants, globals and types visible from within the scope of the error being
queried.
It is meant to be used as a shortcut to find out which errors should be handled
for a given functions call.

LGTM=adonovan
R=golang-codereviews, dominik.honnef, adonovan
CC=golang-codereviews
https://codereview.appspot.com/167420043
Sign in to reply to this message.

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