Skip to content

Commit

Permalink
Fix pkg global
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelvigee committed Dec 15, 2023
1 parent 54249bb commit 3007ef4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions buildfiles/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,18 +103,20 @@ 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 {
return err
}

for k, v := range globals {
pkg.Globals[k] = v
pkgGlobals[k] = v
}
}

pkg.Globals = pkgGlobals

return nil
}

Expand Down

0 comments on commit 3007ef4

Please sign in to comment.