Skip to content

Commit

Permalink
fix: usage of packages.Imports
Browse files Browse the repository at this point in the history
Signed-off-by: Norman Meier <[email protected]>
  • Loading branch information
n0izn0iz committed Dec 19, 2024
1 parent d2d043e commit efda22d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gnovm/pkg/test/imports.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,11 @@ func LoadImports(store gno.Store, memPkg *gnovm.MemPackage) (err error) {
}()

fset := token.NewFileSet()
imports, err := packages.Imports(memPkg, fset)
importsMap, err := packages.Imports(memPkg, fset)
if err != nil {
return err
}
imports := importsMap.Merge(packages.FileKindCompiled, packages.FileKindTest, packages.FileKindXtest)
for _, imp := range imports {
if gno.IsRealmPath(imp.PkgPath) {
// Don't eagerly load realms.
Expand Down

0 comments on commit efda22d

Please sign in to comment.