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

Issue 107160049: code review 107160049: go.tools/go/loader: Add Program.FilePath convenience me...

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 6 months ago by gmk
Modified:
11 years, 6 months ago
Reviewers:
gri, adonovan
CC:
gri, golang-codereviews
Visibility:
Public.

Description

go.tools/go/loader: Add Program.FilePath convenience method for getting the full path of a source file.

Patch Set 1 #

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

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

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -0 lines) Patch
M go/loader/loader.go View 1 1 chunk +10 lines, -0 lines 0 comments Download

Messages

Total messages: 12
gmk
Hello golang-codereviews@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go.tools
11 years, 6 months ago (2014-06-18 13:11:58 UTC) #1
gmk
added gri and adonovan as reviewers
11 years, 6 months ago (2014-06-23 11:05:20 UTC) #2
gri
LGTM
11 years, 6 months ago (2014-06-23 22:12:28 UTC) #3
gri
*** Submitted as https://code.google.com/p/go/source/detail?r=9abbb23a14f6&repo=tools *** go.tools/go/loader: Add Program.FilePath convenience method for getting the full path ...
11 years, 6 months ago (2014-06-23 22:13:10 UTC) #4
adonovan
On 2014/06/23 22:13:10, gri wrote: > *** Submitted as > https://code.google.com/p/go/source/detail?r=9abbb23a14f6&repo=tools *** > > go.tools/go/loader: ...
11 years, 6 months ago (2014-07-07 09:51:03 UTC) #5
gmk
On 2014/07/07 09:51:03, adonovan wrote: > I'm bewildered by this change. I'm bewildered by your ...
11 years, 6 months ago (2014-07-07 10:48:03 UTC) #6
adonovan
On 7 July 2014 06:48, <gordon.klaus@gmail.com> wrote: > The new function is not called anywhere ...
11 years, 6 months ago (2014-07-07 11:03:48 UTC) #7
gmk
On Mon, Jul 7, 2014 at 1:03 PM, Alan Donovan <adonovan@google.com> wrote: > On 7 ...
11 years, 6 months ago (2014-07-07 13:24:24 UTC) #8
adonovan
On 7 July 2014 09:24, Gordon Klaus <gordon.klaus@gmail.com> wrote: > I'm just trying to be ...
11 years, 6 months ago (2014-07-07 13:41:07 UTC) #9
gmk
Good points, I appreciate having a small API. At the same time, you shouldn't have ...
11 years, 6 months ago (2014-07-07 14:24:21 UTC) #10
gri
I'm happy to go with Alan's recommendation here, after all he's the original author of ...
11 years, 6 months ago (2014-07-07 17:58:57 UTC) #11
gmk
11 years, 6 months ago (2014-07-07 19:55:56 UTC) #12
reverted in https://codereview.appspot.com/107570043


On Mon, Jul 7, 2014 at 7:58 PM, Robert Griesemer <gri@golang.org> wrote:

> I'm happy to go with Alan's recommendation here, after all he's the
> original author of that package.
>
> The additional function seems sensible, but perhaps it is not at the
> "granularity" of the rest of the API.
>
> - gri
>
>
> On Mon, Jul 7, 2014 at 7:24 AM, Gordon Klaus <gordon.klaus@gmail.com>
> wrote:
>
>> Good points, I appreciate having a small API.  At the same time, you
>> shouldn't have to understand everything about the world just in order to
>> use some small part of it; maybe the tools shouldn't only target those
>> doing "serious work".  I don't feel strongly about it.  Let's wait for
>> Robert since he was the committer.
>>
>>
>> On Mon, Jul 7, 2014 at 3:41 PM, Alan Donovan <adonovan@google.com> wrote:
>>
>>> On 7 July 2014 09:24, Gordon Klaus <gordon.klaus@gmail.com> wrote:
>>>
>>>> I'm just trying to be helpful.  I had to dig for a little while before
>>>> I discovered how to get the source file paths; I figured I could save some
>>>> people the hassle.  Maybe I could have elucidated the utility of this
>>>> method in the CL, but it seemed apparent at the time (as it always does)
>>>> and Robert apparently saw it.
>>>>
>>>> Instead of simply rejecting this method, you could have inquired as to
>>>> its usefulness.  Don't you think many clients will be interested in source
>>>> file paths?  Consider IDEs and refactoring tools.
>>>>
>>>
>>> I know you were just trying to be helpful, but the best way to help is
>>> to keep the API small.  You had to dig for a little while, but what you
>>> learned (the "theory" of token.FileSet), you have to know anyway to do
>>> serious work with the tools APIs.  Once you've understood it, you know
>>> immediately that to look up a filename, you need a FileSet and a Pos and
>>> you need to call File() or Position().
>>>
>>>
>>
>
Sign in to reply to this message.

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