I thought that, too. Maybe there should be a flag to *not* download test
dependencies? I can see situations where that may be undesired. ("Damn it,
I don't want gomock!")
On 12 August 2013 08:35, David Symonds <dsymonds@golang.org> wrote:
> Maybe test dependencies should always be downloaded. Downloading a bit
> extra isn't a big deal, but missing deps later (e.g. getting on a plane)
> can be mighty annoying.
>

Call it -nomock
On Aug 11, 2013 3:49 PM, "Andrew Gerrand" <adg@golang.org> wrote:
> I thought that, too. Maybe there should be a flag to *not* download test
> dependencies? I can see situations where that may be undesired. ("Damn it,
> I don't want gomock!")
>
>
>
>
> On 12 August 2013 08:35, David Symonds <dsymonds@golang.org> wrote:
>
>> Maybe test dependencies should always be downloaded. Downloading a bit
>> extra isn't a big deal, but missing deps later (e.g. getting on a plane)
>> can be mighty annoying.
>>
>
> --
>
> ---
> 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 golang-dev+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

On 12 August 2013 10:10, Rob Pike <r@golang.org> wrote:
> I would favor opt-in not opt-out.
I too favor opt-in, hence this CL.
Probably more interesting aspects of this CL to discuss:
- should the test dependencies be fetched for the named packages only? Or
should test dependencies be fetched for all packages in the dependency tree
(test or non-test)? Ie, should I be able to say "go get -t foo" and have
"go test ..." always work?
- should the test dependencies be installed? This CL merely downloads them,
regardless of whether -d is provided.

let's start as conservatively as possible:
test dependencies should be ignored by default.
-t should download but not install test dependencies.
-t should download test dependencies for only the named package,
not the things it depends on.
the goal is that go get -t foo does the minimum amount necessary to make
'go test foo' run a test.

On 12 August 2013 11:13, Russ Cox <rsc@golang.org> wrote:
> test dependencies should be ignored by default.
> -t should download but not install test dependencies.
> -t should download test dependencies for only the named package,
> not the things it depends on.
>
OK, I agree. This is what this CL does.

Thanks for this - I've wanted it for some time.
I'm happy with the proposed semantics.
On 12 August 2013 02:22, Andrew Gerrand <adg@golang.org> wrote:
>
> On 12 August 2013 11:13, Russ Cox <rsc@golang.org> wrote:
>>
>> test dependencies should be ignored by default.
>> -t should download but not install test dependencies.
>> -t should download test dependencies for only the named package,
>> not the things it depends on.
>
>
> OK, I agree. This is what this CL does.
>
> --
>
> ---
> 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 golang-dev+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

On a slightly related not, the only thing I really miss
currently is the ability to quickly check if all code (including tests)
compiles after a change, without running tests.
Our tests take quite a while to run and it's really
useful to check that all the code at least type checks
correctly before running them.
On 12 August 2013 09:18, roger peppe <rogpeppe@gmail.com> wrote:
> Thanks for this - I've wanted it for some time.
> I'm happy with the proposed semantics.
>
> On 12 August 2013 02:22, Andrew Gerrand <adg@golang.org> wrote:
>>
>> On 12 August 2013 11:13, Russ Cox <rsc@golang.org> wrote:
>>>
>>> test dependencies should be ignored by default.
>>> -t should download but not install test dependencies.
>>> -t should download test dependencies for only the named package,
>>> not the things it depends on.
>>
>>
>> OK, I agree. This is what this CL does.
>>
>> --
>>
>> ---
>> 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 golang-dev+unsubscribe@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>