this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

encoding/jsonschema: do not let cue/load walk up to the git root

When using `GODEBUG=gocachehash=1 go test .`, the number of testInput
lines goes down dramatically after the change, as the test cache logic
no longer needs to stat hundreds of files in parent directories.

$ grep testInput before.txt | wc -l
3960
$ grep testInput after.txt | wc -l
1291

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: Icf1555286be13c40defd33889f99009bcc001e22
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1201439
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Roger Peppe <rogpeppe@gmail.com>

+3
+3
encoding/jsonschema/internal/externaltest/tests.go
··· 91 91 os.Setenv("CUE_EXPERIMENT", "embed") 92 92 inst := load.Instances([]string{"."}, &load.Config{ 93 93 Dir: dir, 94 + // Just like in the cue/load tests, prevent Go tests from walking up to the root 95 + // directory of the git repository, as that almost always causes test cache misses. 96 + ModuleRoot: dir, 94 97 })[0] 95 98 if err := inst.Err; err != nil { 96 99 return nil, err