Skip to content

Commit

Permalink
internal/core/runtime: don't share import cache
Browse files Browse the repository at this point in the history
This was always supposed to be this way, but dropped off
the radar as a thing to do.

Fixes #1424
Fixes #1418
Issue #1414

Signed-off-by: Marcel van Lohuizen <mpvl@golang.org>

Change-Id: I25b486d2ea1c6009b00732a113af29bd485f9df5
Signed-off-by: Marcel van Lohuizen <mpvl@golang.org>
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/533473
Reviewed-by: Marcel van Lohuizen <mpvl@gmail.com>
  • Loading branch information
mpvl committed Feb 22, 2022
1 parent 0e634cf commit 195cdf7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion internal/core/runtime/runtime.go
Expand Up @@ -46,6 +46,12 @@ func (r *Runtime) Init() {
if r.index != nil {
return
}
r.index = sharedIndex
r.index = newIndex()

// TODO: the builtin-specific instances will ultimately also not be
// shared by indexes.
r.index.builtinPaths = sharedIndex.builtinPaths
r.index.builtinShort = sharedIndex.builtinShort

r.loaded = map[*build.Instance]interface{}{}
}

0 comments on commit 195cdf7

Please sign in to comment.