Skip to content

Commit

Permalink
bug fixed // import builtin
Browse files Browse the repository at this point in the history
  • Loading branch information
JessonChan committed Jan 14, 2022
1 parent e41f94b commit 80fe588
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions x/gopproj/gopfiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package gopproj
import (
"bytes"
"crypto/sha1"
"github.com/goplus/gox/packages"
"log"
"os"
"path/filepath"
Expand Down Expand Up @@ -118,6 +119,7 @@ func (p *gopFiles) GenGo(outFile, modFile string) error {
srcDir, _ := filepath.Split(outFile)
modDir, _ := filepath.Split(modFile)
conf := &cl.Config{WorkingDir: modDir, TargetDir: srcDir, Fset: fset}
conf.Importer, _, _ = packages.NewImporter(nil, "github.com/goplus/gop/builtin")
out, err := cl.NewPackage("", mainPkg, conf)
if err != nil {
return err
Expand Down

0 comments on commit 80fe588

Please sign in to comment.