diff --git a/buildfiles/run.go b/buildfiles/run.go index ffb3499b..e412c03c 100644 --- a/buildfiles/run.go +++ b/buildfiles/run.go @@ -103,7 +103,7 @@ func (e *runContext) runBuildFilesForPackage(pkg *packages.Package, bc *breadcru return nil } - pkg.Globals = starlark.StringDict{} + pkgGlobals := starlark.StringDict{} for _, file := range pkg.SourceFiles { globals, err := e.RunBuildFile(pkg, file, nbc) if err != nil { @@ -111,10 +111,12 @@ func (e *runContext) runBuildFilesForPackage(pkg *packages.Package, bc *breadcru } for k, v := range globals { - pkg.Globals[k] = v + pkgGlobals[k] = v } } + pkg.Globals = pkgGlobals + return nil }