Re: [go-nuts] go list "go:generate" files

2020-11-10 Thread Tartari Giacomo
You are right of course.
But given that `go list` is aware of other directives such as build
constraints I was wondering.

Anyways for go code generation, it would be very helpful to be able to have
a list of flies on which invoke go generate in the right order from `go
list`.

Giacomo






On Tue, Nov 10, 2020 at 10:34 AM 'Dan Kortschak' via golang-nuts <
golang-nuts@googlegroups.com> wrote:

> //go:generate is not limited to dependency on Go source files, so this
> is not possible in the general case.
>
> On Tue, 2020-11-10 at 01:05 -0800, gta wrote:
> > Thanks for the reply,
> > yes I know I can grep for those files, but I was hoping that go list
> > could give me the files in the reverse dependency order like go list
> > -deps.
> > I was hoping to shave some time from our generation step.
> > I guess bash is my friend in this.
>
>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "golang-nuts" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/golang-nuts/uTZCKvOS3Gc/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/2107e93634c3abf31f52e14f91e0fa35f8a0cbee.camel%40kortschak.io
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CACA_XD4vOHvfVKTmJHnx9ympftuwvJAcegecu0HW8UTxe7MdjQ%40mail.gmail.com.


Re: [go-nuts] go list "go:generate" files

2020-11-10 Thread 'Dan Kortschak' via golang-nuts
//go:generate is not limited to dependency on Go source files, so this
is not possible in the general case.

On Tue, 2020-11-10 at 01:05 -0800, gta wrote:
> Thanks for the reply,
> yes I know I can grep for those files, but I was hoping that go list
> could give me the files in the reverse dependency order like go list
> -deps.
> I was hoping to shave some time from our generation step.
> I guess bash is my friend in this.



-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/2107e93634c3abf31f52e14f91e0fa35f8a0cbee.camel%40kortschak.io.


Re: [go-nuts] go list "go:generate" files

2020-11-10 Thread gta
Thanks for the reply,
yes I know I can grep for those files, but I was hoping that *go list *could 
give me the files in the reverse dependency order like *go list -deps*.
I was hoping to shave some time from our generation step.
I guess bash is my friend in this.


Giacomo



On Monday, 9 November 2020 at 17:59:06 UTC+1 xav...@gmail.com wrote:

> I know that you're asking about how to do this with the standard tools, 
> but you can do this with grep if you're on a platform that has the command 
> available:
>
> grep --recursive --files-with-matches "//go:generate"
>
> or, for short:
>
> grep -rl "//go:generate"
>
> This command will output a list of files with "//go:generate" in them, 
> separated by newlines. Might be a good alternative if there's no way to do 
> this with the go command.
>
> On Mon, Nov 9, 2020 at 8:00 AM gta  wrote:
>
>> Hello,
>> is there a way to list all the files that have a `//go:generate` 
>> directive with the standard tools?
>> I see that `go list` can show the ignored files so I am assuming it is 
>> detecting `// +build ignore` directives, but I found nothing to lit the go 
>> generate target files.
>>   
>> Thanks in advance,
>>
>> Giacomo
>>
>> -- 
>> 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...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/golang-nuts/c45f0126-dd61-444d-a351-729132bf25fdn%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/c406f384-8e73-42c1-9002-b362c166ef8cn%40googlegroups.com.


Re: [go-nuts] go list "go:generate" files

2020-11-09 Thread Tyler Compton
I know that you're asking about how to do this with the standard tools, but
you can do this with grep if you're on a platform that has the command
available:

grep --recursive --files-with-matches "//go:generate"

or, for short:

grep -rl "//go:generate"

This command will output a list of files with "//go:generate" in them,
separated by newlines. Might be a good alternative if there's no way to do
this with the go command.

On Mon, Nov 9, 2020 at 8:00 AM gta  wrote:

> Hello,
> is there a way to list all the files that have a `//go:generate` directive
> with the standard tools?
> I see that `go list` can show the ignored files so I am assuming it is
> detecting `// +build ignore` directives, but I found nothing to lit the go
> generate target files.
>
> Thanks in advance,
>
> Giacomo
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/c45f0126-dd61-444d-a351-729132bf25fdn%40googlegroups.com
> 
> .
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAA%3DXfu2q7T0tCkWaRTiQ4DyCqROVFKrN5q%2BncFb7Qgd%2BBTgXpQ%40mail.gmail.com.


[go-nuts] go list "go:generate" files

2020-11-09 Thread gta
Hello,
is there a way to list all the files that have a `//go:generate` directive 
with the standard tools?
I see that `go list` can show the ignored files so I am assuming it is 
detecting `// +build ignore` directives, but I found nothing to lit the go 
generate target files.
  
Thanks in advance,

Giacomo

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/c45f0126-dd61-444d-a351-729132bf25fdn%40googlegroups.com.