this repo has no description
0
fork

Configure Feed

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

cue/build: remove context.Context field

Despite remarks about cancellation, the context.Context
field isn't used. While we might add cancellation in the future,
that's easily done later, and for now this is somewhat misleading,
so remove the field and adjust the comment in question.

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

authored by

Roger Peppe and committed by
Daniel Martí
1932295a 94223148

+1 -9
+1 -6
cue/build/context.go
··· 26 26 package build 27 27 28 28 import ( 29 - "context" 30 - 31 29 "cuelang.org/go/cue/ast" 32 30 ) 33 31 34 32 // A Context keeps track of state of building instances and caches work. 35 33 type Context struct { 36 - ctxt context.Context 37 - 38 34 loader LoadFunc 39 35 parseFunc func(str string, src interface{}) (*ast.File, error) 40 36 ··· 80 76 func (c *Context) init() { 81 77 if !c.initialized { 82 78 c.initialized = true 83 - c.ctxt = context.Background() 84 79 c.imports = map[string]*Instance{} 85 80 } 86 81 } 87 82 88 83 // Options: 89 84 // - certain parse modes 90 - // - parallellism 85 + // - parallelism 91 86 // - error handler (allows cancelling the context) 92 87 // - file set. 93 88
-3
cue/load/config.go
··· 124 124 // packages at loading time. 125 125 126 126 // Context specifies the context for the load operation. 127 - // If the context is cancelled, the loader may stop early 128 - // and return an ErrCancelled error. 129 - // If Context is nil, the load cannot be cancelled. 130 127 Context *build.Context 131 128 132 129 // A Module is a collection of packages and instances that are within the