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
  • Loading branch information
mpvl committed Feb 19, 2022
1 parent 5914302 commit 4353711
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion internal/core/runtime/runtime.go
Original file line number Diff line number Diff line change
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 4353711

Please sign in to comment.