path/filepath: Simplify Walk interface
The last argument of filepath.Walk was removed, and the Visitor
interface now contains an Error method that is called on errors.
Fixes issue 2237.
> You beat me to it. Sorry for jumping ahead. Want to use the new ...
12 years, 8 months ago
(2011-09-07 21:31:33 UTC)
#3
> You beat me to it.
Sorry for jumping ahead. Want to use the new interface. :)
> I think this might not be right anymore.
Good catch. It looks like this was actually never true for
any of the functions, since there's no logic to make the
path relative. Fixed the doc.
> should this just be a chan os.Error now?
Done.
PTAL
LGTM Thanks for doing this. - gri PS: It would be nice to have a ...
12 years, 8 months ago
(2011-09-07 21:45:18 UTC)
#4
LGTM
Thanks for doing this.
- gri
PS: It would be nice to have a gofix module for this, but I fear w/o more type
info this is not easily possible (except for removing the chan parameter to
Walk, but it still requires manual fixes).
*** Submitted as http://code.google.com/p/go/source/detail?r=661cb84cc6f0 *** path/filepath: Simplify Walk interface The last argument of filepath.Walk was ...
12 years, 8 months ago
(2011-09-07 21:49:54 UTC)
#6
On Wed, Sep 7, 2011 at 2:52 PM, Russ Cox <rsc@golang.org> wrote: > Can we ...
12 years, 8 months ago
(2011-09-07 21:59:24 UTC)
#9
On Wed, Sep 7, 2011 at 2:52 PM, Russ Cox <rsc@golang.org> wrote:
> Can we please hg undo this?
> This is an API change and I don't think we
> want it in this weekly without knowing it's
> the change we want to make.
>
Hey, I said I would look into this. I want to reconsider the API
because I think something much better overall should exist. Please
revert this change.
-rob
> Hey, I said I would look into this. I want to reconsider the API ...
12 years, 8 months ago
(2011-09-07 22:07:13 UTC)
#10
> Hey, I said I would look into this. I want to reconsider the API
> because I think something much better overall should exist. Please
> revert this change.
Sorry about that. Wasn't trying to rule over your request.. I thought
there was already an internal agreement it was fine to go ahead with
this given further comments on the issue.
Robert, Russ and I seem to agree this is a simple yet useful API
change, but I'm keen on learning your idea as well if you see
something entirely different with the same benefits.
--
Gustavo Niemeyer
http://niemeyer.nethttp://niemeyer.net/plushttp://niemeyer.net/twitterhttp://niemeyer.net/blog
-- I never filed a patent.
I don't see quite the anonymity, but more to the point this was an API ...
12 years, 8 months ago
(2011-09-07 22:10:30 UTC)
#11
I don't see quite the anonymity, but more to the point this was an API
change that happened pretty fast, after I said I'd look into a
solution. Moreover, this is an API change to fix a bug in the
implementation, which is a clue the issue requires more thought.
By the way, API change CLs should come with gofix modules. Ironically,
you changed gofix/main.go but didn't add a module.
Again, please pull this out for now.
-rob
> I don't see quite the unanimity, but more to the point this was an ...
12 years, 8 months ago
(2011-09-07 22:15:56 UTC)
#13
> I don't see quite the unanimity, but more to the point this was an API
Please read the thread in the issue.
> change that happened pretty fast, after I said I'd look into a
> solution. Moreover, this is an API change to fix a bug in the
> implementation, which is a clue the issue requires more thought.
>
> By the way, API change CLs should come with gofix modules. Ironically,
> you changed gofix/main.go but didn't add a module.
Because indeed I wasn't planning on adding one due to the nature of
the change. I accept critiques on the choice, but it wasn't an
overlook.
> Again, please pull this out for now.
Doing that now.
--
Gustavo Niemeyer
http://niemeyer.nethttp://niemeyer.net/plushttp://niemeyer.net/twitterhttp://niemeyer.net/blog
-- I never filed a patent.
This is entirely my fault - I should have solicited more feedback. My apologies. That ...
12 years, 8 months ago
(2011-09-07 22:28:27 UTC)
#15
This is entirely my fault - I should have solicited more feedback. My
apologies.
That said, the changes required were so straight-forward (and existing code
so easy to adjust) that I am inclined to think this is not a bad change and
even a natural API for the particular problem. But there may be a more
general over-arching principle that applies elsewhere.
I have thought about the gofix issue (and mentioned it in the code review),
but except for the parameter passing change to Walk, I'm not sure that the
gofix is strong enough to do the change in general. Only removing the
parameter is not going to make a difference - the compiler will still
complain about the missing Error method.
- gri
On Wed, Sep 7, 2011 at 2:59 PM, Rob 'Commander' Pike <r@golang.org> wrote:
> On Wed, Sep 7, 2011 at 2:52 PM, Russ Cox <rsc@golang.org> wrote:
> > Can we please hg undo this?
> > This is an API change and I don't think we
> > want it in this weekly without knowing it's
> > the change we want to make.
> >
>
> Hey, I said I would look into this. I want to reconsider the API
> because I think something much better overall should exist. Please
> revert this change.
>
> -rob
>
On Wed, Sep 7, 2011 at 18:28, Robert Griesemer <gri@golang.org> wrote: > I have thought ...
12 years, 8 months ago
(2011-09-08 02:03:36 UTC)
#16
On Wed, Sep 7, 2011 at 18:28, Robert Griesemer <gri@golang.org> wrote:
> I have thought about the gofix issue (and mentioned it in the code review),
> but except for the parameter passing change to Walk, I'm not sure that the
> gofix is strong enough to do the change in general. Only removing the
> parameter is not going to make a difference - the compiler will still
> complain about the missing Error method.
Even with a working gofix, I think it would still help to
have more time to think about which API change to make.
Russ
Issue 4964067: code review 4964067: path/filepath: Simplify Walk interface
(Closed)
Created 12 years, 8 months ago by niemeyer
Modified 12 years, 8 months ago
Reviewers: rsc, r, gustavo_niemeyer.net
Base URL:
Comments: 2