FAQ
That seems like it could cause subtle problems. What happens if I'm editing
foo/bar/baz.go? The tool will read the definitions from package foo (since
it's the working directory where I invoked $EDITOR) while it's actually
feeding it a file from package bar.
On Thursday, May 14, 2015 at 3:53:09 PM UTC+1, rog wrote:

On 14 May 2015 at 15:11, Alberto García Hierro <[email protected]
<javascript:>> wrote:
I do have a "hackish" solution working, which uses the directory mtime to
invalidate the cache. Works for me, but I do understand that it's an
unreliable mechanism, so I don't have plans to even submit a CL.

On the other hand, I don't think think fixing #4 is worth the effort. I've
checked several editors and most of the time they feed goimports from stdin
using the current buffer, so there's no way goimports can't find about
identifiers in other files from the same package. One could argue that the
editor/plugin authors might be doing it wrong by feeding goimports from
stdin, but I have no idea about how difficult might be to change that.
There's actually not much technical difficulty in doing that.
godef reads input from stdin, but also finds definitions in the
current directory.
--
You received this message because you are subscribed to the Google Groups "golang-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 8 of 17 | next ›
Discussion Overview
groupgolang-dev @
categoriesgo
postedMay 11, '15 at 3:30a
activeMay 18, '15 at 2:40a
posts17
users7
websitegolang.org

People

Translate

site design / logo © 2023 Grokbase