Re: [go-nuts] goimports has been updated

2016-07-20 Thread Nathan Fisher
+1 to this. Would a vendor folder make sense at the same level as the src
folder? Make it an override able default.

I guess it doesn't address a monorepo approach though or the collocation of
generated files like client/server stubs for protobuf/thrift/etc.

On Fri, 15 Jul 2016 at 22:30, Dave Cheney  wrote:

> Why not put non go code in another directory tree? That seems much simpler.
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
-- 
- from my thumbs to yours

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] goimports has been updated

2016-07-15 Thread Daniel Skinner
$HOME/local/src usage predates Go usage for me, and besides, the structure
and content of a GOPATH has merit stretching beyond languages as a simple
method for source organization.

On Fri, Jul 15, 2016, 4:30 PM Dave Cheney  wrote:

> Why not put non go code in another directory tree? That seems much simpler.
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] goimports has been updated

2016-07-15 Thread Peter Waller
On 15 July 2016 at 22:30, Dave Cheney  wrote:

> Why not put non go code in another directory tree? That seems much simpler.


I agree with you and see where you're coming from. That was where my
original hesitation came from, but...

My $GOPATH is .local/src. Why set it anywhere else? Then, why restrict it
to go code?

And what about large directory structures with mixed sources?

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] goimports has been updated

2016-07-15 Thread Dave Cheney
Why not put non go code in another directory tree? That seems much simpler. 

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] goimports has been updated

2016-07-15 Thread Peter Waller
Muahah. Well I'm sure I can speak for many people when I say we're grateful
it's being improved! :)

On 15 July 2016 at 21:03, Brad Fitzpatrick  wrote:

> I am just as relieved. Imagine the pain and frustration you felt on every
> slow save but with an additional feeling of guilt that it's probably your
> fault and you should fix it, and other people use this thing nowadays. :)
>
>
>
>
> On Fri, Jul 15, 2016 at 12:56 PM, Peter Waller 
> wrote:
>
>> Just saw this was merged - this is excellent.
>>
>> These latest changes bring the runtime down to 400ms. Wonderful! I had no
>> idea how much this was interrupting my flow before it was fixed :)
>>
>>
>> On 15 July 2016 at 19:34, Brad Fitzpatrick  wrote:
>>>
>>> Done: https://go-review.googlesource.com/24971
>>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] goimports has been updated

2016-07-15 Thread Peter Waller
Just saw this was merged - this is excellent.

These latest changes bring the runtime down to 400ms. Wonderful! I had no
idea how much this was interrupting my flow before it was fixed :)


On 15 July 2016 at 19:34, Brad Fitzpatrick  wrote:
>
> Done: https://go-review.googlesource.com/24971
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] goimports has been updated

2016-07-15 Thread Brad Fitzpatrick
On Fri, Jul 15, 2016 at 5:47 AM, Peter Waller  wrote:

> Awesome!
>
> For me it brings the CPU time from 6.5s to 3s. Wall from 2.9s to 2s. A
> noticable improvement.
>
> One thing that still makes it slow for me (2s instead of 500ms, I just
> tested), is that I have several of deep trees which aren't go code in my
> $GOPATH/src. To name a few: linux, clang, llvm.
>
> I feel silly for asking, but any chance of having a mechanism to ignore
> these non-go trees, or does anyone have any other clever ideas how to avoid
> this?
>

Done: https://go-review.googlesource.com/24971

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] goimports has been updated

2016-07-15 Thread Sam Whited
On Fri, Jul 15, 2016 at 9:49 AM, Peter Waller  wrote:
> Another suggestion which might be even nicer for the implementation: if a
> directory contains `.goimportsignore`, that directory is skipped.

That would have to be in addition to a file that lists directories,
otherwise you can't skip submodules and subtree merges and the like
(external code where you don't have the ability to add a
.goimportsignore file).

—Sam



-- 
Sam Whited
pub 4096R/54083AE104EA7AD3

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] goimports has been updated

2016-07-15 Thread Zlatko Čalušić

On 15.07.2016 16:31, Jan Mercl wrote:


On Fri, Jul 15, 2016 at 4:29 PM Thomas Frössman > wrote:


> Yeah. I also have (several) linux trees, gcc's and stuff in my 
GOPATH.. I would really like some global config way to tell 
goimports/gorename/... to ignore a bunch of subtrees.


I do not use goimports. My 2c anyway: What about checking for 
.goimportsignore in the root of the subtree that should be skipped?


As we're speaking of Git trees here, I wouldn't like poluting them with 
extra files. Git is very picky about that, for a good reason.


Also, it could be another performance hit, because now goimports tool 
would need to check the existence of .goimportsignore file in each and 
every folder (not unlike Apache's .htaccess).


I think I'd rather see a single ~/.config/goimports/goimports.ini config 
file, where we could have a section along these lines:


[Ignore]
git.kernel.org/torvalds/linux
...

The config file might become useful later for other possible customizations.

Regards,

--
Zlatko

--
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] goimports has been updated

2016-07-15 Thread Thomas Frössman
Yeah. I also have (several) linux trees, gcc's and stuff in my GOPATH.. I would 
really like some global config way to tell   goimports/gorename/... to ignore a 
bunch of subtrees.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] goimports has been updated

2016-07-15 Thread Thomas Frössman
Yeah. I also have (several) linux trees, gcc's and stuff in my GOPATH.. I would 
really like some global config way to tell   goimports/gorename/... to ignore a 
bunch of subtrees.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] goimports has been updated

2016-07-15 Thread Zlatko Čalušić

I'd like to second this!

Also have the linux tree in $GOPATH, and ever since I put it there 
goimports slowed down. Some kind of subtree exclusion mechanism would be 
great.


Nevertheless, thank you for your work on probably the most useful Go 
tool out there, Brad! I can't imagine programming in Go without 
goimports anymore, it's that addictive. ;)


Best regards,

On 15.07.2016 14:47, Peter Waller wrote:

Awesome!

For me it brings the CPU time from 6.5s to 3s. Wall from 2.9s to 2s. A 
noticable improvement.


One thing that still makes it slow for me (2s instead of 500ms, I just 
tested), is that I have several of deep trees which aren't go code in 
my $GOPATH/src. To name a few: linux, clang, llvm.


I feel silly for asking, but any chance of having a mechanism to 
ignore these non-go trees, or does anyone have any other clever ideas 
how to avoid this?


I'd prefer not to store other directories separately just because they 
aren't go code.

--
You received this message because you are subscribed to the Google 
Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to golang-nuts+unsubscr...@googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
Zlatko

--
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [go-nuts] goimports has been updated

2016-07-15 Thread Peter Waller
Awesome!

For me it brings the CPU time from 6.5s to 3s. Wall from 2.9s to 2s. A
noticable improvement.

One thing that still makes it slow for me (2s instead of 500ms, I just
tested), is that I have several of deep trees which aren't go code in my
$GOPATH/src. To name a few: linux, clang, llvm.

I feel silly for asking, but any chance of having a mechanism to ignore
these non-go trees, or does anyone have any other clever ideas how to avoid
this?

I'd prefer not to store other directories separately just because they
aren't go code.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.