this repo has no description
0
fork

Configure Feed

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

cue/load: avoid "user:" and "instance:" error prefixes

The `cue/load` package currently creates errors with `user:` and/or
`instance:` prefixes, which might make sense in the context of
the Go API, but don't really make sense on the command line,
as evidenced by comments like this:

https://review.gerrithub.io/c/cue-lang/cue/+/1194664/8/cmd/cue/cmd/testdata/script/issue174.txtar

This change removes those prefixes.

This doesn't appear to be covered by any tests, although
these prefixes do show up in some errors printed by a later
CL, which this improves.

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

+1 -4
+1 -1
cue/load/config.go
··· 469 469 i := c.Context.NewInstance("", nil) 470 470 i.Root = c.ModuleRoot 471 471 i.Module = c.Module 472 - i.Err = errors.Promote(err, "instance") 472 + i.Err = errors.Promote(err, "") 473 473 return i 474 474 } 475 475
-3
cue/load/loader.go
··· 143 143 pkg.User = true 144 144 l.addFiles(l.cfg.Dir, pkg) 145 145 146 - l.stk.Push("user") 147 146 _ = pkg.Complete() 148 - l.stk.Pop() 149 - //pkg.LocalPrefix = dirToImportPath(dir) 150 147 pkg.DisplayPath = "command-line-arguments" 151 148 152 149 return pkg