Repository: goplus/gop
Pull request #2369 (2025-05-23 23:03:55)

module github.com/goplus/gop => github.com/goplus/xgo


Patch:
diff --git a/.goreleaser.yaml b/.goreleaser.yaml
index 62d9d0ad..d43b8d8b 100644
--- a/.goreleaser.yaml
+++ b/.goreleaser.yaml
@@ -11,8 +11,8 @@ builds:
     main: ./cmd/gop
     binary: bin/gop
     ldflags:
-      - -X github.com/goplus/gop/env.buildVersion=v{{.Version}}
-      - -X github.com/goplus/gop/env.buildDate={{.Date}}
+      - -X github.com/goplus/xgo/env.buildVersion=v{{.Version}}
+      - -X github.com/goplus/xgo/env.buildDate={{.Date}}
     env:
       - CGO_ENABLED=0
     goos:
@@ -102,10 +102,10 @@ docker_manifests:
 
 winget:
   - name: goplus
-    homepage: "https://goplus.org/"
+    homepage: "https://xgo.dev/"
     publisher: goplus
-    publisher_url: https://github.com/goplus/gop
-    publisher_support_url: "https://github.com/goplus/gop/issues/new"
+    publisher_url: https://github.com/goplus/xgo
+    publisher_support_url: "https://github.com/goplus/xgo/issues/new"
     package_identifier: goplus.gop
     path: "manifests/g/goplus/gop/{{.Version}}"
     tags:
@@ -151,7 +151,7 @@ winget:
 nfpms:
   - package_name: gop
     vendor: goplus
-    homepage: https://goplus.org/
+    homepage: https://xgo.dev/
     maintainer: Li Jie <cpunion@gmail.com>
     license: Apache-2.0
     description: |
diff --git a/README.md b/README.md
index 91f0bb64..5f9be2af 100644
--- a/README.md
+++ b/README.md
@@ -16,10 +16,10 @@
 [![Interpreter](https://img.shields.io/badge/interpreter-iGo+-seagreen.svg)](https://github.com/goplus/igop)
 -->
 
-[![Build Status](https://github.com/goplus/gop/actions/workflows/go.yml/badge.svg)](https://github.com/goplus/gop/actions/workflows/go.yml)
-[![Go Report Card](https://goreportcard.com/badge/github.com/goplus/gop)](https://goreportcard.com/report/github.com/goplus/gop)
+[![Build Status](https://github.com/goplus/xgo/actions/workflows/go.yml/badge.svg)](https://github.com/goplus/xgo/actions/workflows/go.yml)
+[![Go Report Card](https://goreportcard.com/badge/github.com/goplus/xgo)](https://goreportcard.com/report/github.com/goplus/xgo)
 [![Coverage Status](https://codecov.io/gh/goplus/gop/branch/main/graph/badge.svg)](https://codecov.io/gh/goplus/gop)
-[![GitHub release](https://img.shields.io/github/v/tag/goplus/gop.svg?label=release)](https://github.com/goplus/gop/releases)
+[![GitHub release](https://img.shields.io/github/v/tag/goplus/gop.svg?label=release)](https://github.com/goplus/xgo/releases)
 [![Discord](https://img.shields.io/badge/Discord-online-success.svg?logo=discord&logoColor=white)](https://discord.com/invite/mYjWCJDcAr)
 
 </div>
@@ -332,7 +332,7 @@ $ brew install goplus
 ### from source code
 
 ```bash
-git clone https://github.com/goplus/gop.git
+git clone https://github.com/goplus/xgo.git
 cd gop
 
 # On mac/linux run:
diff --git a/ast/ast.go b/ast/ast.go
index 58099209..f07aa8be 100644
--- a/ast/ast.go
+++ b/ast/ast.go
@@ -21,7 +21,7 @@ package ast
 import (
 	"go/ast"
 
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/token"
 )
 
 // ----------------------------------------------------------------------------
diff --git a/ast/ast_gop.go b/ast/ast_gop.go
index 1f3afd96..7a3f08a2 100644
--- a/ast/ast_gop.go
+++ b/ast/ast_gop.go
@@ -17,7 +17,7 @@
 package ast
 
 import (
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/token"
 )
 
 // -----------------------------------------------------------------------------
@@ -60,7 +60,7 @@ func (*OverloadFuncDecl) declNode() {}
 // -----------------------------------------------------------------------------
 
 // A DomainTextLit node represents a domain-specific text literal.
-// https://github.com/goplus/gop/issues/2143
+// https://github.com/goplus/xgo/issues/2143
 //
 //	domainTag`...`
 //	domainTag`> arg1, arg2, ...
diff --git a/ast/commentmap.go b/ast/commentmap.go
index 825e7db9..a2fb4953 100644
--- a/ast/commentmap.go
+++ b/ast/commentmap.go
@@ -21,7 +21,7 @@ import (
 	"fmt"
 	"sort"
 
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/token"
 )
 
 type byPos []*CommentGroup
diff --git a/ast/filter.go b/ast/filter.go
index c624ff7a..dc66ab80 100644
--- a/ast/filter.go
+++ b/ast/filter.go
@@ -19,7 +19,7 @@ package ast
 import (
 	"sort"
 
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/token"
 )
 
 // ----------------------------------------------------------------------------
diff --git a/ast/fromgo/gopast.go b/ast/fromgo/gopast.go
index 8cde3acb..3a421588 100644
--- a/ast/fromgo/gopast.go
+++ b/ast/fromgo/gopast.go
@@ -22,10 +22,10 @@ import (
 	"log"
 	"reflect"
 
-	gopast "github.com/goplus/gop/ast"
-	goptoken "github.com/goplus/gop/token"
+	gopast "github.com/goplus/xgo/ast"
+	goptoken "github.com/goplus/xgo/token"
 
-	"github.com/goplus/gop/ast/fromgo/typeparams"
+	"github.com/goplus/xgo/ast/fromgo/typeparams"
 )
 
 // ----------------------------------------------------------------------------
diff --git a/ast/gopq/dom.go b/ast/gopq/dom.go
index bf10f99f..c57693f2 100644
--- a/ast/gopq/dom.go
+++ b/ast/gopq/dom.go
@@ -17,8 +17,8 @@
 package gopq
 
 import (
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/token"
 )
 
 // -----------------------------------------------------------------------------
diff --git a/ast/gopq/gopq.go b/ast/gopq/gopq.go
index 4afcddcf..984ec377 100644
--- a/ast/gopq/gopq.go
+++ b/ast/gopq/gopq.go
@@ -21,10 +21,10 @@ import (
 	"io/fs"
 	"syscall"
 
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/parser"
-	"github.com/goplus/gop/parser/fsx"
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/parser"
+	"github.com/goplus/xgo/parser/fsx"
+	"github.com/goplus/xgo/token"
 )
 
 // -----------------------------------------------------------------------------
diff --git a/ast/gopq/helper.go b/ast/gopq/helper.go
index 8d2d7a71..785a45a1 100644
--- a/ast/gopq/helper.go
+++ b/ast/gopq/helper.go
@@ -19,8 +19,8 @@ package gopq
 import (
 	"strconv"
 
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/token"
 )
 
 // -----------------------------------------------------------------------------
diff --git a/ast/import.go b/ast/import.go
index d7a122c8..8c5adedc 100644
--- a/ast/import.go
+++ b/ast/import.go
@@ -20,7 +20,7 @@ import (
 	"sort"
 	"strconv"
 
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/token"
 )
 
 // SortImports sorts runs of consecutive import lines in import blocks in f.
diff --git a/ast/mod/deps.go b/ast/mod/deps.go
index ffa0f464..1ad86f57 100644
--- a/ast/mod/deps.go
+++ b/ast/mod/deps.go
@@ -23,8 +23,8 @@ import (
 	goast "go/ast"
 	gotoken "go/token"
 
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/token"
 )
 
 // ----------------------------------------------------------------------------
@@ -72,7 +72,7 @@ func (p Deps) xgoPkgPath(s string, withXgoStd bool) {
 		if !withXgoStd {
 			return
 		}
-		s = "github.com/goplus/gop/" + s[4:]
+		s = "github.com/goplus/xgo/" + s[4:]
 	} else if strings.HasPrefix(s, "C") {
 		if len(s) == 1 {
 			s = "github.com/goplus/libc"
diff --git a/ast/print.go b/ast/print.go
index b506ad19..61eaa48c 100644
--- a/ast/print.go
+++ b/ast/print.go
@@ -24,7 +24,7 @@ import (
 	"os"
 	"reflect"
 
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/token"
 )
 
 // A FieldFilter may be provided to Fprint to control the output.
diff --git a/ast/resolve.go b/ast/resolve.go
index 1298bc58..db36cfe3 100644
--- a/ast/resolve.go
+++ b/ast/resolve.go
@@ -23,8 +23,8 @@ import (
 	"fmt"
 	"strconv"
 
-	"github.com/goplus/gop/scanner"
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/scanner"
+	"github.com/goplus/xgo/token"
 )
 
 type pkgBuilder struct {
diff --git a/ast/scope.go b/ast/scope.go
index 50e535d4..857a551d 100644
--- a/ast/scope.go
+++ b/ast/scope.go
@@ -22,7 +22,7 @@ import (
 	"bytes"
 	"fmt"
 
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/token"
 )
 
 // A Scope maintains the set of named language entities declared
diff --git a/ast/togo/goast.go b/ast/togo/goast.go
index ab7ed3b8..43c60e54 100644
--- a/ast/togo/goast.go
+++ b/ast/togo/goast.go
@@ -22,8 +22,8 @@ import (
 	"log"
 	"reflect"
 
-	gopast "github.com/goplus/gop/ast"
-	goptoken "github.com/goplus/gop/token"
+	gopast "github.com/goplus/xgo/ast"
+	goptoken "github.com/goplus/xgo/token"
 )
 
 // ----------------------------------------------------------------------------
diff --git a/builtin/doc.xgo b/builtin/doc.xgo
index 816aba34..aa7050cc 100644
--- a/builtin/doc.xgo
+++ b/builtin/doc.xgo
@@ -1,7 +1,7 @@
 package builtin
 
 import (
-	"github.com/qiniu/x/gop/osx"
+	"github.com/qiniu/x/osx"
 	"io"
 	"os"
 	"reflect"
diff --git a/cl/builtin.go b/cl/builtin.go
index f483cf53..f6efeb72 100644
--- a/cl/builtin.go
+++ b/cl/builtin.go
@@ -21,7 +21,7 @@ import (
 	"go/types"
 
 	"github.com/goplus/gogen"
-	"github.com/goplus/gop/cl/internal/typesalias"
+	"github.com/goplus/xgo/cl/internal/typesalias"
 )
 
 // -----------------------------------------------------------------------------
@@ -79,17 +79,17 @@ func initBuiltin(_ *gogen.Package, builtin *types.Package, os, fmt, ng, osx, bui
 }
 
 const (
-	osxPkgPath = "github.com/qiniu/x/gop/osx"
+	osxPkgPath = "github.com/qiniu/x/osx"
 )
 
 func (ctx *pkgCtx) newBuiltinDefault(pkg *gogen.Package, conf *gogen.Config) *types.Package {
 	builtin := types.NewPackage("", "")
-	fmt := pkg.TryImport("fmt")
+	fmt := pkg.Import("fmt")
 	os := pkg.TryImport("os")
 	reflect := pkg.TryImport("reflect")
 	osx := pkg.TryImport(osxPkgPath)
-	buil := pkg.TryImport("github.com/qiniu/x/gop")
-	ng := pkg.TryImport("github.com/qiniu/x/gop/ng")
+	buil := pkg.TryImport("github.com/qiniu/x/xgo")
+	ng := pkg.TryImport("github.com/qiniu/x/xgo/ng")
 	strx := pkg.TryImport("github.com/qiniu/x/stringutil")
 	stringslice := pkg.TryImport("github.com/qiniu/x/stringslice")
 	pkg.TryImport("strconv")
diff --git a/cl/c.go b/cl/c.go
index 8d4856ba..8f61d5d7 100644
--- a/cl/c.go
+++ b/cl/c.go
@@ -30,7 +30,7 @@ const (
 
 func simplifyXgoPackage(pkgPath string) string {
 	if strings.HasPrefix(pkgPath, "xgo/") || strings.HasPrefix(pkgPath, "gop/") {
-		return "github.com/goplus/gop/" + pkgPath[4:]
+		return "github.com/goplus/xgo/" + pkgPath[4:]
 	}
 	return pkgPath
 }
diff --git a/cl/classfile.go b/cl/classfile.go
index ec839da8..9d980345 100644
--- a/cl/classfile.go
+++ b/cl/classfile.go
@@ -28,9 +28,9 @@ import (
 	"strings"
 
 	"github.com/goplus/gogen"
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/token"
 	"github.com/goplus/mod/modfile"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/token"
 	"github.com/qiniu/x/stringutil"
 )
 
diff --git a/cl/compile.go b/cl/compile.go
index 139a90ed..6cf92162 100644
--- a/cl/compile.go
+++ b/cl/compile.go
@@ -27,11 +27,11 @@ import (
 	"strings"
 
 	"github.com/goplus/gogen"
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/ast/fromgo"
-	"github.com/goplus/gop/cl/internal/typesalias"
-	"github.com/goplus/gop/token"
 	"github.com/goplus/mod/modfile"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/ast/fromgo"
+	"github.com/goplus/xgo/cl/internal/typesalias"
+	"github.com/goplus/xgo/token"
 	"github.com/qiniu/x/errors"
 )
 
diff --git a/cl/expr.go b/cl/expr.go
index 6b0c3d8d..bf6aaf49 100644
--- a/cl/expr.go
+++ b/cl/expr.go
@@ -29,10 +29,10 @@ import (
 	"syscall"
 
 	"github.com/goplus/gogen"
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/printer"
-	"github.com/goplus/gop/token"
-	tpl "github.com/goplus/gop/tpl/ast"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/printer"
+	"github.com/goplus/xgo/token"
+	tpl "github.com/goplus/xgo/tpl/ast"
 )
 
 /*-----------------------------------------------------------------------------
@@ -1147,11 +1147,11 @@ func compileStringLitEx(ctx *blockCtx, cb *gogen.CodeBuilder, lit *ast.BasicLit)
 }
 
 const (
-	tplPkgPath = "github.com/goplus/gop/tpl"
+	tplPkgPath = "github.com/goplus/xgo/tpl"
 )
 
 // A DomainTextLit node represents a domain-specific text literal.
-// https://github.com/goplus/gop/issues/2143
+// https://github.com/goplus/xgo/issues/2143
 //
 //	domainTag`...`
 //	domainTag`> arg1, arg2, ...
diff --git a/cl/func_type_and_var.go b/cl/func_type_and_var.go
index 08f5b8ad..b0a02f82 100644
--- a/cl/func_type_and_var.go
+++ b/cl/func_type_and_var.go
@@ -24,8 +24,8 @@ import (
 	"strconv"
 
 	"github.com/goplus/gogen"
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/token"
 )
 
 // -----------------------------------------------------------------------------
diff --git a/cl/internal/spx/game.go b/cl/internal/spx/game.go
index 147b8d2a..a927dc0c 100644
--- a/cl/internal/spx/game.go
+++ b/cl/internal/spx/game.go
@@ -17,7 +17,7 @@
 package spx
 
 const (
-	GopPackage = "github.com/goplus/gop/cl/internal/spx/pkg"
+	GopPackage = "github.com/goplus/xgo/cl/internal/spx/pkg"
 	Gop_sched  = "Sched,SchedNow"
 )
 
diff --git a/cl/internal/spx/sprite.go b/cl/internal/spx/sprite.go
index 92804843..7229e69c 100644
--- a/cl/internal/spx/sprite.go
+++ b/cl/internal/spx/sprite.go
@@ -17,7 +17,7 @@
 package spx
 
 import (
-	"github.com/goplus/gop/cl/internal/spx/pkg"
+	"github.com/goplus/xgo/cl/internal/spx/pkg"
 )
 
 type Sprite struct {
diff --git a/cl/internal/spx4/game.go b/cl/internal/spx4/game.go
index 6891ae00..faa9b277 100644
--- a/cl/internal/spx4/game.go
+++ b/cl/internal/spx4/game.go
@@ -17,7 +17,7 @@
 package spx4
 
 const (
-	GopPackage = "github.com/goplus/gop/cl/internal/spx/pkg"
+	GopPackage = "github.com/goplus/xgo/cl/internal/spx/pkg"
 	Gop_sched  = "Sched,SchedNow"
 )
 
diff --git a/cl/internal/spx4/sprite.go b/cl/internal/spx4/sprite.go
index 0ef81ea7..6c3d7045 100644
--- a/cl/internal/spx4/sprite.go
+++ b/cl/internal/spx4/sprite.go
@@ -17,7 +17,7 @@
 package spx4
 
 import (
-	"github.com/goplus/gop/cl/internal/spx/pkg"
+	"github.com/goplus/xgo/cl/internal/spx/pkg"
 )
 
 type Sprite struct {
diff --git a/cl/outline/outline.go b/cl/outline/outline.go
index 8c2614ba..881b3431 100644
--- a/cl/outline/outline.go
+++ b/cl/outline/outline.go
@@ -22,10 +22,10 @@ import (
 
 	"github.com/goplus/gogen"
 	"github.com/goplus/gogen/typeutil"
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/cl"
-	"github.com/goplus/gop/token"
 	"github.com/goplus/mod/modfile"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/cl"
+	"github.com/goplus/xgo/token"
 )
 
 // -----------------------------------------------------------------------------
diff --git a/cl/recorder.go b/cl/recorder.go
index 0d7af736..0acdcb05 100644
--- a/cl/recorder.go
+++ b/cl/recorder.go
@@ -21,10 +21,10 @@ import (
 	"strings"
 
 	"github.com/goplus/gogen"
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/ast/fromgo"
-	"github.com/goplus/gop/cl/internal/typesutil"
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/ast/fromgo"
+	"github.com/goplus/xgo/cl/internal/typesutil"
+	"github.com/goplus/xgo/token"
 )
 
 type goxRecorder struct {
diff --git a/cl/stmt.go b/cl/stmt.go
index 369790f3..496cbdff 100644
--- a/cl/stmt.go
+++ b/cl/stmt.go
@@ -27,8 +27,8 @@ import (
 	"go/types"
 
 	"github.com/goplus/gogen"
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/token"
 )
 
 func fileLineFile(relBaseDir, absFile string) string {
diff --git a/cl/typeparams.go b/cl/typeparams.go
index 61a524c6..0c6ef230 100644
--- a/cl/typeparams.go
+++ b/cl/typeparams.go
@@ -19,9 +19,9 @@ package cl
 import (
 	"go/types"
 
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/cl/internal/typesalias"
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/cl/internal/typesalias"
+	"github.com/goplus/xgo/token"
 )
 
 func toTermList(ctx *blockCtx, expr ast.Expr) []*types.Term {
diff --git a/cmd/chore/gopfmt/gopfmt.go b/cmd/chore/gopfmt/gopfmt.go
deleted file mode 100644
index 3000e5de..00000000
--- a/cmd/chore/gopfmt/gopfmt.go
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * Copyright (c) 2021 The XGo Authors (xgo.dev). All rights reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package main
-
-import (
-	"bytes"
-	"flag"
-	"fmt"
-	"go/parser"
-	"go/token"
-	"io"
-	"io/fs"
-	"os"
-	"path/filepath"
-	"strings"
-
-	goformat "go/format"
-
-	"github.com/goplus/gop/format"
-	"github.com/goplus/gop/tool"
-)
-
-var (
-	procCnt    = 0
-	walkSubDir = false
-	rootDir    = ""
-)
-
-var (
-	// main operation modes
-	write = flag.Bool("w", false, "write result to (source) file instead of stdout")
-)
-
-func usage() {
-	fmt.Fprintf(os.Stderr, "usage: gopfmt [flags] [path ...]\n")
-	flag.PrintDefaults()
-}
-
-func report(err error) {
-	fmt.Println(err)
-	os.Exit(2)
-}
-
-func processFile(filename string, class bool, in io.Reader, out io.Writer) error {
-	if in == nil {
-		var err error
-		in, err = os.Open(filename)
-		if err != nil {
-			return err
-		}
-	}
-	src, err := io.ReadAll(in)
-	if err != nil {
-		return err
-	}
-	var res []byte
-	if filepath.Ext(filename) == ".go" {
-		fset := token.NewFileSet()
-		f, err := parser.ParseFile(fset, filename, src, parser.ParseComments)
-		if err != nil {
-			return err
-		}
-		var buf bytes.Buffer
-		err = goformat.Node(&buf, fset, f)
-		if err != nil {
-			return err
-		}
-		res = buf.Bytes()
-	} else {
-		res, err = format.Source(src, class, filename)
-	}
-	if err != nil {
-		return err
-	}
-
-	if *write {
-		dir, file := filepath.Split(filename)
-		f, err := os.CreateTemp(dir, file)
-		if err != nil {
-			return err
-		}
-		tmpfile := f.Name()
-		_, err = f.Write(res)
-		f.Close()
-		if err != nil {
-			return err
-		}
-		err = os.Remove(filename)
-		if err != nil {
-			return err
-		}
-		return os.Rename(tmpfile, filename)
-	}
-	if !*write {
-		_, err = out.Write(res)
-	}
-
-	return err
-}
-
-type walker struct {
-	dirMap map[string]func(ext string) (ok bool, class bool)
-}
-
-func newWalker() *walker {
-	return &walker{dirMap: make(map[string]func(ext string) (ok bool, class bool))}
-}
-
-func (w *walker) walk(path string, d fs.DirEntry, err error) error {
-	if err != nil {
-		fmt.Fprintln(os.Stderr, err)
-	} else if d.IsDir() {
-		if !walkSubDir && path != rootDir {
-			return filepath.SkipDir
-		}
-	} else {
-		// Directories are walked, ignoring non-Gop files.
-		dir, _ := filepath.Split(path)
-		fn, ok := w.dirMap[dir]
-		if !ok {
-			if mod, err := tool.LoadMod(path); err == nil {
-				fn = func(ext string) (ok bool, class bool) {
-					switch ext {
-					case ".go", ".xgo", ".gop":
-						ok = true
-					case ".gox", ".spx", ".gmx":
-						ok, class = true, true
-					default:
-						class = mod.IsClass(ext)
-						ok = class
-					}
-					return
-				}
-			} else {
-				fn = func(ext string) (ok bool, class bool) {
-					switch ext {
-					case ".go", ".xgo", ".gop":
-						ok = true
-					case ".gox", ".spx", ".gmx":
-						ok, class = true, true
-					}
-					return
-				}
-			}
-			w.dirMap[dir] = fn
-		}
-		ext := filepath.Ext(path)
-		if ok, class := fn(ext); ok {
-			procCnt++
-			if err = processFile(path, class, nil, os.Stdout); err != nil {
-				report(err)
-			}
-		}
-	}
-	return err
-}
-
-func main() {
-	flag.Usage = usage
-	flag.Parse()
-
-	args := flag.Args()
-	if len(args) == 0 {
-		if *write {
-			report(fmt.Errorf("error: cannot use -w with standard input"))
-			return
-		}
-		if err := processFile("<standard input>", false, os.Stdin, os.Stdout); err != nil {
-			report(err)
-		}
-		return
-	}
-	walker := newWalker()
-	for _, path := range args {
-		walkSubDir = strings.HasSuffix(path, "/...")
-		if walkSubDir {
-			path = path[:len(path)-4]
-		}
-		procCnt = 0
-		rootDir = path
-		filepath.WalkDir(path, walker.walk)
-		if procCnt == 0 {
-			fmt.Println("no XGo files in", path)
-		}
-	}
-}
-
-// -----------------------------------------------------------------------------
diff --git a/cmd/chore/gopbuiltingen/builtin.gox b/cmd/chore/xgobuiltingen/builtin.gox
similarity index 100%
rename from cmd/chore/gopbuiltingen/builtin.gox
rename to cmd/chore/xgobuiltingen/builtin.gox
diff --git a/cmd/chore/gopbuiltingen/builtingen.gox b/cmd/chore/xgobuiltingen/builtingen.gox
similarity index 95%
rename from cmd/chore/gopbuiltingen/builtingen.gox
rename to cmd/chore/xgobuiltingen/builtingen.gox
index dacb7a65..4199160d 100644
--- a/cmd/chore/gopbuiltingen/builtingen.gox
+++ b/cmd/chore/xgobuiltingen/builtingen.gox
@@ -4,9 +4,9 @@ import (
 	"go/format"
 	"go/parser"
 	"go/token"
-	gopast "gop/ast"
-	"gop/ast/gopq"
-	"gop/parser"
+	xgoast "xgo/ast"
+	"xgo/ast/gopq"
+	"xgo/parser"
 	"os"
 )
 
@@ -27,7 +27,7 @@ func gen() []byte {
 	f.Decls <- &ast.GenDecl{
 		Tok: token.IMPORT,
 		Specs: []ast.Spec{
-			importSpec("github.com/qiniu/x/gop/osx"),
+			importSpec("github.com/qiniu/x/xgo/osx"),
 			importSpec("io"),
 			importSpec("os"),
 			importSpec("reflect"),
@@ -51,7 +51,7 @@ func genDecls(f *ast.File) {
 	}
 }
 
-func initBuiltinTIs(fn gopq.NodeSet, f *gopast.File) (tistr *builtinTI) {
+func initBuiltinTIs(fn gopq.NodeSet, f *xgoast.File) (tistr *builtinTI) {
 	ti := fn.body.any.assignStmt.rhs(0).x.compositeLit("BuiltinTI")
 	methods := ti.elt("methods").cache
 	for method in methods {
diff --git a/cmd/chore/gopbuiltingen/helper.xgo b/cmd/chore/xgobuiltingen/helper.xgo
similarity index 100%
rename from cmd/chore/gopbuiltingen/helper.xgo
rename to cmd/chore/xgobuiltingen/helper.xgo
diff --git a/cmd/chore/gopbuiltingen/reference.gox b/cmd/chore/xgobuiltingen/reference.gox
similarity index 98%
rename from cmd/chore/gopbuiltingen/reference.gox
rename to cmd/chore/xgobuiltingen/reference.gox
index cb12fb36..d73a08be 100644
--- a/cmd/chore/gopbuiltingen/reference.gox
+++ b/cmd/chore/xgobuiltingen/reference.gox
@@ -2,7 +2,7 @@ import (
 	"go/ast"
 	"go/parser"
 	"go/token"
-	"gop/env"
+	"xgo/env"
 	"runtime"
 )
 
@@ -48,7 +48,7 @@ func .toMethodType(t *ast.FuncType, ex *exargs, at string) (mt *ast.FuncType, re
 var (
 	fset    = token.newFileSet
 	pkgs    = map[string]*ast.Package{}
-	root    = env.GOPROOT()
+	root    = env.XGOROOT()
 	goroot  = runtime.GOROOT()
 	pkgDirs = {
 		"":        "${goroot}/src/builtin",
diff --git a/cmd/chore/gopfullspec/fullspec.xgo b/cmd/chore/xgofullspec/fullspec.xgo
similarity index 100%
rename from cmd/chore/gopfullspec/fullspec.xgo
rename to cmd/chore/xgofullspec/fullspec.xgo
diff --git a/cmd/chore/gopminispec/minispec.xgo b/cmd/chore/xgominispec/minispec.xgo
similarity index 100%
rename from cmd/chore/gopminispec/minispec.xgo
rename to cmd/chore/xgominispec/minispec.xgo
diff --git a/cmd/gop/main.go b/cmd/gop/main.go
index 6f5f8066..cc45ea1d 100644
--- a/cmd/gop/main.go
+++ b/cmd/gop/main.go
@@ -25,23 +25,23 @@ import (
 	"github.com/qiniu/x/log"
 
 	"github.com/goplus/gogen"
-	"github.com/goplus/gop/cmd/internal/base"
-	"github.com/goplus/gop/cmd/internal/bug"
-	"github.com/goplus/gop/cmd/internal/build"
-	"github.com/goplus/gop/cmd/internal/clean"
-	"github.com/goplus/gop/cmd/internal/doc"
-	"github.com/goplus/gop/cmd/internal/env"
-	"github.com/goplus/gop/cmd/internal/gengo"
-	"github.com/goplus/gop/cmd/internal/gopfmt"
-	"github.com/goplus/gop/cmd/internal/gopget"
-	"github.com/goplus/gop/cmd/internal/help"
-	"github.com/goplus/gop/cmd/internal/install"
-	"github.com/goplus/gop/cmd/internal/mod"
-	"github.com/goplus/gop/cmd/internal/run"
-	"github.com/goplus/gop/cmd/internal/serve"
-	"github.com/goplus/gop/cmd/internal/test"
-	"github.com/goplus/gop/cmd/internal/version"
-	"github.com/goplus/gop/cmd/internal/watch"
+	"github.com/goplus/xgo/cmd/internal/base"
+	"github.com/goplus/xgo/cmd/internal/bug"
+	"github.com/goplus/xgo/cmd/internal/build"
+	"github.com/goplus/xgo/cmd/internal/clean"
+	"github.com/goplus/xgo/cmd/internal/doc"
+	"github.com/goplus/xgo/cmd/internal/env"
+	"github.com/goplus/xgo/cmd/internal/gengo"
+	"github.com/goplus/xgo/cmd/internal/gopfmt"
+	"github.com/goplus/xgo/cmd/internal/gopget"
+	"github.com/goplus/xgo/cmd/internal/help"
+	"github.com/goplus/xgo/cmd/internal/install"
+	"github.com/goplus/xgo/cmd/internal/mod"
+	"github.com/goplus/xgo/cmd/internal/run"
+	"github.com/goplus/xgo/cmd/internal/serve"
+	"github.com/goplus/xgo/cmd/internal/test"
+	"github.com/goplus/xgo/cmd/internal/version"
+	"github.com/goplus/xgo/cmd/internal/watch"
 )
 
 func mainUsage() {
diff --git a/cmd/internal/bug/bug.go b/cmd/internal/bug/bug.go
index 473235de..08fb261d 100644
--- a/cmd/internal/bug/bug.go
+++ b/cmd/internal/bug/bug.go
@@ -30,8 +30,8 @@ import (
 
 	urlpkg "net/url"
 
-	"github.com/goplus/gop/cmd/internal/base"
-	"github.com/goplus/gop/env"
+	"github.com/goplus/xgo/cmd/internal/base"
+	"github.com/goplus/xgo/env"
 )
 
 // -----------------------------------------------------------------------------
@@ -58,7 +58,7 @@ func runCmd(_ *base.Command, args []string) {
 	buf.WriteString(bugFooter)
 
 	body := buf.String()
-	url := "https://github.com/goplus/gop/issues/new?body=" + urlpkg.QueryEscape(body)
+	url := "https://github.com/goplus/xgo/issues/new?body=" + urlpkg.QueryEscape(body)
 	if !open(url) {
 		fmt.Print("Please file a new issue at golang.org/issue/new using this template:\n\n")
 		fmt.Print(body)
diff --git a/cmd/internal/build/build.go b/cmd/internal/build/build.go
index a9bee18d..824a540c 100644
--- a/cmd/internal/build/build.go
+++ b/cmd/internal/build/build.go
@@ -25,11 +25,11 @@ import (
 	"reflect"
 
 	"github.com/goplus/gogen"
-	"github.com/goplus/gop/cl"
-	"github.com/goplus/gop/cmd/internal/base"
-	"github.com/goplus/gop/tool"
-	"github.com/goplus/gop/x/gocmd"
-	"github.com/goplus/gop/x/gopprojs"
+	"github.com/goplus/xgo/cl"
+	"github.com/goplus/xgo/cmd/internal/base"
+	"github.com/goplus/xgo/tool"
+	"github.com/goplus/xgo/x/gocmd"
+	"github.com/goplus/xgo/x/gopprojs"
 )
 
 // gop build
diff --git a/cmd/internal/clean/clean.go b/cmd/internal/clean/clean.go
index bcb106e8..1e2d4ddf 100644
--- a/cmd/internal/clean/clean.go
+++ b/cmd/internal/clean/clean.go
@@ -23,7 +23,7 @@ import (
 	"path/filepath"
 	"strings"
 
-	"github.com/goplus/gop/cmd/internal/base"
+	"github.com/goplus/xgo/cmd/internal/base"
 )
 
 const (
diff --git a/cmd/internal/deps/deps.go b/cmd/internal/deps/deps.go
index 2e838398..39f3da02 100644
--- a/cmd/internal/deps/deps.go
+++ b/cmd/internal/deps/deps.go
@@ -21,8 +21,8 @@ import (
 	"fmt"
 	"log"
 
-	"github.com/goplus/gop/cmd/internal/base"
-	"github.com/goplus/gop/x/gopmod"
+	"github.com/goplus/xgo/cmd/internal/base"
+	"github.com/goplus/xgo/x/gopmod"
 )
 
 // -----------------------------------------------------------------------------
diff --git a/cmd/internal/doc/doc.go b/cmd/internal/doc/doc.go
index 22d27265..19059aef 100644
--- a/cmd/internal/doc/doc.go
+++ b/cmd/internal/doc/doc.go
@@ -26,12 +26,12 @@ import (
 	"strings"
 
 	"github.com/goplus/gogen"
-	"github.com/goplus/gop/cl"
-	"github.com/goplus/gop/cl/outline"
-	"github.com/goplus/gop/cmd/internal/base"
-	"github.com/goplus/gop/tool"
-	"github.com/goplus/gop/x/gopenv"
-	"github.com/goplus/gop/x/gopprojs"
+	"github.com/goplus/xgo/cl"
+	"github.com/goplus/xgo/cl/outline"
+	"github.com/goplus/xgo/cmd/internal/base"
+	"github.com/goplus/xgo/tool"
+	"github.com/goplus/xgo/x/gopenv"
+	"github.com/goplus/xgo/x/gopprojs"
 )
 
 // -----------------------------------------------------------------------------
@@ -75,8 +75,8 @@ func runCmd(cmd *base.Command, args []string) {
 		cl.SetDisableRecover(true)
 	}
 
-	gopEnv := gopenv.Get()
-	conf := &tool.Config{Gop: gopEnv}
+	xgo := gopenv.Get()
+	conf := &tool.Config{XGo: xgo}
 	outlinePkg(proj, conf)
 }
 
diff --git a/cmd/internal/env/env.go b/cmd/internal/env/env.go
index 5f5d04f2..fe4689ce 100644
--- a/cmd/internal/env/env.go
+++ b/cmd/internal/env/env.go
@@ -25,11 +25,11 @@ import (
 	"os/exec"
 	"sort"
 
-	"github.com/goplus/gop/cmd/internal/base"
-	"github.com/goplus/gop/env"
-	"github.com/goplus/gop/x/gocmd"
 	"github.com/goplus/mod"
 	"github.com/goplus/mod/modcache"
+	"github.com/goplus/xgo/cmd/internal/base"
+	"github.com/goplus/xgo/env"
+	"github.com/goplus/xgo/x/gocmd"
 )
 
 // Cmd - gop env
@@ -64,22 +64,22 @@ func runCmd(_ *base.Command, args []string) {
 		log.Fatalln("run go env failed:", err)
 	}
 
-	var gopEnv map[string]any
-	if err := json.Unmarshal(stdout.Bytes(), &gopEnv); err != nil {
+	var xgoEnv map[string]any
+	if err := json.Unmarshal(stdout.Bytes(), &xgoEnv); err != nil {
 		log.Fatal("decode json of go env failed:", err)
 	}
 
-	gopEnv["BUILDDATE"] = env.BuildDate()
-	gopEnv["GOPVERSION"] = env.Version()
-	gopEnv["GOPROOT"] = env.GOPROOT()
-	gopEnv["GOP_GOCMD"] = gocmd.Name()
-	gopEnv["GOMODCACHE"] = modcache.GOMODCACHE
-	gopEnv["GOPMOD"], _ = mod.GOPMOD("")
-	gopEnv["HOME"] = env.HOME()
+	xgoEnv["BUILDDATE"] = env.BuildDate()
+	xgoEnv["XGOVERSION"] = env.Version()
+	xgoEnv["XGOROOT"] = env.XGOROOT()
+	xgoEnv["XGO_GOCMD"] = gocmd.Name()
+	xgoEnv["GOMODCACHE"] = modcache.GOMODCACHE
+	xgoEnv["GOXMOD"], _ = mod.GOXMOD("")
+	xgoEnv["HOME"] = env.HOME()
 
 	vars := flag.Args()
 
-	outputEnvVars(gopEnv, vars, *envJson)
+	outputEnvVars(xgoEnv, vars, *envJson)
 }
 
 func outputEnvVars(gopEnv map[string]any, vars []string, outputJson bool) {
diff --git a/cmd/internal/gengo/go.go b/cmd/internal/gengo/go.go
index 684f0567..cedc27d1 100644
--- a/cmd/internal/gengo/go.go
+++ b/cmd/internal/gengo/go.go
@@ -24,10 +24,10 @@ import (
 	"reflect"
 
 	"github.com/goplus/gogen"
-	"github.com/goplus/gop/cl"
-	"github.com/goplus/gop/cmd/internal/base"
-	"github.com/goplus/gop/tool"
-	"github.com/goplus/gop/x/gopprojs"
+	"github.com/goplus/xgo/cl"
+	"github.com/goplus/xgo/cmd/internal/base"
+	"github.com/goplus/xgo/tool"
+	"github.com/goplus/xgo/x/gopprojs"
 	"github.com/qiniu/x/errors"
 )
 
diff --git a/cmd/internal/gopfmt/fmt.go b/cmd/internal/gopfmt/fmt.go
index d8adc3f1..fbe133db 100644
--- a/cmd/internal/gopfmt/fmt.go
+++ b/cmd/internal/gopfmt/fmt.go
@@ -26,15 +26,15 @@ import (
 	"path/filepath"
 	"strings"
 
-	"github.com/goplus/gop/cmd/internal/base"
-	"github.com/goplus/gop/format"
-	"github.com/goplus/gop/tool"
+	"github.com/goplus/xgo/cmd/internal/base"
+	"github.com/goplus/xgo/format"
+	"github.com/goplus/xgo/tool"
 
 	goformat "go/format"
 	"go/parser"
 	"go/token"
 
-	xformat "github.com/goplus/gop/x/format"
+	xformat "github.com/goplus/xgo/x/format"
 )
 
 // Cmd - gop fmt
diff --git a/cmd/internal/gopget/get.go b/cmd/internal/gopget/get.go
index 40d83645..5ce8bd0a 100644
--- a/cmd/internal/gopget/get.go
+++ b/cmd/internal/gopget/get.go
@@ -21,11 +21,11 @@ import (
 	"log"
 	"os"
 
-	"github.com/goplus/gop/cmd/internal/base"
-	"github.com/goplus/gop/tool"
 	"github.com/goplus/mod/modcache"
 	"github.com/goplus/mod/modfetch"
 	"github.com/goplus/mod/modload"
+	"github.com/goplus/xgo/cmd/internal/base"
+	"github.com/goplus/xgo/tool"
 )
 
 // -----------------------------------------------------------------------------
diff --git a/cmd/internal/help/help.go b/cmd/internal/help/help.go
index effd114c..cd040ab5 100644
--- a/cmd/internal/help/help.go
+++ b/cmd/internal/help/help.go
@@ -28,7 +28,7 @@ import (
 	"unicode"
 	"unicode/utf8"
 
-	"github.com/goplus/gop/cmd/internal/base"
+	"github.com/goplus/xgo/cmd/internal/base"
 )
 
 // Help implements the 'help' command.
diff --git a/cmd/internal/install/install.go b/cmd/internal/install/install.go
index 24b02c13..d7170cf0 100644
--- a/cmd/internal/install/install.go
+++ b/cmd/internal/install/install.go
@@ -24,12 +24,12 @@ import (
 	"reflect"
 
 	"github.com/goplus/gogen"
-	"github.com/goplus/gop/cl"
-	"github.com/goplus/gop/cmd/internal/base"
-	"github.com/goplus/gop/tool"
-	"github.com/goplus/gop/x/gocmd"
-	"github.com/goplus/gop/x/gopprojs"
 	"github.com/goplus/mod/modfetch"
+	"github.com/goplus/xgo/cl"
+	"github.com/goplus/xgo/cmd/internal/base"
+	"github.com/goplus/xgo/tool"
+	"github.com/goplus/xgo/x/gocmd"
+	"github.com/goplus/xgo/x/gopprojs"
 )
 
 // gop install
diff --git a/cmd/internal/list/list.go b/cmd/internal/list/list.go
index d02e72fc..ef778885 100644
--- a/cmd/internal/list/list.go
+++ b/cmd/internal/list/list.go
@@ -21,8 +21,8 @@ import (
 	"fmt"
 	"log"
 
-	"github.com/goplus/gop/cmd/internal/base"
-	"github.com/goplus/gop/x/gopmod"
+	"github.com/goplus/xgo/cmd/internal/base"
+	"github.com/goplus/xgo/x/gopmod"
 )
 
 // -----------------------------------------------------------------------------
diff --git a/cmd/internal/mod/download.go b/cmd/internal/mod/download.go
index cb18e24c..9a94d006 100644
--- a/cmd/internal/mod/download.go
+++ b/cmd/internal/mod/download.go
@@ -17,8 +17,8 @@
 package mod
 
 import (
-	"github.com/goplus/gop/cmd/internal/base"
-	"github.com/goplus/gop/cmd/internal/gopget"
+	"github.com/goplus/xgo/cmd/internal/base"
+	"github.com/goplus/xgo/cmd/internal/gopget"
 )
 
 // gop mod download
diff --git a/cmd/internal/mod/init.go b/cmd/internal/mod/init.go
index cf3a683d..613fde2f 100644
--- a/cmd/internal/mod/init.go
+++ b/cmd/internal/mod/init.go
@@ -22,10 +22,10 @@ import (
 	"runtime"
 	"strings"
 
-	"github.com/goplus/gop/cmd/internal/base"
-	"github.com/goplus/gop/env"
-	"github.com/goplus/mod/gopmod"
 	"github.com/goplus/mod/modload"
+	"github.com/goplus/mod/xgomod"
+	"github.com/goplus/xgo/cmd/internal/base"
+	"github.com/goplus/xgo/env"
 )
 
 // gop mod init
@@ -89,7 +89,7 @@ func goMainVer() string {
 }
 
 func llgoLibVer() string {
-	if modGop, e1 := gopmod.LoadFrom(filepath.Join(env.GOPROOT(), "go.mod"), ""); e1 == nil {
+	if modGop, e1 := xgomod.LoadFrom(filepath.Join(env.XGOROOT(), "go.mod"), ""); e1 == nil {
 		if pkg, e2 := modGop.Lookup("github.com/goplus/lib"); e2 == nil {
 			return pkg.Real.Version
 		}
diff --git a/cmd/internal/mod/mod.go b/cmd/internal/mod/mod.go
index 0c009fc8..c5195552 100644
--- a/cmd/internal/mod/mod.go
+++ b/cmd/internal/mod/mod.go
@@ -20,7 +20,7 @@ import (
 	"log"
 	"os"
 
-	"github.com/goplus/gop/cmd/internal/base"
+	"github.com/goplus/xgo/cmd/internal/base"
 )
 
 var Cmd = &base.Command{
diff --git a/cmd/internal/mod/tidy.go b/cmd/internal/mod/tidy.go
index 9dc855d8..f626ac3e 100644
--- a/cmd/internal/mod/tidy.go
+++ b/cmd/internal/mod/tidy.go
@@ -20,9 +20,9 @@ import (
 	"fmt"
 	"os"
 
-	"github.com/goplus/gop/cmd/internal/base"
-	"github.com/goplus/gop/tool"
-	"github.com/goplus/gop/x/gopenv"
+	"github.com/goplus/xgo/cmd/internal/base"
+	"github.com/goplus/xgo/tool"
+	"github.com/goplus/xgo/x/gopenv"
 )
 
 // gop mod tidy
diff --git a/cmd/internal/run/run.go b/cmd/internal/run/run.go
index b9e4e815..9a5d9bf2 100644
--- a/cmd/internal/run/run.go
+++ b/cmd/internal/run/run.go
@@ -23,11 +23,11 @@ import (
 	"reflect"
 
 	"github.com/goplus/gogen"
-	"github.com/goplus/gop/cl"
-	"github.com/goplus/gop/cmd/internal/base"
-	"github.com/goplus/gop/tool"
-	"github.com/goplus/gop/x/gocmd"
-	"github.com/goplus/gop/x/gopprojs"
+	"github.com/goplus/xgo/cl"
+	"github.com/goplus/xgo/cmd/internal/base"
+	"github.com/goplus/xgo/tool"
+	"github.com/goplus/xgo/x/gocmd"
+	"github.com/goplus/xgo/x/gopprojs"
 	"github.com/qiniu/x/log"
 )
 
@@ -87,7 +87,7 @@ func runCmd(cmd *base.Command, args []string) {
 	defer conf.UpdateCache()
 
 	if !conf.Mod.HasModfile() { // if no go.mod, check GopDeps
-		conf.GopDeps = new(int)
+		conf.XGoDeps = new(int)
 	}
 	confCmd := conf.NewGoCmdConf()
 	confCmd.Flags = pass.Args
diff --git a/cmd/internal/serve/serve.go b/cmd/internal/serve/serve.go
index 773bc896..7d30795b 100644
--- a/cmd/internal/serve/serve.go
+++ b/cmd/internal/serve/serve.go
@@ -20,10 +20,10 @@ package serve
 import (
 	"context"
 
-	"github.com/goplus/gop/cmd/internal/base"
-	"github.com/goplus/gop/x/jsonrpc2"
-	"github.com/goplus/gop/x/jsonrpc2/stdio"
-	"github.com/goplus/gop/x/langserver"
+	"github.com/goplus/xgo/cmd/internal/base"
+	"github.com/goplus/xgo/x/jsonrpc2"
+	"github.com/goplus/xgo/x/jsonrpc2/stdio"
+	"github.com/goplus/xgo/x/langserver"
 	"github.com/qiniu/x/log"
 )
 
diff --git a/cmd/internal/version/ver.go b/cmd/internal/version/ver.go
index ca632f97..62fb1dcf 100644
--- a/cmd/internal/version/ver.go
+++ b/cmd/internal/version/ver.go
@@ -20,8 +20,8 @@ import (
 	"fmt"
 	"runtime"
 
-	"github.com/goplus/gop/cmd/internal/base"
-	"github.com/goplus/gop/env"
+	"github.com/goplus/xgo/cmd/internal/base"
+	"github.com/goplus/xgo/env"
 )
 
 // -----------------------------------------------------------------------------
diff --git a/cmd/internal/watch/watch.go b/cmd/internal/watch/watch.go
index aced9e41..41473efa 100644
--- a/cmd/internal/watch/watch.go
+++ b/cmd/internal/watch/watch.go
@@ -20,10 +20,10 @@ import (
 	"log"
 	"path/filepath"
 
-	"github.com/goplus/gop/cmd/internal/base"
-	"github.com/goplus/gop/tool"
-	"github.com/goplus/gop/x/fsnotify"
-	"github.com/goplus/gop/x/watcher"
+	"github.com/goplus/xgo/cmd/internal/base"
+	"github.com/goplus/xgo/tool"
+	"github.com/goplus/xgo/x/fsnotify"
+	"github.com/goplus/xgo/x/watcher"
 )
 
 // -----------------------------------------------------------------------------
diff --git a/cmd/make.go b/cmd/make.go
index 7934655a..835c8358 100644
--- a/cmd/make.go
+++ b/cmd/make.go
@@ -61,7 +61,7 @@ func getGopRoot() string {
 	pwd, _ := os.Getwd()
 
 	pathsToCheck := []Path{
-		{path: "cmd/gop", isDir: true},
+		{path: "cmd/xgo", isDir: true},
 		{path: "builtin", isDir: true},
 		{path: "go.mod", isDir: false},
 		{path: "go.sum", isDir: false},
@@ -81,7 +81,7 @@ var initCommandExecuteEnv = os.Environ()
 var commandExecuteEnv = initCommandExecuteEnv
 
 // Always put `gop` command as the first item, as it will be referenced by below code.
-var gopBinFiles = []string{"gop", "gopfmt"}
+var gopBinFiles = []string{"gop", "xgo"}
 
 const (
 	inWindows = (runtime.GOOS == "windows")
@@ -264,11 +264,11 @@ func getGopBuildFlags() string {
 	if gopRootFinal := os.Getenv("GOPROOT_FINAL"); gopRootFinal != "" {
 		defaultGopRoot = gopRootFinal
 	}
-	buildFlags := fmt.Sprintf("-X \"github.com/goplus/gop/env.defaultGopRoot=%s\"", defaultGopRoot)
-	buildFlags += fmt.Sprintf(" -X \"github.com/goplus/gop/env.buildDate=%s\"", getBuildDateTime())
+	buildFlags := fmt.Sprintf("-X \"github.com/goplus/xgo/env.defaultGopRoot=%s\"", defaultGopRoot)
+	buildFlags += fmt.Sprintf(" -X \"github.com/goplus/xgo/env.buildDate=%s\"", getBuildDateTime())
 
 	version := findGopVersion()
-	buildFlags += fmt.Sprintf(" -X \"github.com/goplus/gop/env.buildVersion=%s\"", version)
+	buildFlags += fmt.Sprintf(" -X \"github.com/goplus/xgo/env.buildVersion=%s\"", version)
 
 	return buildFlags
 }
diff --git a/cmd/xgo/bug_cmd.gox b/cmd/xgo/bug_cmd.gox
index ad16ab76..24496991 100644
--- a/cmd/xgo/bug_cmd.gox
+++ b/cmd/xgo/bug_cmd.gox
@@ -14,7 +14,7 @@
  */
 
 import (
-	self "github.com/goplus/gop/cmd/internal/bug"
+	self "github.com/goplus/xgo/cmd/internal/bug"
 )
 
 use "bug"
diff --git a/cmd/xgo/build_cmd.gox b/cmd/xgo/build_cmd.gox
index 9aa218a8..5684880c 100644
--- a/cmd/xgo/build_cmd.gox
+++ b/cmd/xgo/build_cmd.gox
@@ -14,7 +14,7 @@
  */
 
 import (
-	self "github.com/goplus/gop/cmd/internal/build"
+	self "github.com/goplus/xgo/cmd/internal/build"
 )
 
 use "build [flags] [packages]"
diff --git a/cmd/xgo/clean_cmd.gox b/cmd/xgo/clean_cmd.gox
index c22a2b60..14455c01 100644
--- a/cmd/xgo/clean_cmd.gox
+++ b/cmd/xgo/clean_cmd.gox
@@ -14,7 +14,7 @@
  */
 
 import (
-	self "github.com/goplus/gop/cmd/internal/clean"
+	self "github.com/goplus/xgo/cmd/internal/clean"
 )
 
 use "clean [flags] <gopSrcDir>"
diff --git a/cmd/xgo/doc_cmd.gox b/cmd/xgo/doc_cmd.gox
index 07281038..28e76dde 100644
--- a/cmd/xgo/doc_cmd.gox
+++ b/cmd/xgo/doc_cmd.gox
@@ -14,7 +14,7 @@
  */
 
 import (
-	self "github.com/goplus/gop/cmd/internal/doc"
+	self "github.com/goplus/xgo/cmd/internal/doc"
 )
 
 use "doc [flags] [pkgPath]"
diff --git a/cmd/xgo/env_cmd.gox b/cmd/xgo/env_cmd.gox
index 3ac18a4a..c73900ab 100644
--- a/cmd/xgo/env_cmd.gox
+++ b/cmd/xgo/env_cmd.gox
@@ -14,7 +14,7 @@
  */
 
 import (
-	self "github.com/goplus/gop/cmd/internal/env"
+	self "github.com/goplus/xgo/cmd/internal/env"
 )
 
 use "env [flags] [var ...]"
diff --git a/cmd/xgo/fmt_cmd.gox b/cmd/xgo/fmt_cmd.gox
index 7a871c14..4c0f0d96 100644
--- a/cmd/xgo/fmt_cmd.gox
+++ b/cmd/xgo/fmt_cmd.gox
@@ -14,7 +14,7 @@
  */
 
 import (
-	self "github.com/goplus/gop/cmd/internal/gopfmt"
+	self "github.com/goplus/xgo/cmd/internal/gopfmt"
 )
 
 use "fmt [flags] path ..."
diff --git a/cmd/xgo/get_cmd.gox b/cmd/xgo/get_cmd.gox
index 57d746fc..20ec6fc2 100644
--- a/cmd/xgo/get_cmd.gox
+++ b/cmd/xgo/get_cmd.gox
@@ -14,7 +14,7 @@
  */
 
 import (
-	self "github.com/goplus/gop/cmd/internal/gopget"
+	self "github.com/goplus/xgo/cmd/internal/gopget"
 )
 
 use "get [flags] [packages]"
diff --git a/cmd/xgo/go_cmd.gox b/cmd/xgo/go_cmd.gox
index 3400ccec..47642645 100644
--- a/cmd/xgo/go_cmd.gox
+++ b/cmd/xgo/go_cmd.gox
@@ -14,7 +14,7 @@
  */
 
 import (
-	self "github.com/goplus/gop/cmd/internal/gengo"
+	self "github.com/goplus/xgo/cmd/internal/gengo"
 )
 
 use "go [flags] [packages|files]"
diff --git a/cmd/xgo/gop_autogen.go b/cmd/xgo/gop_autogen.go
index 9c9a09f8..668ef7a8 100644
--- a/cmd/xgo/gop_autogen.go
+++ b/cmd/xgo/gop_autogen.go
@@ -6,21 +6,21 @@ import (
 	"fmt"
 	"github.com/goplus/cobra/xcmd"
 	"github.com/goplus/gogen"
-	"github.com/goplus/gop/cmd/internal/bug"
-	"github.com/goplus/gop/cmd/internal/build"
-	"github.com/goplus/gop/cmd/internal/clean"
-	"github.com/goplus/gop/cmd/internal/doc"
-	"github.com/goplus/gop/cmd/internal/env"
-	"github.com/goplus/gop/cmd/internal/gengo"
-	"github.com/goplus/gop/cmd/internal/gopfmt"
-	"github.com/goplus/gop/cmd/internal/gopget"
-	"github.com/goplus/gop/cmd/internal/install"
-	"github.com/goplus/gop/cmd/internal/mod"
-	"github.com/goplus/gop/cmd/internal/run"
-	"github.com/goplus/gop/cmd/internal/serve"
-	"github.com/goplus/gop/cmd/internal/test"
-	"github.com/goplus/gop/cmd/internal/watch"
-	env1 "github.com/goplus/gop/env"
+	"github.com/goplus/xgo/cmd/internal/bug"
+	"github.com/goplus/xgo/cmd/internal/build"
+	"github.com/goplus/xgo/cmd/internal/clean"
+	"github.com/goplus/xgo/cmd/internal/doc"
+	"github.com/goplus/xgo/cmd/internal/env"
+	"github.com/goplus/xgo/cmd/internal/gengo"
+	"github.com/goplus/xgo/cmd/internal/gopfmt"
+	"github.com/goplus/xgo/cmd/internal/gopget"
+	"github.com/goplus/xgo/cmd/internal/install"
+	"github.com/goplus/xgo/cmd/internal/mod"
+	"github.com/goplus/xgo/cmd/internal/run"
+	"github.com/goplus/xgo/cmd/internal/serve"
+	"github.com/goplus/xgo/cmd/internal/test"
+	"github.com/goplus/xgo/cmd/internal/watch"
+	env1 "github.com/goplus/xgo/env"
 	"github.com/qiniu/x/log"
 	"github.com/qiniu/x/stringutil"
 	"runtime"
diff --git a/cmd/xgo/install_cmd.gox b/cmd/xgo/install_cmd.gox
index 9a102a09..d63e2b81 100644
--- a/cmd/xgo/install_cmd.gox
+++ b/cmd/xgo/install_cmd.gox
@@ -14,7 +14,7 @@
  */
 
 import (
-	self "github.com/goplus/gop/cmd/internal/install"
+	self "github.com/goplus/xgo/cmd/internal/install"
 )
 
 use "install [flags] [packages]"
diff --git a/cmd/xgo/mod_cmd.gox b/cmd/xgo/mod_cmd.gox
index fa47e6c0..27565c39 100644
--- a/cmd/xgo/mod_cmd.gox
+++ b/cmd/xgo/mod_cmd.gox
@@ -14,7 +14,7 @@
  */
 
 import (
-	self "github.com/goplus/gop/cmd/internal/mod"
+	self "github.com/goplus/xgo/cmd/internal/mod"
 )
 
 use "mod"
diff --git a/cmd/xgo/mod_download_cmd.gox b/cmd/xgo/mod_download_cmd.gox
index 630b06b3..3b463d80 100644
--- a/cmd/xgo/mod_download_cmd.gox
+++ b/cmd/xgo/mod_download_cmd.gox
@@ -14,7 +14,7 @@
  */
 
 import (
-	self "github.com/goplus/gop/cmd/internal/mod"
+	self "github.com/goplus/xgo/cmd/internal/mod"
 )
 
 use "download [flags] [modules]"
diff --git a/cmd/xgo/mod_init_cmd.gox b/cmd/xgo/mod_init_cmd.gox
index 02a33c5a..31f9e053 100644
--- a/cmd/xgo/mod_init_cmd.gox
+++ b/cmd/xgo/mod_init_cmd.gox
@@ -14,7 +14,7 @@
  */
 
 import (
-	self "github.com/goplus/gop/cmd/internal/mod"
+	self "github.com/goplus/xgo/cmd/internal/mod"
 )
 
 use "init [flags] module-path"
diff --git a/cmd/xgo/mod_tidy_cmd.gox b/cmd/xgo/mod_tidy_cmd.gox
index ac6de631..799fcf1d 100644
--- a/cmd/xgo/mod_tidy_cmd.gox
+++ b/cmd/xgo/mod_tidy_cmd.gox
@@ -14,7 +14,7 @@
  */
 
 import (
-	self "github.com/goplus/gop/cmd/internal/mod"
+	self "github.com/goplus/xgo/cmd/internal/mod"
 )
 
 use "tidy [flags]"
diff --git a/cmd/xgo/run_cmd.gox b/cmd/xgo/run_cmd.gox
index 075e796b..4534e3f8 100644
--- a/cmd/xgo/run_cmd.gox
+++ b/cmd/xgo/run_cmd.gox
@@ -14,7 +14,7 @@
  */
 
 import (
-	self "github.com/goplus/gop/cmd/internal/run"
+	self "github.com/goplus/xgo/cmd/internal/run"
 )
 
 use "run [flags] package [arguments...]"
diff --git a/cmd/xgo/serve_cmd.gox b/cmd/xgo/serve_cmd.gox
index 9b2d251a..9393963c 100644
--- a/cmd/xgo/serve_cmd.gox
+++ b/cmd/xgo/serve_cmd.gox
@@ -14,7 +14,7 @@
  */
 
 import (
-	self "github.com/goplus/gop/cmd/internal/serve"
+	self "github.com/goplus/xgo/cmd/internal/serve"
 )
 
 use "serve [flags]"
diff --git a/cmd/xgo/watch_cmd.gox b/cmd/xgo/watch_cmd.gox
index 1b2fe3ab..4a3d7f8c 100644
--- a/cmd/xgo/watch_cmd.gox
+++ b/cmd/xgo/watch_cmd.gox
@@ -14,7 +14,7 @@
  */
 
 import (
-	self "github.com/goplus/gop/cmd/internal/watch"
+	self "github.com/goplus/xgo/cmd/internal/watch"
 )
 
 use "watch [flags] [dir]"
diff --git a/demo/gop-sample/b.xgo b/demo/gop-sample/b.xgo
deleted file mode 100644
index 9a068c0c..00000000
--- a/demo/gop-sample/b.xgo
+++ /dev/null
@@ -1,9 +0,0 @@
-package main
-
-import (
-	ab "github.com/goplus/gop/demo/gop-sample/cpkag/b"
-)
-
-a()
-Ab()
-ab.Ab()
diff --git a/demo/gop-calc/calc.xgo b/demo/xgo-calc/calc.xgo
similarity index 100%
rename from demo/gop-calc/calc.xgo
rename to demo/xgo-calc/calc.xgo
diff --git a/demo/gop-parser/parser.xgo b/demo/xgo-parser/parser.xgo
similarity index 100%
rename from demo/gop-parser/parser.xgo
rename to demo/xgo-parser/parser.xgo
diff --git a/demo/gop-sample/a.xgo b/demo/xgo-sample/a.xgo
similarity index 100%
rename from demo/gop-sample/a.xgo
rename to demo/xgo-sample/a.xgo
diff --git a/demo/xgo-sample/b.xgo b/demo/xgo-sample/b.xgo
new file mode 100644
index 00000000..1d24937e
--- /dev/null
+++ b/demo/xgo-sample/b.xgo
@@ -0,0 +1,9 @@
+package main
+
+import (
+	ab "github.com/goplus/xgo/demo/xgo-sample/cpkag/b"
+)
+
+a()
+Ab()
+ab.Ab()
diff --git a/demo/gop-sample/cpkag/b/ab.go b/demo/xgo-sample/cpkag/b/ab.go
similarity index 100%
rename from demo/gop-sample/cpkag/b/ab.go
rename to demo/xgo-sample/cpkag/b/ab.go
diff --git a/demo/gop-scanner/rpncalc/rpncalc.xgo b/demo/xgo-scanner/rpncalc/rpncalc.xgo
similarity index 100%
rename from demo/gop-scanner/rpncalc/rpncalc.xgo
rename to demo/xgo-scanner/rpncalc/rpncalc.xgo
diff --git a/demo/gop-scanner/scanner.xgo b/demo/xgo-scanner/scanner.xgo
similarity index 100%
rename from demo/gop-scanner/scanner.xgo
rename to demo/xgo-scanner/scanner.xgo
diff --git a/demo/gop-scanner/simplecalc/calc.xgo b/demo/xgo-scanner/simplecalc/calc.xgo
similarity index 100%
rename from demo/gop-scanner/simplecalc/calc.xgo
rename to demo/xgo-scanner/simplecalc/calc.xgo
diff --git a/demo/gop-typeof/typeof.xgo b/demo/xgo-typeof/typeof.xgo
similarity index 100%
rename from demo/gop-typeof/typeof.xgo
rename to demo/xgo-typeof/typeof.xgo
diff --git a/doc/contributing.md b/doc/contributing.md
index cc7d044f..3054ee23 100644
--- a/doc/contributing.md
+++ b/doc/contributing.md
@@ -4,7 +4,7 @@ Thank you for your interest in contributing to the XGo project! Your efforts
 help us build and improve this powerful language.
 
 Please be aware that participation in the XGo project requires adherence to our
-established [code of conduct](https://github.com/goplus/gop/blob/main/CODE_OF_CONDUCT.md). Your involvement signifies your agreement to comply
+established [code of conduct](https://github.com/goplus/xgo/blob/main/CODE_OF_CONDUCT.md). Your involvement signifies your agreement to comply
 with the guidelines set forth within these terms. We appreciate your cooperation
 in fostering a respectful and inclusive environment for all contributors.
 
@@ -31,7 +31,7 @@ language and tool goals, and confirms design validity before coding.
 ## Making a code contribution
 
 Let's say you want to fix a typo in the `README.md` file of the
-`https://github.com/goplus/gop.git` repository, changing "Github" to "GitHub",
+`https://github.com/goplus/xgo.git` repository, changing "Github" to "GitHub",
 and you wish to merge this contribution into the `main` branch of the upstream
 repository.
 
@@ -41,7 +41,7 @@ First, you need to fork the upstream repository to your own username (or an
 organization you own) by following [this guide](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo). Then you can start making your
 contributions.
 
-Let's say you've forked `https://github.com/goplus/gop.git` to
+Let's say you've forked `https://github.com/goplus/xgo.git` to
 `https://github.com/YOUR_USERNAME/gop.git`.
 
 ### Step 2: Clone the forked repository
diff --git a/doc/docs.md b/doc/docs.md
index f6e8d90d..446777be 100644
--- a/doc/docs.md
+++ b/doc/docs.md
@@ -54,7 +54,7 @@ $ brew install goplus
 ### from source code
 
 ```bash
-git clone https://github.com/goplus/gop.git
+git clone https://github.com/goplus/xgo.git
 cd gop
 
 # On mac/linux run:
@@ -775,7 +775,7 @@ Compared to corresponding Go code, It is clear and more readable.
 
 And the most interesting thing is, the return error contains the full error stack. When we got an error, it is very easy to position what the root cause is.
 
-How these `ErrWrap expressions` work? See [Error Handling](https://github.com/goplus/gop/wiki/Error-Handling) for more information.
+How these `ErrWrap expressions` work? See [Error Handling](https://github.com/goplus/xgo/wiki/Error-Handling) for more information.
 
 <h5 align="right"><a href="#table-of-contents">⬆ back to toc</a></h5>
 
@@ -1110,7 +1110,7 @@ By default `xgo watch` does not convert test files (normally ending with `_test.
 
 ## Calling C from XGo
 
-Here is [an example to show how XGo interacts with C](https://github.com/goplus/gop/tree/main/demo/_llgo/hellollgo).
+Here is [an example to show how XGo interacts with C](https://github.com/goplus/xgo/tree/main/demo/_llgo/hellollgo).
 
 ```go
 import "c"
diff --git a/doc/domian-text-lit.md b/doc/domian-text-lit.md
index 626ede15..7308485a 100644
--- a/doc/domian-text-lit.md
+++ b/doc/domian-text-lit.md
@@ -3,7 +3,7 @@ Domain Text Literal
 
 The journey of **Domain Text Literals** in XGo began with a proposal in early 2024 when a community member suggested adding JSX syntax support to XGo:
 
-* https://github.com/goplus/gop/issues/1770
+* https://github.com/goplus/xgo/issues/1770
 
 While JSX has gained widespread adoption in frontend development, particularly in React-based applications, the immediate benefits of building JSX syntax directly into XGo weren't immediately clear, causing the proposal to be temporarily shelved.
 
diff --git a/doc/spec/mini/mini.xgo b/doc/spec/mini/mini.xgo
index bfff6c9f..94806f5e 100644
--- a/doc/spec/mini/mini.xgo
+++ b/doc/spec/mini/mini.xgo
@@ -17,8 +17,8 @@
 package mini
 
 import (
-	"github.com/goplus/gop/token"
-	"github.com/goplus/gop/tpl"
+	"github.com/goplus/xgo/token"
+	"github.com/goplus/xgo/tpl"
 )
 
 var _off = tpl.showConflict(false)
diff --git a/env/path.go b/env/path.go
index e7c07bb4..0ae79f74 100644
--- a/env/path.go
+++ b/env/path.go
@@ -28,28 +28,28 @@ var (
 	defaultGopRoot string
 )
 
-// GOPROOT returns the root of the XGo tree. It uses the GOPROOT environment variable,
+// XGOROOT returns the root of the XGo tree. It uses the GOPROOT environment variable,
 // if set at process start, or else the root used during the XGo build.
-func GOPROOT() string {
-	gopRoot, err := findGopRoot()
+func XGOROOT() string {
+	gopRoot, err := findXgoRoot()
 	if err != nil {
-		log.Panicln("GOPROOT not found:", err)
+		log.Panicln("XGOROOT not found:", err)
 	}
 	return gopRoot
 }
 
 const (
-	envGOPROOT = "GOPROOT"
+	envXGOROOT = "XGOROOT"
 )
 
-func findGopRoot() (string, error) {
-	envGopRoot := os.Getenv(envGOPROOT)
-	if envGopRoot != "" {
-		// GOPROOT must valid
-		if isValidGopRoot(envGopRoot) {
-			return envGopRoot, nil
+func findXgoRoot() (string, error) {
+	envXgoRoot := os.Getenv(envXGOROOT)
+	if envXgoRoot != "" {
+		// XGOROOT must valid
+		if isValidXgoRoot(envXgoRoot) {
+			return envXgoRoot, nil
 		}
-		log.Panicf("\n%s (%s) is not valid\n", envGOPROOT, envGopRoot)
+		log.Panicf("\n%s (%s) is not valid\n", envXGOROOT, envXgoRoot)
 	}
 
 	// if parent directory is a valid gop root, use it
@@ -57,25 +57,21 @@ func findGopRoot() (string, error) {
 	if err == nil {
 		dir := filepath.Dir(exePath)
 		parentDir := filepath.Dir(dir)
-		if parentDir != dir && isValidGopRoot(parentDir) {
+		if parentDir != dir && isValidXgoRoot(parentDir) {
 			return parentDir, nil
 		}
 	}
 
 	// check defaultGopRoot, if it is valid, use it
-	if defaultGopRoot != "" && isValidGopRoot(defaultGopRoot) {
+	if defaultGopRoot != "" && isValidXgoRoot(defaultGopRoot) {
 		return defaultGopRoot, nil
 	}
 
-	// Compatible with old GOPROOT
+	// Compatible with old XGOROOT
 	if home := HOME(); home != "" {
-		gopRoot := filepath.Join(home, "gop")
-		if isValidGopRoot(gopRoot) {
-			return gopRoot, nil
-		}
-		goplusRoot := filepath.Join(home, "goplus")
-		if isValidGopRoot(goplusRoot) {
-			return goplusRoot, nil
+		xgoRoot := filepath.Join(home, "xgo")
+		if isValidXgoRoot(xgoRoot) {
+			return xgoRoot, nil
 		}
 	}
 	return "", syscall.ENOENT
@@ -98,8 +94,8 @@ func executableRealPath() (path string, err error) {
 }
 
 func isFileExists(path string) bool {
-	st, err := os.Stat(path)
-	return err == nil && !st.IsDir()
+	_, err := os.Stat(path)
+	return err == nil
 }
 
 func isDirExists(path string) bool {
@@ -107,6 +103,6 @@ func isDirExists(path string) bool {
 	return err == nil && st.IsDir()
 }
 
-func isValidGopRoot(path string) bool {
-	return isDirExists(filepath.Join(path, "cmd/gop")) && isFileExists(filepath.Join(path, "go.mod"))
+func isValidXgoRoot(path string) bool {
+	return isDirExists(filepath.Join(path, "cmd/xgo")) && isFileExists(filepath.Join(path, "go.mod"))
 }
diff --git a/format/format.go b/format/format.go
index 6b7999c6..6a9b609f 100644
--- a/format/format.go
+++ b/format/format.go
@@ -30,10 +30,10 @@ import (
 	"bytes"
 	"io"
 
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/parser"
-	"github.com/goplus/gop/printer"
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/parser"
+	"github.com/goplus/xgo/printer"
+	"github.com/goplus/xgo/token"
 )
 
 var config = printer.Config{Mode: printer.UseSpaces | printer.TabIndent, Tabwidth: 8}
diff --git a/format/formatutil/format_gop.go b/format/formatutil/format_gop.go
index 64557da4..afb0dcd7 100644
--- a/format/formatutil/format_gop.go
+++ b/format/formatutil/format_gop.go
@@ -17,9 +17,9 @@
 package formatutil
 
 import (
-	"github.com/goplus/gop/format"
-	"github.com/goplus/gop/scanner"
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/format"
+	"github.com/goplus/xgo/scanner"
+	"github.com/goplus/xgo/token"
 )
 
 // RearrangeFuncs rearranges functions in src.
diff --git a/format/internal.go b/format/internal.go
index 7647d119..3565d0e8 100644
--- a/format/internal.go
+++ b/format/internal.go
@@ -24,10 +24,10 @@ package format
 import (
 	"bytes"
 
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/parser"
-	"github.com/goplus/gop/printer"
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/parser"
+	"github.com/goplus/xgo/printer"
+	"github.com/goplus/xgo/token"
 )
 
 // parse parses src, which was read from the named file,
diff --git a/go.mod b/go.mod
index 699fd1f1..d3ed2837 100644
--- a/go.mod
+++ b/go.mod
@@ -1,4 +1,4 @@
-module github.com/goplus/gop
+module github.com/goplus/xgo
 
 go 1.18
 
@@ -7,8 +7,8 @@ require (
 	github.com/goplus/cobra v1.9.12 //gop:class
 	github.com/goplus/gogen v1.18.1
 	github.com/goplus/lib v0.2.0
-	github.com/goplus/mod v0.16.1
-	github.com/qiniu/x v1.14.6
+	github.com/goplus/mod v0.17.0
+	github.com/qiniu/x v1.15.0
 )
 
 require (
diff --git a/go.sum b/go.sum
index bddfe69d..4911cf8d 100644
--- a/go.sum
+++ b/go.sum
@@ -6,10 +6,10 @@ github.com/goplus/gogen v1.18.1 h1:ys18IiQwQ4QeQ3Mmk4vzql0Yfr6r+hkkQdjaL/M0Isc=
 github.com/goplus/gogen v1.18.1/go.mod h1:owX2e1EyU5WD+Nm6oH2m/GXjLdlBYcwkLO4wN8HHXZI=
 github.com/goplus/lib v0.2.0 h1:AjqkN1XK5H23wZMMlpaUYAMCDAdSBQ2NMFrLtSh7W4g=
 github.com/goplus/lib v0.2.0/go.mod h1:SgJv3oPqLLHCu0gcL46ejOP3x7/2ry2Jtxu7ta32kp0=
-github.com/goplus/mod v0.16.1 h1:2O+rKubJTn+Fighz3kckwpW87STSZ6s3m/YECfXuNhE=
-github.com/goplus/mod v0.16.1/go.mod h1:8d1P+pBavZfNQtJo4A742DgsLTtSf26BQn51owhmNqI=
-github.com/qiniu/x v1.14.6 h1:JY8jOumYFshuqNAjVkF6zsYhbcwM8A199ALkUOvJPks=
-github.com/qiniu/x v1.14.6/go.mod h1:AiovSOCaRijaf3fj+0CBOpR1457pn24b0Vdb1JpwhII=
+github.com/goplus/mod v0.17.0 h1:2rwBjNT/5a9fsZMkjBFYORxXzXldh/Oe/SAsZqCvP/I=
+github.com/goplus/mod v0.17.0/go.mod h1:5aGvHagL++m6XlBpqPfkeGqpkHl2biuWXyQcVxmpm3I=
+github.com/qiniu/x v1.15.0 h1:Tal7jtNNgBkFneJXG8qsTadVywC5zBQCfw9b12Igsr4=
+github.com/qiniu/x v1.15.0/go.mod h1:AiovSOCaRijaf3fj+0CBOpR1457pn24b0Vdb1JpwhII=
 golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0=
 golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
 golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws=
diff --git a/parser/interface.go b/parser/interface.go
index c7f2ac4d..4e73c9b4 100644
--- a/parser/interface.go
+++ b/parser/interface.go
@@ -22,9 +22,9 @@ import (
 	goparser "go/parser"
 	"go/scanner"
 
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/parser/iox"
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/parser/iox"
+	"github.com/goplus/xgo/token"
 )
 
 // A Mode value is a set of flags (or 0).
diff --git a/parser/parser.go b/parser/parser.go
index ccf95b26..f3ca3de3 100644
--- a/parser/parser.go
+++ b/parser/parser.go
@@ -33,11 +33,11 @@ import (
 	"strings"
 	"unicode"
 
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/scanner"
-	"github.com/goplus/gop/token"
-	tplast "github.com/goplus/gop/tpl/ast"
-	tpl "github.com/goplus/gop/tpl/parser"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/scanner"
+	"github.com/goplus/xgo/token"
+	tplast "github.com/goplus/xgo/tpl/ast"
+	tpl "github.com/goplus/xgo/tpl/parser"
 	"github.com/qiniu/x/log"
 )
 
diff --git a/parser/parser_gop.go b/parser/parser_gop.go
index 6de538cf..80a41ee5 100644
--- a/parser/parser_gop.go
+++ b/parser/parser_gop.go
@@ -25,10 +25,10 @@ import (
 	goast "go/ast"
 	goparser "go/parser"
 
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/parser/fsx"
-	"github.com/goplus/gop/parser/iox"
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/parser/fsx"
+	"github.com/goplus/xgo/parser/iox"
+	"github.com/goplus/xgo/token"
 )
 
 const (
diff --git a/printer/nodes.go b/printer/nodes.go
index 8608d972..af4bdf20 100644
--- a/printer/nodes.go
+++ b/printer/nodes.go
@@ -29,8 +29,8 @@ import (
 	"unicode"
 	"unicode/utf8"
 
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/token"
 )
 
 const (
diff --git a/printer/printer.go b/printer/printer.go
index c7bf72f2..284acdbc 100644
--- a/printer/printer.go
+++ b/printer/printer.go
@@ -25,8 +25,8 @@ import (
 	"text/tabwriter"
 	"unicode"
 
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/token"
 )
 
 const (
diff --git a/scanner/gop.go b/scanner/gop.go
index b09284d8..00bcd7da 100644
--- a/scanner/gop.go
+++ b/scanner/gop.go
@@ -20,7 +20,7 @@ import (
 	"go/scanner"
 	"io"
 
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/token"
 	"github.com/qiniu/x/byteutil"
 )
 
diff --git a/scanner/scanner.go b/scanner/scanner.go
index 405aefe2..1857f96f 100644
--- a/scanner/scanner.go
+++ b/scanner/scanner.go
@@ -28,7 +28,7 @@ import (
 	"unicode"
 	"unicode/utf8"
 
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/token"
 )
 
 // An ErrorHandler may be provided to Scanner.Init. If a syntax error is
diff --git a/token/types.go b/token/types.go
index e7f5f7fe..2f8e8618 100644
--- a/token/types.go
+++ b/token/types.go
@@ -19,7 +19,7 @@ package token
 import (
 	"go/token"
 
-	"github.com/goplus/gop/token/internal/tokenutil"
+	"github.com/goplus/xgo/token/internal/tokenutil"
 )
 
 // Pos is a compact encoding of a source position within a file set.
diff --git a/tool/_gendeps.go b/tool/_gendeps.go
index 69341df7..26b8e31f 100644
--- a/tool/_gendeps.go
+++ b/tool/_gendeps.go
@@ -24,11 +24,11 @@ import (
 	"path/filepath"
 	"strings"
 
-	"github.com/goplus/gop/parser"
 	"github.com/goplus/mod/gopmod"
 	"github.com/goplus/mod/modfetch"
+	"github.com/goplus/xgo/parser"
 
-	astmod "github.com/goplus/gop/ast/mod"
+	astmod "github.com/goplus/xgo/ast/mod"
 )
 
 // -----------------------------------------------------------------------------
diff --git a/tool/build_install_run.go b/tool/build_install_run.go
index a97745f1..a16c99ec 100644
--- a/tool/build_install_run.go
+++ b/tool/build_install_run.go
@@ -20,7 +20,7 @@ import (
 	"log"
 	"os"
 
-	"github.com/goplus/gop/x/gocmd"
+	"github.com/goplus/xgo/x/gocmd"
 	"github.com/qiniu/x/errors"
 )
 
@@ -131,8 +131,8 @@ func restoreDirAndMod(old string, mod os.FileMode) {
 
 // If no go.mod and used XGo, use GOPROOT as buildDir.
 func getBuildDir(conf *Config) string {
-	if conf != nil && conf.GopDeps != nil && *conf.GopDeps != 0 {
-		return conf.Gop.Root
+	if conf != nil && conf.XGoDeps != nil && *conf.XGoDeps != 0 {
+		return conf.XGo.Root
 	}
 	return ""
 }
diff --git a/tool/gengo.go b/tool/gengo.go
index c2875a5b..d7d6fe25 100644
--- a/tool/gengo.go
+++ b/tool/gengo.go
@@ -24,9 +24,9 @@ import (
 	"strings"
 	"syscall"
 
-	"github.com/goplus/mod/gopmod"
 	"github.com/goplus/mod/modcache"
 	"github.com/goplus/mod/modfetch"
+	"github.com/goplus/mod/xgomod"
 	"github.com/qiniu/x/errors"
 )
 
@@ -238,7 +238,7 @@ func GenGoPkgPathEx(workDir, pkgPath string, conf *Config, allowExtern bool, fla
 		return remotePkgPath(pkgPath, conf, false, flags)
 	}
 
-	mod, err := gopmod.Load(workDir)
+	mod, err := xgomod.Load(workDir)
 	if NotFound(err) && allowExtern {
 		return remotePkgPath(pkgPath, conf, recursively, flags)
 	} else if err != nil {
@@ -250,7 +250,7 @@ func GenGoPkgPathEx(workDir, pkgPath string, conf *Config, allowExtern bool, fla
 		return
 	}
 	localDir = pkg.Dir
-	if pkg.Type == gopmod.PkgtExtern {
+	if pkg.Type == xgomod.PkgtExtern {
 		os.Chmod(localDir, modWritable)
 		defer os.Chmod(localDir, modReadonly)
 	}
diff --git a/tool/imp.go b/tool/imp.go
index 78c6d424..88fc108e 100644
--- a/tool/imp.go
+++ b/tool/imp.go
@@ -34,9 +34,9 @@ import (
 	"github.com/goplus/gogen/packages"
 	"github.com/goplus/gogen/packages/cache"
 	"github.com/goplus/mod/env"
-	"github.com/goplus/mod/gopmod"
 	"github.com/goplus/mod/modfetch"
 	"github.com/goplus/mod/modfile"
+	"github.com/goplus/mod/xgomod"
 )
 
 // -----------------------------------------------------------------------------
@@ -44,29 +44,29 @@ import (
 // Importer represents a XGo importer.
 type Importer struct {
 	impFrom *packages.Importer
-	mod     *gopmod.Module
-	gop     *env.Gop
+	mod     *xgomod.Module
+	xgo     *env.XGo
 	fset    *token.FileSet
 
 	Flags GenFlags // can change this for loading XGo modules
 }
 
 // NewImporter creates a XGo Importer.
-func NewImporter(mod *gopmod.Module, gop *env.Gop, fset *token.FileSet) *Importer {
+func NewImporter(mod *xgomod.Module, xgo *env.XGo, fset *token.FileSet) *Importer {
 	const (
 		defaultFlags = GenFlagPrompt | GenFlagPrintError
 	)
 	if mod == nil || !mod.HasModfile() {
-		if modGop, e := gopmod.LoadFrom(filepath.Join(gop.Root, "go.mod"), ""); e == nil {
+		if modGop, e := xgomod.LoadFrom(filepath.Join(xgo.Root, "go.mod"), ""); e == nil {
 			modGop.ImportClasses()
 			mod = modGop
 		} else {
-			mod = gopmod.Default
+			mod = xgomod.Default
 		}
 	}
 	dir := mod.Root()
 	impFrom := packages.NewImporter(fset, dir)
-	ret := &Importer{mod: mod, gop: gop, impFrom: impFrom, fset: fset, Flags: defaultFlags}
+	ret := &Importer{mod: mod, xgo: xgo, impFrom: impFrom, fset: fset, Flags: defaultFlags}
 	impFrom.SetCache(cache.New(ret.PkgHash))
 	return ret
 }
@@ -108,15 +108,15 @@ func (p *Importer) Cache() *cache.Impl {
 func (p *Importer) PkgHash(pkgPath string, self bool) string {
 	if pkg, e := p.mod.Lookup(pkgPath); e == nil {
 		switch pkg.Type {
-		case gopmod.PkgtStandard:
+		case xgomod.PkgtStandard:
 			return cache.HashSkip
-		case gopmod.PkgtExtern:
+		case xgomod.PkgtExtern:
 			if pkg.Real.Version != "" {
 				return pkg.Real.String()
 			}
 			fallthrough
-		case gopmod.PkgtModule:
-			return dirHash(p.mod, p.gop, pkg.Dir, self)
+		case xgomod.PkgtModule:
+			return dirHash(p.mod, p.xgo, pkg.Dir, self)
 		}
 	}
 	if isPkgInMod(pkgPath, gopMod) || isPkgInMod(pkgPath, xMod) {
@@ -127,7 +127,7 @@ func (p *Importer) PkgHash(pkgPath string, self bool) string {
 }
 
 const (
-	gopMod = "github.com/goplus/gop"
+	gopMod = "github.com/goplus/xgo"
 	xMod   = "github.com/qiniu/x"
 )
 
@@ -135,8 +135,8 @@ const (
 func (p *Importer) Import(pkgPath string) (pkg *types.Package, err error) {
 	if strings.HasPrefix(pkgPath, gopMod) {
 		if suffix := pkgPath[len(gopMod):]; suffix == "" || suffix[0] == '/' {
-			gopRoot := p.gop.Root
-			if suffix == "/cl/internal/gop-in-go/foo" { // for test github.com/goplus/gop/cl
+			gopRoot := p.xgo.Root
+			if suffix == "/cl/internal/gop-in-go/foo" { // for test github.com/goplus/xgo/cl
 				if err = p.genGoExtern(gopRoot+suffix, false); err != nil {
 					return
 				}
@@ -145,7 +145,7 @@ func (p *Importer) Import(pkgPath string) (pkg *types.Package, err error) {
 		}
 	}
 	if isPkgInMod(pkgPath, xMod) {
-		return p.impFrom.ImportFrom(pkgPath, p.gop.Root, 0)
+		return p.impFrom.ImportFrom(pkgPath, p.xgo.Root, 0)
 	}
 	if mod := p.mod; mod.HasModfile() {
 		ret, e := mod.Lookup(pkgPath)
@@ -153,7 +153,7 @@ func (p *Importer) Import(pkgPath string) (pkg *types.Package, err error) {
 			return nil, e
 		}
 		switch ret.Type {
-		case gopmod.PkgtExtern:
+		case xgomod.PkgtExtern:
 			isExtern := ret.Real.Version != ""
 			if isExtern {
 				if _, err = modfetch.Get(ret.Real.String()); err != nil {
@@ -168,15 +168,15 @@ func (p *Importer) Import(pkgPath string) (pkg *types.Package, err error) {
 				os.WriteFile(goModfile, defaultGoMod(ret.ModPath), 0644)
 			}
 			return p.impFrom.ImportFrom(pkgPath, ret.ModDir, 0)
-		case gopmod.PkgtModule, gopmod.PkgtLocal:
+		case xgomod.PkgtModule, xgomod.PkgtLocal:
 			if pkgPath == p.mod.Path() {
 				break
 			}
 			if err = p.genGoExtern(ret.Dir, false); err != nil {
 				return
 			}
-		case gopmod.PkgtStandard:
-			return p.impFrom.ImportFrom(pkgPath, p.gop.Root, 0)
+		case xgomod.PkgtStandard:
+			return p.impFrom.ImportFrom(pkgPath, p.xgo.Root, 0)
 		}
 	}
 	return p.impFrom.Import(pkgPath)
@@ -190,7 +190,7 @@ func (p *Importer) genGoExtern(dir string, isExtern bool) (err error) {
 			defer os.Chmod(dir, modReadonly)
 		}
 		gen := false
-		err = genGoIn(dir, &Config{Gop: p.gop, Importer: p, Fset: p.fset}, false, p.Flags, &gen)
+		err = genGoIn(dir, &Config{XGo: p.xgo, Importer: p, Fset: p.fset}, false, p.Flags, &gen)
 		if err != nil {
 			return
 		}
@@ -220,11 +220,11 @@ go 1.16
 `)
 }
 
-func dirHash(mod *gopmod.Module, gop *env.Gop, dir string, self bool) string {
+func dirHash(mod *xgomod.Module, xgo *env.XGo, dir string, self bool) string {
 	h := sha256.New()
 	if self {
 		fmt.Fprintf(h, "go\t%s\n", runtime.Version())
-		fmt.Fprintf(h, "gop\t%s\n", gop.Version)
+		fmt.Fprintf(h, "xgo\t%s\n", xgo.Version)
 	}
 	if fis, err := os.ReadDir(dir); err == nil {
 		for _, fi := range fis {
@@ -243,7 +243,7 @@ func dirHash(mod *gopmod.Module, gop *env.Gop, dir string, self bool) string {
 	return base64.RawStdEncoding.EncodeToString(h.Sum(nil))
 }
 
-func canCl(mod *gopmod.Module, fname string) bool {
+func canCl(mod *xgomod.Module, fname string) bool {
 	switch path.Ext(fname) {
 	case ".go", ".xgo", ".gop", ".gox":
 		return true
diff --git a/tool/load.go b/tool/load.go
index e59372bc..59b5a4ba 100644
--- a/tool/load.go
+++ b/tool/load.go
@@ -24,25 +24,25 @@ import (
 	"strings"
 
 	"github.com/goplus/gogen"
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/cl"
-	"github.com/goplus/gop/parser"
-	"github.com/goplus/gop/token"
-	"github.com/goplus/gop/x/gocmd"
-	"github.com/goplus/gop/x/gopenv"
 	"github.com/goplus/mod/env"
-	"github.com/goplus/mod/gopmod"
+	"github.com/goplus/mod/xgomod"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/cl"
+	"github.com/goplus/xgo/parser"
+	"github.com/goplus/xgo/token"
+	"github.com/goplus/xgo/x/gocmd"
+	"github.com/goplus/xgo/x/gopenv"
 	"github.com/qiniu/x/errors"
 )
 
 var (
-	ErrNotFound      = gopmod.ErrNotFound
+	ErrNotFound      = xgomod.ErrNotFound
 	ErrIgnoreNotated = errors.New("notated error ignored")
 )
 
 // NotFound returns if cause err is ErrNotFound or not
 func NotFound(err error) bool {
-	return gopmod.IsNotFound(err)
+	return xgomod.IsNotFound(err)
 }
 
 // IgnoreNotated returns if cause err is ErrIgnoreNotated or not.
@@ -116,16 +116,16 @@ func isNotatedErr(err error, pkg *ast.Package, fset *token.FileSet) (notatedErr
 
 // Config represents a configuration for loading XGo packages.
 type Config struct {
-	Gop      *env.Gop
+	XGo      *env.XGo
 	Fset     *token.FileSet
-	Mod      *gopmod.Module
+	Mod      *xgomod.Module
 	Importer *Importer
 
 	Filter func(fs.FileInfo) bool
 
 	// If not nil, it is used for returning result of checks XGo dependencies.
 	// see https://pkg.go.dev/github.com/goplus/gogen#File.CheckGopDeps
-	GopDeps *int
+	XGoDeps *int
 
 	// CacheFile specifies the file path of the cache.
 	CacheFile string
@@ -150,14 +150,14 @@ func NewDefaultConf(dir string, flags ConfFlags, tags ...string) (conf *Config,
 	if err != nil {
 		return
 	}
-	gop := gopenv.Get()
+	xgo := gopenv.Get()
 	fset := token.NewFileSet()
-	imp := NewImporter(mod, gop, fset)
+	imp := NewImporter(mod, xgo, fset)
 	if len(tags) > 0 {
 		imp.SetTags(strings.Join(tags, ","))
 	}
 	conf = &Config{
-		Gop: gop, Fset: fset, Mod: mod, Importer: imp,
+		XGo: xgo, Fset: fset, Mod: mod, Importer: imp,
 		IgnoreNotatedError: flags&ConfFlagIgnoreNotatedError != 0,
 		DontUpdateGoMod:    flags&ConfFlagDontUpdateGoMod != 0,
 	}
@@ -178,7 +178,7 @@ func (conf *Config) NewGoCmdConf() *gocmd.Config {
 		}
 	}
 	return &gocmd.Config{
-		Gop: conf.Gop,
+		XGo: conf.XGo,
 	}
 }
 
@@ -194,18 +194,18 @@ func (conf *Config) UpdateCache(verbose ...bool) {
 }
 
 // LoadMod loads a XGo module from a specified directory.
-func LoadMod(dir string) (mod *gopmod.Module, err error) {
-	mod, err = gopmod.Load(dir)
-	if err != nil && !gopmod.IsNotFound(err) {
-		err = errors.NewWith(err, `gopmod.Load(dir, 0)`, -2, "gopmod.Load", dir, 0)
+func LoadMod(dir string) (mod *xgomod.Module, err error) {
+	mod, err = xgomod.Load(dir)
+	if err != nil && !xgomod.IsNotFound(err) {
+		err = errors.NewWith(err, `xgomod.Load(dir, 0)`, -2, "xgomod.Load", dir, 0)
 		return
 	}
 	if mod == nil {
-		mod = gopmod.Default
+		mod = xgomod.Default
 	}
 	err = mod.ImportClasses()
 	if err != nil {
-		err = errors.NewWith(err, `mod.ImportClasses()`, -2, "(*gopmod.Module).ImportClasses", mod)
+		err = errors.NewWith(err, `mod.ImportClasses()`, -2, "(*xgomod.Module).ImportClasses", mod)
 	}
 	return
 }
@@ -261,13 +261,13 @@ func LoadDir(dir string, conf *Config, genTestPkg bool, promptGenGo ...bool) (ou
 		return nil, nil, ErrNotFound
 	}
 
-	gop := conf.Gop
-	if gop == nil {
-		gop = gopenv.Get()
+	xgo := conf.XGo
+	if xgo == nil {
+		xgo = gopenv.Get()
 	}
 	imp := conf.Importer
 	if imp == nil {
-		imp = NewImporter(mod, gop, fset)
+		imp = NewImporter(mod, xgo, fset)
 	}
 
 	var pkgTest *ast.Package
@@ -309,26 +309,26 @@ func LoadDir(dir string, conf *Config, genTestPkg bool, promptGenGo ...bool) (ou
 	if genTestPkg && pkgTest != nil {
 		test, err = cl.NewPackage("", pkgTest, clConf)
 	}
-	afterLoad(mod, gop, out, test, conf)
+	afterLoad(mod, xgo, out, test, conf)
 	return
 }
 
-func afterLoad(mod *gopmod.Module, gop *env.Gop, out, test *gogen.Package, conf *Config) {
+func afterLoad(mod *xgomod.Module, xgo *env.XGo, out, test *gogen.Package, conf *Config) {
 	if mod.Path() == gopMod { // nothing to do for XGo itself
 		return
 	}
 	updateMod := !conf.DontUpdateGoMod && mod.HasModfile()
-	if updateMod || conf.GopDeps != nil {
+	if updateMod || conf.XGoDeps != nil {
 		flags := checkGopDeps(out)
-		if conf.GopDeps != nil { // for `gop run`
-			*conf.GopDeps = flags
+		if conf.XGoDeps != nil { // for `xgo run`
+			*conf.XGoDeps = flags
 		}
 		if updateMod {
 			if test != nil {
 				flags |= checkGopDeps(test)
 			}
 			if flags != 0 {
-				mod.SaveWithGopMod(gop, flags)
+				mod.SaveWithXGoMod(xgo, flags)
 			}
 		}
 	}
@@ -341,7 +341,7 @@ func checkGopDeps(pkg *gogen.Package) (flags int) {
 	return
 }
 
-func relativeBaseOf(mod *gopmod.Module) string {
+func relativeBaseOf(mod *xgomod.Module) string {
 	if mod.HasModfile() {
 		return mod.Root()
 	}
@@ -382,14 +382,14 @@ func LoadFiles(dir string, files []string, conf *Config) (out *gogen.Package, er
 		err = errors.NewWith(ErrMultiPackges, `len(pkgs) != 1`, -1, "!=", len(pkgs), 1)
 		return
 	}
-	gop := conf.Gop
-	if gop == nil {
-		gop = gopenv.Get()
+	xgo := conf.XGo
+	if xgo == nil {
+		xgo = gopenv.Get()
 	}
 	for _, pkg := range pkgs {
 		imp := conf.Importer
 		if imp == nil {
-			imp = NewImporter(mod, gop, fset)
+			imp = NewImporter(mod, xgo, fset)
 		}
 		clConf := &cl.Config{
 			Fset:         fset,
@@ -405,7 +405,7 @@ func LoadFiles(dir string, files []string, conf *Config) (out *gogen.Package, er
 		}
 		break
 	}
-	afterLoad(mod, gop, out, nil, conf)
+	afterLoad(mod, xgo, out, nil, conf)
 	return
 }
 
@@ -418,8 +418,8 @@ var (
 
 // -----------------------------------------------------------------------------
 
-// GetFileClassType get gop module file classType.
-func GetFileClassType(mod *gopmod.Module, file *ast.File, filename string) (classType string, isTest bool) {
+// GetFileClassType get xgo module file classType.
+func GetFileClassType(mod *xgomod.Module, file *ast.File, filename string) (classType string, isTest bool) {
 	return cl.GetFileClassType(file, filename, mod.LookupClass)
 }
 
diff --git a/tool/outline.go b/tool/outline.go
index c91dfc0c..cc228a85 100644
--- a/tool/outline.go
+++ b/tool/outline.go
@@ -25,10 +25,10 @@ import (
 	"path/filepath"
 	"strings"
 
-	"github.com/goplus/gop/cl/outline"
-	"github.com/goplus/gop/parser"
-	"github.com/goplus/gop/x/gopenv"
-	"github.com/goplus/mod/gopmod"
+	"github.com/goplus/mod/xgomod"
+	"github.com/goplus/xgo/cl/outline"
+	"github.com/goplus/xgo/parser"
+	"github.com/goplus/xgo/x/gopenv"
 	"github.com/qiniu/x/errors"
 )
 
@@ -81,11 +81,11 @@ func Outline(dir string, conf *Config) (out outline.Package, err error) {
 
 	imp := conf.Importer
 	if imp == nil {
-		gop := conf.Gop
-		if gop == nil {
-			gop = gopenv.Get()
+		xgo := conf.XGo
+		if xgo == nil {
+			xgo = gopenv.Get()
 		}
-		imp = NewImporter(mod, gop, fset)
+		imp = NewImporter(mod, xgo, fset)
 	}
 
 	for name, pkg := range pkgs {
@@ -141,7 +141,7 @@ func OutlinePkgPath(workDir, pkgPath string, conf *Config, allowExtern bool) (ou
 	if err != nil {
 		return
 	}
-	if pkg.Type == gopmod.PkgtExtern {
+	if pkg.Type == xgomod.PkgtExtern {
 		modFile := chmodModfile(pkg.ModDir)
 		defer os.Chmod(modFile, modReadonly)
 	}
diff --git a/tool/tidy.go b/tool/tidy.go
index 19d9d9e2..2047cbc6 100644
--- a/tool/tidy.go
+++ b/tool/tidy.go
@@ -21,12 +21,12 @@ import (
 	"os/exec"
 
 	"github.com/goplus/mod/env"
-	"github.com/goplus/mod/gopmod"
+	"github.com/goplus/mod/xgomod"
 	"github.com/qiniu/x/errors"
 )
 
-func Tidy(dir string, gop *env.Gop) (err error) {
-	modObj, err := gopmod.Load(dir)
+func Tidy(dir string, xgo *env.XGo) (err error) {
+	modObj, err := xgomod.Load(dir)
 	if err != nil {
 		return errors.NewWith(err, `gopmod.Load(dir, mod.GopModOnly)`, -2, "gopmod.Load", dir)
 	}
@@ -60,7 +60,7 @@ func Tidy(dir string, gop *env.Gop) (err error) {
 			return errors.NewWith(err, `modObj.Save()`, -2, "(*gopmod.Module).Save")
 		}
 	*/
-	conf := &Config{Gop: gop}
+	conf := &Config{XGo: xgo}
 	err = genGoDir(modRoot, conf, true, true, 0)
 	if err != nil {
 		return errors.NewWith(err, `genGoDir(modRoot, conf, true, true)`, -2, "tool.genGoDir", modRoot, conf, true, true)
diff --git a/tpl/README.md b/tpl/README.md
index 7f4e2638..2dfd794c 100644
--- a/tpl/README.md
+++ b/tpl/README.md
@@ -160,6 +160,6 @@ This calculator handles basic arithmetic operations with proper operator precede
 
 XGo TPL offers a powerful yet intuitive alternative to regular expressions for text processing. By combining grammar-based parsing with seamless XGo integration, it enables developers to create clear, maintainable text processing solutions.
 
-For more examples of TPL in action, check out the XGo demos starting with `tpl-` at [https://github.com/goplus/gop/tree/main/demo](https://github.com/goplus/gop/tree/main/demo). These examples showcase how to implement calculators, parse text to generate ASTs, and even implement entire languages in just a few hundred lines of code.
+For more examples of TPL in action, check out the XGo demos starting with `tpl-` at [https://github.com/goplus/xgo/tree/main/demo](https://github.com/goplus/xgo/tree/main/demo). These examples showcase how to implement calculators, parse text to generate ASTs, and even implement entire languages in just a few hundred lines of code.
 
 Whether you're parsing structured text, building domain-specific languages, or implementing complex text transformations, XGo TPL provides a robust and readable approach that surpasses traditional regular expressions.
diff --git a/tpl/ast/ast.go b/tpl/ast/ast.go
index 749f2e59..6f38edbf 100644
--- a/tpl/ast/ast.go
+++ b/tpl/ast/ast.go
@@ -17,7 +17,7 @@
 package ast
 
 import (
-	"github.com/goplus/gop/tpl/token"
+	"github.com/goplus/xgo/tpl/token"
 )
 
 // -----------------------------------------------------------------------------
diff --git a/tpl/cl/compile.go b/tpl/cl/compile.go
index bcf682a1..0fc5a1c9 100644
--- a/tpl/cl/compile.go
+++ b/tpl/cl/compile.go
@@ -21,9 +21,9 @@ import (
 	"os"
 	"strconv"
 
-	"github.com/goplus/gop/tpl/ast"
-	"github.com/goplus/gop/tpl/matcher"
-	"github.com/goplus/gop/tpl/token"
+	"github.com/goplus/xgo/tpl/ast"
+	"github.com/goplus/xgo/tpl/matcher"
+	"github.com/goplus/xgo/tpl/token"
 	"github.com/qiniu/x/errors"
 )
 
diff --git a/tpl/matcher/match.go b/tpl/matcher/match.go
index f117e210..423b0e16 100644
--- a/tpl/matcher/match.go
+++ b/tpl/matcher/match.go
@@ -21,8 +21,8 @@ import (
 	"fmt"
 	"log"
 
-	"github.com/goplus/gop/tpl/token"
-	"github.com/goplus/gop/tpl/types"
+	"github.com/goplus/xgo/tpl/token"
+	"github.com/goplus/xgo/tpl/types"
 )
 
 var (
diff --git a/tpl/parser/parser.go b/tpl/parser/parser.go
index 0e79b378..7db52167 100644
--- a/tpl/parser/parser.go
+++ b/tpl/parser/parser.go
@@ -17,10 +17,10 @@
 package parser
 
 import (
-	"github.com/goplus/gop/parser/iox"
-	"github.com/goplus/gop/tpl/ast"
-	"github.com/goplus/gop/tpl/scanner"
-	"github.com/goplus/gop/tpl/token"
+	"github.com/goplus/xgo/parser/iox"
+	"github.com/goplus/xgo/tpl/ast"
+	"github.com/goplus/xgo/tpl/scanner"
+	"github.com/goplus/xgo/tpl/token"
 )
 
 // -----------------------------------------------------------------------------
diff --git a/tpl/scanner/scanner.go b/tpl/scanner/scanner.go
index 0e6d3f44..e532fb23 100644
--- a/tpl/scanner/scanner.go
+++ b/tpl/scanner/scanner.go
@@ -24,8 +24,8 @@ import (
 	"unicode"
 	"unicode/utf8"
 
-	"github.com/goplus/gop/tpl/token"
-	"github.com/goplus/gop/tpl/types"
+	"github.com/goplus/xgo/tpl/token"
+	"github.com/goplus/xgo/tpl/types"
 )
 
 // An ErrorHandler may be provided to Scanner.Init. If a syntax error is
diff --git a/tpl/tpl.go b/tpl/tpl.go
index ab267c3e..c63615eb 100644
--- a/tpl/tpl.go
+++ b/tpl/tpl.go
@@ -22,14 +22,14 @@ import (
 	"os"
 	"reflect"
 
-	"github.com/goplus/gop/parser/iox"
-	"github.com/goplus/gop/tpl/ast"
-	"github.com/goplus/gop/tpl/cl"
-	"github.com/goplus/gop/tpl/matcher"
-	"github.com/goplus/gop/tpl/parser"
-	"github.com/goplus/gop/tpl/scanner"
-	"github.com/goplus/gop/tpl/token"
-	"github.com/goplus/gop/tpl/types"
+	"github.com/goplus/xgo/parser/iox"
+	"github.com/goplus/xgo/tpl/ast"
+	"github.com/goplus/xgo/tpl/cl"
+	"github.com/goplus/xgo/tpl/matcher"
+	"github.com/goplus/xgo/tpl/parser"
+	"github.com/goplus/xgo/tpl/scanner"
+	"github.com/goplus/xgo/tpl/token"
+	"github.com/goplus/xgo/tpl/types"
 	"github.com/qiniu/x/errors"
 )
 
diff --git a/tpl/types/types.go b/tpl/types/types.go
index 18007f7b..55eab7f5 100644
--- a/tpl/types/types.go
+++ b/tpl/types/types.go
@@ -17,7 +17,7 @@
 package types
 
 import (
-	"github.com/goplus/gop/tpl/token"
+	"github.com/goplus/xgo/tpl/token"
 )
 
 // A Token is a lexical unit returned by Scan.
diff --git a/tpl/variant/builtin/builtin.go b/tpl/variant/builtin/builtin.go
index c402b9de..fedc1002 100644
--- a/tpl/variant/builtin/builtin.go
+++ b/tpl/variant/builtin/builtin.go
@@ -19,7 +19,7 @@ package buitin
 import (
 	"reflect"
 
-	"github.com/goplus/gop/tpl/variant"
+	"github.com/goplus/xgo/tpl/variant"
 )
 
 // -----------------------------------------------------------------------------
diff --git a/tpl/variant/delay/delay.go b/tpl/variant/delay/delay.go
index 7b438fba..1fe4347d 100644
--- a/tpl/variant/delay/delay.go
+++ b/tpl/variant/delay/delay.go
@@ -17,8 +17,8 @@
 package delay
 
 import (
-	"github.com/goplus/gop/tpl/token"
-	"github.com/goplus/gop/tpl/variant"
+	"github.com/goplus/xgo/tpl/token"
+	"github.com/goplus/xgo/tpl/variant"
 )
 
 // -----------------------------------------------------------------------------
diff --git a/tpl/variant/math/math.go b/tpl/variant/math/math.go
index 5c9b6ba8..a81d6941 100644
--- a/tpl/variant/math/math.go
+++ b/tpl/variant/math/math.go
@@ -19,8 +19,8 @@ package math
 import (
 	"math"
 
-	"github.com/goplus/gop/tpl/token"
-	"github.com/goplus/gop/tpl/variant"
+	"github.com/goplus/xgo/tpl/token"
+	"github.com/goplus/xgo/tpl/variant"
 )
 
 // -----------------------------------------------------------------------------
diff --git a/tpl/variant/module.go b/tpl/variant/module.go
index a7a11dfe..aae03c57 100644
--- a/tpl/variant/module.go
+++ b/tpl/variant/module.go
@@ -17,7 +17,7 @@
 package variant
 
 import (
-	"github.com/goplus/gop/tpl"
+	"github.com/goplus/xgo/tpl"
 )
 
 // -----------------------------------------------------------------------------
diff --git a/tpl/variant/time/time.go b/tpl/variant/time/time.go
index bb6d1dab..bef88a1e 100644
--- a/tpl/variant/time/time.go
+++ b/tpl/variant/time/time.go
@@ -19,7 +19,7 @@ package time
 import (
 	"time"
 
-	"github.com/goplus/gop/tpl/variant"
+	"github.com/goplus/xgo/tpl/variant"
 )
 
 // -----------------------------------------------------------------------------
diff --git a/tpl/variant/variant.go b/tpl/variant/variant.go
index 59fa12fc..afe4a64e 100644
--- a/tpl/variant/variant.go
+++ b/tpl/variant/variant.go
@@ -17,7 +17,7 @@
 package variant
 
 import (
-	"github.com/goplus/gop/tpl/token"
+	"github.com/goplus/xgo/tpl/token"
 )
 
 // -----------------------------------------------------------------------------
diff --git a/x/build/build.go b/x/build/build.go
index 628e566a..299b9e90 100644
--- a/x/build/build.go
+++ b/x/build/build.go
@@ -25,12 +25,12 @@ import (
 
 	"github.com/goplus/gogen"
 	"github.com/goplus/gogen/packages"
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/cl"
-	"github.com/goplus/gop/parser"
-	"github.com/goplus/gop/parser/fsx/memfs"
-	"github.com/goplus/gop/token"
 	"github.com/goplus/mod/modfile"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/cl"
+	"github.com/goplus/xgo/parser"
+	"github.com/goplus/xgo/parser/fsx/memfs"
+	"github.com/goplus/xgo/token"
 )
 
 type Class = cl.Class
diff --git a/x/format/format.go b/x/format/format.go
index b04993ce..8f67a6d2 100644
--- a/x/format/format.go
+++ b/x/format/format.go
@@ -17,8 +17,8 @@
 package format
 
 import (
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/token"
 )
 
 // -----------------------------------------------------------------------------
diff --git a/x/format/gopstyle.go b/x/format/gopstyle.go
index 99baf533..b8733950 100644
--- a/x/format/gopstyle.go
+++ b/x/format/gopstyle.go
@@ -22,10 +22,10 @@ import (
 	"path"
 	"strconv"
 
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/format"
-	"github.com/goplus/gop/parser"
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/format"
+	"github.com/goplus/xgo/parser"
+	"github.com/goplus/xgo/token"
 )
 
 // -----------------------------------------------------------------------------
diff --git a/x/format/stmt_expr_or_type.go b/x/format/stmt_expr_or_type.go
index 5beacaba..eccebacf 100644
--- a/x/format/stmt_expr_or_type.go
+++ b/x/format/stmt_expr_or_type.go
@@ -21,7 +21,7 @@ import (
 	"log"
 	"reflect"
 
-	"github.com/goplus/gop/ast"
+	"github.com/goplus/xgo/ast"
 )
 
 // -----------------------------------------------------------------------------
diff --git a/x/gocmd/gocmd.go b/x/gocmd/gocmd.go
index ad028492..33f32ded 100644
--- a/x/gocmd/gocmd.go
+++ b/x/gocmd/gocmd.go
@@ -21,14 +21,14 @@ import (
 	"os"
 	"os/exec"
 
-	"github.com/goplus/gop/x/gopenv"
 	"github.com/goplus/mod/env"
+	"github.com/goplus/xgo/x/gopenv"
 )
 
-type GopEnv = env.Gop
+type XGoEnv = env.XGo
 
 type Config struct {
-	Gop   *GopEnv
+	XGo   *XGoEnv
 	GoCmd string
 	Flags []string
 	Run   func(cmd *exec.Cmd) error
@@ -46,7 +46,7 @@ func doWithArgs(dir, op string, conf *Config, args ...string) (err error) {
 	}
 	exargs := make([]string, 1, 16)
 	exargs[0] = op
-	exargs = appendLdflags(exargs, conf.Gop)
+	exargs = appendLdflags(exargs, conf.XGo)
 	exargs = append(exargs, conf.Flags...)
 	exargs = append(exargs, args...)
 	cmd := exec.Command(goCmd, exargs...)
@@ -68,20 +68,20 @@ func runCmd(cmd *exec.Cmd) (err error) {
 // -----------------------------------------------------------------------------
 
 const (
-	ldFlagVersion   = "-X \"github.com/goplus/gop/env.buildVersion=%s\""
-	ldFlagBuildDate = "-X \"github.com/goplus/gop/env.buildDate=%s\""
-	ldFlagGopRoot   = "-X \"github.com/goplus/gop/env.defaultGopRoot=%s\""
+	ldFlagVersion   = "-X \"github.com/goplus/xgo/env.buildVersion=%s\""
+	ldFlagBuildDate = "-X \"github.com/goplus/xgo/env.buildDate=%s\""
+	ldFlagGopRoot   = "-X \"github.com/goplus/xgo/env.defaultGopRoot=%s\""
 )
 
 const (
 	ldFlagAll = ldFlagVersion + " " + ldFlagBuildDate + " " + ldFlagGopRoot
 )
 
-func loadFlags(env *GopEnv) string {
+func loadFlags(env *XGoEnv) string {
 	return fmt.Sprintf(ldFlagAll, env.Version, env.BuildDate, env.Root)
 }
 
-func appendLdflags(exargs []string, env *GopEnv) []string {
+func appendLdflags(exargs []string, env *XGoEnv) []string {
 	if env == nil {
 		env = gopenv.Get()
 	}
diff --git a/x/gopenv/env.go b/x/gopenv/env.go
index afdd9af4..73d7d6bf 100644
--- a/x/gopenv/env.go
+++ b/x/gopenv/env.go
@@ -17,14 +17,14 @@
 package gopenv
 
 import (
-	"github.com/goplus/gop/env"
 	modenv "github.com/goplus/mod/env"
+	"github.com/goplus/xgo/env"
 )
 
-func Get() *modenv.Gop {
-	return &modenv.Gop{
+func Get() *modenv.XGo {
+	return &modenv.XGo{
 		Version:   env.Version(),
 		BuildDate: env.BuildDate(),
-		Root:      env.GOPROOT(),
+		Root:      env.XGOROOT(),
 	}
 }
diff --git a/x/jsonrpc2/stdio/server.go b/x/jsonrpc2/stdio/server.go
index 15507a23..0dc09488 100644
--- a/x/jsonrpc2/stdio/server.go
+++ b/x/jsonrpc2/stdio/server.go
@@ -22,9 +22,9 @@ import (
 	"os"
 	"sync/atomic"
 
-	"github.com/goplus/gop/x/fakenet"
-	"github.com/goplus/gop/x/jsonrpc2"
-	"github.com/goplus/gop/x/jsonrpc2/jsonrpc2test"
+	"github.com/goplus/xgo/x/fakenet"
+	"github.com/goplus/xgo/x/jsonrpc2"
+	"github.com/goplus/xgo/x/jsonrpc2/jsonrpc2test"
 )
 
 // -----------------------------------------------------------------------------
diff --git a/x/jsonrpc2/stdio/stdio.go b/x/jsonrpc2/stdio/stdio.go
index bf15cca3..64195e5e 100644
--- a/x/jsonrpc2/stdio/stdio.go
+++ b/x/jsonrpc2/stdio/stdio.go
@@ -22,8 +22,8 @@ import (
 	"io"
 	"sync/atomic"
 
-	"github.com/goplus/gop/x/fakenet"
-	"github.com/goplus/gop/x/jsonrpc2"
+	"github.com/goplus/xgo/x/fakenet"
+	"github.com/goplus/xgo/x/jsonrpc2"
 )
 
 var (
diff --git a/x/langserver/client.go b/x/langserver/client.go
index faa9f7c7..071beebd 100644
--- a/x/langserver/client.go
+++ b/x/langserver/client.go
@@ -19,7 +19,7 @@ package langserver
 import (
 	"context"
 
-	"github.com/goplus/gop/x/jsonrpc2"
+	"github.com/goplus/xgo/x/jsonrpc2"
 )
 
 // -----------------------------------------------------------------------------
diff --git a/x/langserver/serve_dial.go b/x/langserver/serve_dial.go
index 97d8c2e2..f831ea98 100644
--- a/x/langserver/serve_dial.go
+++ b/x/langserver/serve_dial.go
@@ -27,7 +27,7 @@ import (
 	"strings"
 	"time"
 
-	"github.com/goplus/gop/x/jsonrpc2/stdio"
+	"github.com/goplus/xgo/x/jsonrpc2/stdio"
 )
 
 func fatal(err error) {
diff --git a/x/langserver/server.go b/x/langserver/server.go
index e49cd4a0..4cd5878f 100644
--- a/x/langserver/server.go
+++ b/x/langserver/server.go
@@ -23,9 +23,9 @@ import (
 	"sync"
 	"time"
 
-	"github.com/goplus/gop/tool"
-	"github.com/goplus/gop/x/gopprojs"
-	"github.com/goplus/gop/x/jsonrpc2"
+	"github.com/goplus/xgo/tool"
+	"github.com/goplus/xgo/x/gopprojs"
+	"github.com/goplus/xgo/x/jsonrpc2"
 )
 
 // -----------------------------------------------------------------------------
diff --git a/x/typesutil/api.go b/x/typesutil/api.go
index 816d770b..577ae93a 100644
--- a/x/typesutil/api.go
+++ b/x/typesutil/api.go
@@ -19,8 +19,8 @@ package typesutil
 import (
 	"go/types"
 
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/token"
 )
 
 // A CheckConfig specifies the configuration for type checking.
diff --git a/x/typesutil/check.go b/x/typesutil/check.go
index 04196441..adba70a5 100644
--- a/x/typesutil/check.go
+++ b/x/typesutil/check.go
@@ -23,11 +23,11 @@ import (
 	"strings"
 
 	"github.com/goplus/gogen"
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/cl"
-	"github.com/goplus/gop/token"
-	"github.com/goplus/gop/x/typesutil/internal/typesutil"
-	"github.com/goplus/mod/gopmod"
+	"github.com/goplus/mod/xgomod"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/cl"
+	"github.com/goplus/xgo/token"
+	"github.com/goplus/xgo/x/typesutil/internal/typesutil"
 	"github.com/qiniu/x/errors"
 	"github.com/qiniu/x/log"
 )
@@ -73,7 +73,7 @@ type Config struct {
 	WorkingDir string
 
 	// Mod represents a XGo module (optional).
-	Mod *gopmod.Module
+	Mod *xgomod.Module
 
 	// If IgnoreFuncBodies is set, skip compiling function bodies (optional).
 	IgnoreFuncBodies bool
@@ -140,7 +140,7 @@ func (p *Checker) Files(goFiles []*goast.File, gopFiles []*ast.File) (err error)
 	}
 	mod := opts.Mod
 	if mod == nil {
-		mod = gopmod.Default
+		mod = xgomod.Default
 	}
 	_, err = cl.NewPackage(pkgTypes.Path(), pkg, &cl.Config{
 		Types:          pkgTypes,
diff --git a/x/typesutil/eval.go b/x/typesutil/eval.go
index 05049f35..b279a5f3 100644
--- a/x/typesutil/eval.go
+++ b/x/typesutil/eval.go
@@ -19,8 +19,8 @@ package typesutil
 import (
 	"go/types"
 
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/token"
 )
 
 // CheckExpr type checks the expression expr as if it had appeared at position
diff --git a/x/typesutil/exprstring.go b/x/typesutil/exprstring.go
index cb49cc54..7fb3bd0c 100644
--- a/x/typesutil/exprstring.go
+++ b/x/typesutil/exprstring.go
@@ -10,8 +10,8 @@ import (
 	"bytes"
 	"fmt"
 
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/x/typesutil/typeparams"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/x/typesutil/typeparams"
 )
 
 // ExprString returns the (possibly shortened) string representation for x.
diff --git a/x/typesutil/gopinfo.go b/x/typesutil/gopinfo.go
index 45d69caa..4d044d28 100644
--- a/x/typesutil/gopinfo.go
+++ b/x/typesutil/gopinfo.go
@@ -20,8 +20,8 @@ import (
 	"go/types"
 
 	"github.com/goplus/gogen"
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/cl"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/cl"
 	"github.com/qiniu/x/log"
 )
 
diff --git a/x/typesutil/typeparams/typeparams.go b/x/typesutil/typeparams/typeparams.go
index 89c7d06c..5ee0df4a 100644
--- a/x/typesutil/typeparams/typeparams.go
+++ b/x/typesutil/typeparams/typeparams.go
@@ -5,8 +5,8 @@
 package typeparams
 
 import (
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/token"
 )
 
 func PackIndexExpr(x ast.Expr, lbrack token.Pos, exprs []ast.Expr, rbrack token.Pos) ast.Expr {
diff --git a/x/watcher/changes.go b/x/watcher/changes.go
index 5c313ab3..2a7e9626 100644
--- a/x/watcher/changes.go
+++ b/x/watcher/changes.go
@@ -24,7 +24,7 @@ import (
 	"strings"
 	"sync"
 
-	"github.com/goplus/mod/gopmod"
+	"github.com/goplus/mod/xgomod"
 )
 
 // -----------------------------------------------------------------------------------------
@@ -70,9 +70,9 @@ func (p *Changes) doLookupMod(name string) *module {
 	if !ok {
 		mod = new(module)
 		mod.exts = make([]string, 0, 8)
-		m, e := gopmod.Load(p.root + name)
+		m, e := xgomod.Load(p.root + name)
 		if e == nil {
-			m.ImportClasses(func(c *gopmod.Project) {
+			m.ImportClasses(func(c *xgomod.Project) {
 				mod.exts = append(mod.exts, c.Ext)
 				for _, w := range c.Works {
 					if w.Ext != c.Ext {
diff --git a/x/watcher/watch.go b/x/watcher/watch.go
index cff7d64e..8c663121 100644
--- a/x/watcher/watch.go
+++ b/x/watcher/watch.go
@@ -18,7 +18,7 @@
 package watcher
 
 import (
-	"github.com/goplus/gop/x/fsnotify"
+	"github.com/goplus/xgo/x/fsnotify"
 )
 
 var (


Test patch:
diff --git a/ast/fromgo/gopast_test.go b/ast/fromgo/gopast_test.go
index 59fce704..1dfc80d6 100644
--- a/ast/fromgo/gopast_test.go
+++ b/ast/fromgo/gopast_test.go
@@ -23,8 +23,8 @@ import (
 	"go/token"
 	"testing"
 
-	gopast "github.com/goplus/gop/ast"
-	"github.com/goplus/gop/format"
+	gopast "github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/format"
 )
 
 func testAST(t *testing.T, from, to string) {
diff --git a/ast/goptest/gopq.go b/ast/goptest/gopq.go
index 09c8c42f..f3d6f840 100644
--- a/ast/goptest/gopq.go
+++ b/ast/goptest/gopq.go
@@ -19,12 +19,12 @@ package goptest
 import (
 	"go/token"
 
-	"github.com/goplus/gop/ast/gopq"
-	"github.com/goplus/gop/parser/fsx/memfs"
+	"github.com/goplus/xgo/ast/gopq"
+	"github.com/goplus/xgo/parser/fsx/memfs"
 )
 
 const (
-	GopPackage = "github.com/goplus/gop/ast/gopq"
+	GopPackage = "github.com/goplus/xgo/ast/gopq"
 )
 
 // -----------------------------------------------------------------------------
diff --git a/ast/togo/goast_test.go b/ast/togo/goast_test.go
index 56b5f741..269c4949 100644
--- a/ast/togo/goast_test.go
+++ b/ast/togo/goast_test.go
@@ -22,8 +22,8 @@ import (
 	"go/token"
 	"testing"
 
-	gopast "github.com/goplus/gop/ast"
-	"github.com/goplus/gop/parser"
+	gopast "github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/parser"
 )
 
 func testAST(t *testing.T, from, to string) {
diff --git a/cl/_testgop/domaintext-huh/in.xgo b/cl/_testgop/domaintext-huh/in.xgo
index ac5fc26a..945fe0fa 100644
--- a/cl/_testgop/domaintext-huh/in.xgo
+++ b/cl/_testgop/domaintext-huh/in.xgo
@@ -1,4 +1,4 @@
-import "github.com/goplus/gop/cl/internal/huh"
+import "github.com/goplus/xgo/cl/internal/huh"
 
 form := huh`> "1", 2
 <form id="test">
diff --git a/cl/_testgop/domaintext-huh/out.go b/cl/_testgop/domaintext-huh/out.go
index 579fd798..995d6c09 100644
--- a/cl/_testgop/domaintext-huh/out.go
+++ b/cl/_testgop/domaintext-huh/out.go
@@ -1,6 +1,6 @@
 package main
 
-import "github.com/goplus/gop/cl/internal/huh"
+import "github.com/goplus/xgo/cl/internal/huh"
 
 func main() {
 	form := huh.New("<form id=\"test\">\n</form>\n", "1", 2)
diff --git a/cl/_testgop/domaintext-json/out.go b/cl/_testgop/domaintext-json/out.go
index aeee0a22..0fa2a0e5 100644
--- a/cl/_testgop/domaintext-json/out.go
+++ b/cl/_testgop/domaintext-json/out.go
@@ -2,7 +2,8 @@ package main
 
 import (
 	"fmt"
-	"github.com/goplus/gop/tpl/encoding/json"
+
+	"github.com/goplus/xgo/tpl/encoding/json"
 )
 
 func main() {
diff --git a/cl/_testgop/domaintext-regexp/out.go b/cl/_testgop/domaintext-regexp/out.go
index e5d05641..f3df736e 100644
--- a/cl/_testgop/domaintext-regexp/out.go
+++ b/cl/_testgop/domaintext-regexp/out.go
@@ -2,7 +2,8 @@ package main
 
 import (
 	"fmt"
-	"github.com/goplus/gop/tpl/encoding/regexp"
+
+	"github.com/goplus/xgo/tpl/encoding/regexp"
 )
 
 func main() {
diff --git a/cl/_testgop/domaintext-tpl/out.go b/cl/_testgop/domaintext-tpl/out.go
index 503b3887..55ccba36 100644
--- a/cl/_testgop/domaintext-tpl/out.go
+++ b/cl/_testgop/domaintext-tpl/out.go
@@ -1,6 +1,6 @@
 package main
 
-import "github.com/goplus/gop/tpl"
+import "github.com/goplus/xgo/tpl"
 
 func main() {
 	cl, err := tpl.NewEx(`expr = INT % ("+" | "-")`, "cl/_testgop/domaintext-tpl/in.xgo", 1, 15)
diff --git a/cl/_testgop/domaintpl/out.go b/cl/_testgop/domaintpl/out.go
index 52f046c6..49cd2072 100644
--- a/cl/_testgop/domaintpl/out.go
+++ b/cl/_testgop/domaintpl/out.go
@@ -1,6 +1,6 @@
 package main
 
-import "github.com/goplus/gop/tpl"
+import "github.com/goplus/xgo/tpl"
 
 func main() {
 	tpl.NewEx(`
diff --git a/cl/_testgop/enumlines-rdr/out.go b/cl/_testgop/enumlines-rdr/out.go
index 2d3271a5..105560ce 100644
--- a/cl/_testgop/enumlines-rdr/out.go
+++ b/cl/_testgop/enumlines-rdr/out.go
@@ -2,8 +2,9 @@ package main
 
 import (
 	"fmt"
-	"github.com/qiniu/x/gop/osx"
 	"io"
+
+	"github.com/qiniu/x/osx"
 )
 
 var r io.Reader
diff --git a/cl/_testgop/enumlines-stdin/out.go b/cl/_testgop/enumlines-stdin/out.go
index 1583826d..52b7e44f 100644
--- a/cl/_testgop/enumlines-stdin/out.go
+++ b/cl/_testgop/enumlines-stdin/out.go
@@ -2,8 +2,9 @@ package main
 
 import (
 	"fmt"
-	"github.com/qiniu/x/gop/osx"
 	"os"
+
+	"github.com/qiniu/x/osx"
 )
 
 func main() {
diff --git a/cl/_testgop/fatal/out.go b/cl/_testgop/fatal/out.go
index f3f8ed3d..766b6870 100644
--- a/cl/_testgop/fatal/out.go
+++ b/cl/_testgop/fatal/out.go
@@ -1,7 +1,7 @@
 package main
 
 import (
-	"github.com/qiniu/x/gop/osx"
+	"github.com/qiniu/x/osx"
 	"github.com/qiniu/x/stringutil"
 	"os"
 )
diff --git a/cl/_testgop/unit/in.xgo b/cl/_testgop/unit/in.xgo
index 87d209a7..f778a466 100644
--- a/cl/_testgop/unit/in.xgo
+++ b/cl/_testgop/unit/in.xgo
@@ -1,7 +1,7 @@
 import (
     "time"
 
-    "github.com/goplus/gop/cl/internal/unit"
+    "github.com/goplus/xgo/cl/internal/unit"
 )
 
 func Wait(time.Duration) {}
diff --git a/cl/_testgop/unit/out.go b/cl/_testgop/unit/out.go
index 3dcd42d7..bd6b4176 100644
--- a/cl/_testgop/unit/out.go
+++ b/cl/_testgop/unit/out.go
@@ -1,8 +1,9 @@
 package main
 
 import (
-	"github.com/goplus/gop/cl/internal/unit"
 	"time"
+
+	"github.com/goplus/xgo/cl/internal/unit"
 )
 
 func Wait(time.Duration) {
diff --git a/cl/_testspx/basic/out.go b/cl/_testspx/basic/out.go
index f5dc0785..65794679 100644
--- a/cl/_testspx/basic/out.go
+++ b/cl/_testspx/basic/out.go
@@ -1,6 +1,6 @@
 package main
 
-import "github.com/goplus/gop/cl/internal/spx"
+import "github.com/goplus/xgo/cl/internal/spx"
 
 type Game struct {
 	*spx.MyGame
diff --git a/cl/_testspx/init/out.go b/cl/_testspx/init/out.go
index 56ae55c6..942f9873 100644
--- a/cl/_testspx/init/out.go
+++ b/cl/_testspx/init/out.go
@@ -1,6 +1,6 @@
 package main
 
-import "github.com/goplus/gop/cl/internal/spx"
+import "github.com/goplus/xgo/cl/internal/spx"
 
 type _init struct {
 	spx.Sprite
diff --git a/cl/_testspx/multiworks/out.go b/cl/_testspx/multiworks/out.go
index 6956d519..f65e3387 100644
--- a/cl/_testspx/multiworks/out.go
+++ b/cl/_testspx/multiworks/out.go
@@ -1,6 +1,6 @@
 package main
 
-import "github.com/goplus/gop/cl/internal/mcp"
+import "github.com/goplus/xgo/cl/internal/mcp"
 
 type foo struct {
 	mcp.Prompt
diff --git a/cl/_testspx/newobj/out.go b/cl/_testspx/newobj/out.go
index 877f203c..53de0d21 100644
--- a/cl/_testspx/newobj/out.go
+++ b/cl/_testspx/newobj/out.go
@@ -2,7 +2,7 @@ package main
 
 import (
 	"fmt"
-	"github.com/goplus/gop/cl/internal/spx3"
+	"github.com/goplus/xgo/cl/internal/spx3"
 )
 
 type Kai struct {
diff --git a/cl/_testspx/nogame/out.go b/cl/_testspx/nogame/out.go
index 33ff7a8e..c2da0127 100644
--- a/cl/_testspx/nogame/out.go
+++ b/cl/_testspx/nogame/out.go
@@ -1,6 +1,6 @@
 package main
 
-import "github.com/goplus/gop/cl/internal/spx"
+import "github.com/goplus/xgo/cl/internal/spx"
 
 type bar struct {
 	spx.Sprite
diff --git a/cl/_testspx/singlework/out.go b/cl/_testspx/singlework/out.go
index 158ca9db..1a12648c 100644
--- a/cl/_testspx/singlework/out.go
+++ b/cl/_testspx/singlework/out.go
@@ -2,8 +2,8 @@ package main
 
 import (
 	"fmt"
-	"github.com/goplus/gop/cl/internal/spx3"
-	"github.com/goplus/gop/cl/internal/spx3/jwt"
+	"github.com/goplus/xgo/cl/internal/spx3"
+	"github.com/goplus/xgo/cl/internal/spx3/jwt"
 )
 
 type Kai struct {
diff --git a/cl/builtin_test.go b/cl/builtin_test.go
index 427b987f..71bb9200 100644
--- a/cl/builtin_test.go
+++ b/cl/builtin_test.go
@@ -23,10 +23,10 @@ import (
 
 	"github.com/goplus/gogen"
 	"github.com/goplus/gogen/packages"
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/parser"
-	"github.com/goplus/gop/token"
 	"github.com/goplus/mod/modfile"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/parser"
+	"github.com/goplus/xgo/token"
 )
 
 var (
@@ -564,7 +564,7 @@ func lookupClass(ext string) (c *modfile.Project, ok bool) {
 		return &modfile.Project{
 			Ext: ".t2gmx", Class: "Game",
 			Works:    []*modfile.Class{{Ext: ".t2spx", Class: "Sprite"}},
-			PkgPaths: []string{"github.com/goplus/gop/cl/internal/spx2"}}, true
+			PkgPaths: []string{"github.com/goplus/xgo/cl/internal/spx2"}}, true
 	}
 	return
 }
@@ -575,7 +575,7 @@ func lookupClassErr(ext string) (c *modfile.Project, ok bool) {
 		return &modfile.Project{
 			Ext: ".t2gmx", Class: "Game",
 			Works:    []*modfile.Class{{Ext: ".t2spx", Class: "Sprite"}},
-			PkgPaths: []string{"github.com/goplus/gop/cl/internal/libc"}}, true
+			PkgPaths: []string{"github.com/goplus/xgo/cl/internal/libc"}}, true
 	}
 	return
 }
diff --git a/cl/cltest/cltest.go b/cl/cltest/cltest.go
index 3fb58e19..6ca2b60f 100644
--- a/cl/cltest/cltest.go
+++ b/cl/cltest/cltest.go
@@ -32,33 +32,33 @@ import (
 	goparser "go/parser"
 
 	"github.com/goplus/gogen"
-	"github.com/goplus/gop/cl"
-	"github.com/goplus/gop/parser"
-	"github.com/goplus/gop/parser/fsx"
-	"github.com/goplus/gop/parser/fsx/memfs"
-	"github.com/goplus/gop/scanner"
-	"github.com/goplus/gop/token"
-	"github.com/goplus/gop/tool"
 	"github.com/goplus/mod"
 	"github.com/goplus/mod/env"
-	"github.com/goplus/mod/gopmod"
 	"github.com/goplus/mod/modfile"
+	"github.com/goplus/mod/xgomod"
+	"github.com/goplus/xgo/cl"
+	"github.com/goplus/xgo/parser"
+	"github.com/goplus/xgo/parser/fsx"
+	"github.com/goplus/xgo/parser/fsx/memfs"
+	"github.com/goplus/xgo/scanner"
+	"github.com/goplus/xgo/token"
+	"github.com/goplus/xgo/tool"
 	"github.com/qiniu/x/test"
 )
 
 var (
-	GopRoot string
-	Gop     *env.Gop
+	XGoRoot string
+	XGo     *env.XGo
 	Conf    *cl.Config
 )
 
 func init() {
-	Gop = &env.Gop{Version: "1.0"}
+	XGo = &env.XGo{Version: "1.0"}
 	gogen.SetDebug(gogen.DbgFlagAll)
 	cl.SetDebug(cl.DbgFlagAll | cl.FlagNoMarkAutogen)
 	fset := token.NewFileSet()
-	imp := tool.NewImporter(nil, Gop, fset)
-	GopRoot, _, _ = mod.FindGoMod("")
+	imp := tool.NewImporter(nil, XGo, fset)
+	XGoRoot, _, _ = mod.FindGoMod("")
 	Conf = &cl.Config{
 		Fset:          fset,
 		Importer:      imp,
@@ -77,30 +77,30 @@ func LookupClass(ext string) (c *modfile.Project, ok bool) {
 		return &modfile.Project{
 			Ext: ".tgmx", Class: "*MyGame",
 			Works:    []*modfile.Class{{Ext: ".tspx", Class: "Sprite"}},
-			PkgPaths: []string{"github.com/goplus/gop/cl/internal/spx", "math"}}, true
+			PkgPaths: []string{"github.com/goplus/xgo/cl/internal/spx", "math"}}, true
 	case ".t2gmx", ".t2spx":
 		return &modfile.Project{
 			Ext: ".t2gmx", Class: "Game",
 			Works: []*modfile.Class{
 				{Ext: ".t2spx", Class: "Sprite"},
 			},
-			PkgPaths: []string{"github.com/goplus/gop/cl/internal/spx2"}}, true
+			PkgPaths: []string{"github.com/goplus/xgo/cl/internal/spx2"}}, true
 	case ".t4gmx", ".t4spx":
 		return &modfile.Project{
 			Ext: ".t4gmx", Class: "*MyGame",
 			Works:    []*modfile.Class{{Ext: ".t4spx", Class: "Sprite"}},
-			PkgPaths: []string{"github.com/goplus/gop/cl/internal/spx4", "math"}}, true
+			PkgPaths: []string{"github.com/goplus/xgo/cl/internal/spx4", "math"}}, true
 	case "_spx.gox":
 		return &modfile.Project{
 			Ext: "_spx.gox", Class: "Game",
 			Works:    []*modfile.Class{{Ext: "_spx.gox", Class: "Sprite"}},
-			PkgPaths: []string{"github.com/goplus/gop/cl/internal/spx3", "math"},
-			Import:   []*modfile.Import{{Path: "github.com/goplus/gop/cl/internal/spx3/jwt"}}}, true
+			PkgPaths: []string{"github.com/goplus/xgo/cl/internal/spx3", "math"},
+			Import:   []*modfile.Import{{Path: "github.com/goplus/xgo/cl/internal/spx3/jwt"}}}, true
 	case "_xtest.gox":
 		return &modfile.Project{
 			Ext: "_xtest.gox", Class: "App",
 			Works:    []*modfile.Class{{Ext: "_xtest.gox", Class: "Case"}},
-			PkgPaths: []string{"github.com/goplus/gop/test", "testing"}}, true
+			PkgPaths: []string{"github.com/goplus/xgo/test", "testing"}}, true
 	case "_mcp.gox", "_tool.gox", "_prompt.gox":
 		return &modfile.Project{
 			Ext: "_mcp.gox", Class: "Game",
@@ -109,7 +109,7 @@ func LookupClass(ext string) (c *modfile.Project, ok bool) {
 				{Ext: "_prompt.gox", Class: "Prompt", Proto: "PromptProto", Embedded: true},
 				{Ext: "_res.gox", Class: "Resource", Proto: "ResourceProto"},
 			},
-			PkgPaths: []string{"github.com/goplus/gop/cl/internal/mcp"}}, true
+			PkgPaths: []string{"github.com/goplus/xgo/cl/internal/mcp"}}, true
 	}
 	return
 }
@@ -161,7 +161,7 @@ func DoFS(
 		t.Fatal("ParseFSDir:", err)
 	}
 	bar := pkgs[pkgname]
-	pkg, err := cl.NewPackage("github.com/goplus/gop/cl", bar, conf)
+	pkg, err := cl.NewPackage("github.com/goplus/xgo/cl", bar, conf)
 	if err != nil {
 		t.Fatal("NewPackage:", err)
 	}
@@ -216,14 +216,14 @@ func testFrom(t *testing.T, pkgDir, sel string) {
 	conf := Conf
 	goMod := pkgDir + "/go.mod"
 	if _, err := os.Stat(goMod); err == nil {
-		if mod, err := gopmod.Load(pkgDir); err == nil {
+		if mod, err := xgomod.Load(pkgDir); err == nil {
 			confCopy := *Conf
-			confCopy.Importer = tool.NewImporter(mod, Gop, conf.Fset)
+			confCopy.Importer = tool.NewImporter(mod, XGo, conf.Fset)
 			conf = &confCopy
 		}
 	} else {
 		confCopy := *Conf
-		confCopy.RelativeBase = GopRoot
+		confCopy.RelativeBase = XGoRoot
 		conf = &confCopy
 	}
 	DoFS(t, conf, fsx.Local, pkgDir, filter, "main", b)
diff --git a/cl/cltest/error_msg.go b/cl/cltest/error_msg.go
index 70887b4e..74204ba4 100644
--- a/cl/cltest/error_msg.go
+++ b/cl/cltest/error_msg.go
@@ -20,11 +20,11 @@ import (
 	"os"
 	"testing"
 
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/cl"
-	"github.com/goplus/gop/parser"
-	"github.com/goplus/gop/parser/fsx/memfs"
-	"github.com/goplus/gop/scanner"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/cl"
+	"github.com/goplus/xgo/parser"
+	"github.com/goplus/xgo/parser/fsx/memfs"
+	"github.com/goplus/xgo/scanner"
 )
 
 func Error(t *testing.T, msg, src string) {
diff --git a/cl/cltest/recorder.go b/cl/cltest/recorder.go
index 4d6b739c..3387f7c0 100644
--- a/cl/cltest/recorder.go
+++ b/cl/cltest/recorder.go
@@ -19,7 +19,7 @@ package cltest
 import (
 	"go/types"
 
-	"github.com/goplus/gop/ast"
+	"github.com/goplus/xgo/ast"
 )
 
 type gopRecorder struct {
diff --git a/cl/cltest/spx.go b/cl/cltest/spx.go
index 7e6bc8ea..8ceaf88b 100644
--- a/cl/cltest/spx.go
+++ b/cl/cltest/spx.go
@@ -25,12 +25,12 @@ import (
 	"strings"
 	"testing"
 
-	"github.com/goplus/gop/cl"
-	"github.com/goplus/gop/parser"
-	"github.com/goplus/gop/parser/fsx"
-	"github.com/goplus/gop/parser/fsx/memfs"
-	"github.com/goplus/gop/scanner"
 	"github.com/goplus/mod/modfile"
+	"github.com/goplus/xgo/cl"
+	"github.com/goplus/xgo/parser"
+	"github.com/goplus/xgo/parser/fsx"
+	"github.com/goplus/xgo/parser/fsx/memfs"
+	"github.com/goplus/xgo/scanner"
 	"github.com/qiniu/x/test"
 )
 
diff --git a/cl/compile_gop_test.go b/cl/compile_gop_test.go
index 4fd01618..22e04097 100644
--- a/cl/compile_gop_test.go
+++ b/cl/compile_gop_test.go
@@ -419,7 +419,7 @@ func main() {
 
 func TestOverload(t *testing.T) {
 	gopClTest(t, `
-import "github.com/goplus/gop/cl/internal/overload/foo"
+import "github.com/goplus/xgo/cl/internal/overload/foo"
 
 type Mesh struct {
 }
@@ -475,7 +475,7 @@ n.onKey ["a"], nil, key => {
 n.onKey 100, 200
 `, `package main
 
-import "github.com/goplus/gop/cl/internal/overload/foo"
+import "github.com/goplus/xgo/cl/internal/overload/foo"
 
 type Mesh struct {
 }
@@ -937,7 +937,7 @@ func TestOverloadNamed(t *testing.T) {
 	if gotypesalias {
 		excepted = `package main
 
-import "github.com/goplus/gop/cl/internal/overload/bar"
+import "github.com/goplus/xgo/cl/internal/overload/bar"
 
 var a bar.Var__0[int]
 var b bar.Var__1[bar.M]
@@ -950,7 +950,7 @@ func main() {
 	} else {
 		excepted = `package main
 
-import "github.com/goplus/gop/cl/internal/overload/bar"
+import "github.com/goplus/xgo/cl/internal/overload/bar"
 
 var a bar.Var__0[int]
 var b bar.Var__1[map[string]any]
@@ -962,7 +962,7 @@ func main() {
 `
 	}
 	gopClTest(t, `
-import "github.com/goplus/gop/cl/internal/overload/bar"
+import "github.com/goplus/xgo/cl/internal/overload/bar"
 
 var a bar.Var[int]
 var b bar.Var[bar.M]
@@ -1066,7 +1066,7 @@ for line <- open("foo.txt")! {
 import (
 	"fmt"
 	"github.com/qiniu/x/errors"
-	"github.com/qiniu/x/gop/osx"
+	"github.com/qiniu/x/osx"
 	"os"
 )
 
@@ -1229,7 +1229,7 @@ func TestYaptest(t *testing.T) {
 	gopMixedClTest(t, "main", `package main
 
 import (
-	"github.com/goplus/gop/cl/internal/test"
+	"github.com/goplus/xgo/cl/internal/test"
 )
 
 type Class struct {
@@ -1241,7 +1241,7 @@ var a int
 c.match a, "b"
 `, `package main
 
-import "github.com/goplus/gop/cl/internal/test"
+import "github.com/goplus/xgo/cl/internal/test"
 
 var c Class
 var a int
diff --git a/cl/compile_spx_test.go b/cl/compile_spx_test.go
index 291c25a6..a749539b 100644
--- a/cl/compile_spx_test.go
+++ b/cl/compile_spx_test.go
@@ -19,9 +19,9 @@ package cl_test
 import (
 	"testing"
 
-	"github.com/goplus/gop/cl"
-	"github.com/goplus/gop/cl/cltest"
-	"github.com/goplus/gop/parser/fsx/memfs"
+	"github.com/goplus/xgo/cl"
+	"github.com/goplus/xgo/cl/cltest"
+	"github.com/goplus/xgo/parser/fsx/memfs"
 )
 
 func gopSpxTest(t *testing.T, gmx, spxcode, expected string) {
@@ -77,7 +77,7 @@ println "hi"
 
 	gopSpxErrorTestEx(t, `Game.t4gmx:6:2: userScore redeclared
 	Game.t4gmx:5:2 other declaration of userScore
-Kai.t4spx:1:1: cannot use  (type *Kai) as type github.com/goplus/gop/cl/internal/spx4.Sprite in argument to `, `
+Kai.t4spx:1:1: cannot use  (type *Kai) as type github.com/goplus/xgo/cl/internal/spx4.Sprite in argument to `, `
 import "bytes"
 var (
 	Kai Kai
@@ -90,7 +90,7 @@ println "hi"
 
 	gopSpxErrorTestMap(t, `Kai.t4spx:4:2: userScore redeclared
 	Kai.t4spx:3:2 other declaration of userScore
-Greem.t4spx:1:1: cannot use  (type *Greem) as type github.com/goplus/gop/cl/internal/spx4.Sprite in argument to `, map[string][]string{
+Greem.t4spx:1:1: cannot use  (type *Greem) as type github.com/goplus/xgo/cl/internal/spx4.Sprite in argument to `, map[string][]string{
 		"/foo": {"Game.t4gmx", "Kai.t4spx", "Greem.t4spx"},
 	}, map[string]string{
 		"/foo/Game.t4gmx": `println "hi"`,
@@ -131,7 +131,7 @@ func onInit() {
 
 import (
 	"fmt"
-	"github.com/goplus/gop/cl/internal/spx"
+	"github.com/goplus/xgo/cl/internal/spx"
 )
 
 const Foo = 1
@@ -170,7 +170,7 @@ echo ${PATH}, $id
 
 import (
 	"fmt"
-	"github.com/goplus/gop/cl/internal/spx"
+	"github.com/goplus/xgo/cl/internal/spx"
 )
 
 type bar struct {
@@ -202,7 +202,7 @@ echo "${PATH}"
 
 import (
 	"fmt"
-	"github.com/goplus/gop/cl/internal/spx"
+	"github.com/goplus/xgo/cl/internal/spx"
 	"strconv"
 )
 
@@ -237,7 +237,7 @@ capout => { ls }
 capout => { ls "-l" }
 `, ``, `package main
 
-import "github.com/goplus/gop/cl/internal/spx"
+import "github.com/goplus/xgo/cl/internal/spx"
 
 type bar struct {
 	spx.Sprite
@@ -287,7 +287,7 @@ func onInit() {
 `, `package main
 
 import (
-	"github.com/goplus/gop/cl/internal/spx"
+	"github.com/goplus/xgo/cl/internal/spx"
 	"math"
 )
 
@@ -348,7 +348,7 @@ func onCloned() {
 }
 `, `package main
 
-import "github.com/goplus/gop/cl/internal/spx"
+import "github.com/goplus/xgo/cl/internal/spx"
 
 type Game struct {
 	*spx.MyGame
@@ -399,7 +399,7 @@ println "Hi"
 
 import (
 	"fmt"
-	"github.com/goplus/gop/cl/internal/spx"
+	"github.com/goplus/xgo/cl/internal/spx"
 )
 
 type Kai struct {
@@ -439,7 +439,7 @@ func onMsg(msg string) {
 
 import (
 	"fmt"
-	"github.com/goplus/gop/cl/internal/spx2"
+	"github.com/goplus/xgo/cl/internal/spx2"
 )
 
 type Game struct {
@@ -475,7 +475,7 @@ func TestSpxMainEntry(t *testing.T) {
 `, `
 `, `package main
 
-import "github.com/goplus/gop/cl/internal/spx2"
+import "github.com/goplus/xgo/cl/internal/spx2"
 
 type Game struct {
 	spx2.Game
@@ -503,7 +503,7 @@ var (
 `, `
 `, `package main
 
-import "github.com/goplus/gop/cl/internal/spx2"
+import "github.com/goplus/xgo/cl/internal/spx2"
 
 type Game struct {
 	spx2.Game
@@ -543,7 +543,7 @@ func onMsg(msg string) {
 
 import (
 	"fmt"
-	"github.com/goplus/gop/cl/internal/spx2"
+	"github.com/goplus/xgo/cl/internal/spx2"
 )
 
 type Game struct {
@@ -586,7 +586,7 @@ func onMsg(msg string) {
 }
 `, `package main
 
-import "github.com/goplus/gop/cl/internal/spx"
+import "github.com/goplus/xgo/cl/internal/spx"
 
 type Game struct {
 	*spx.MyGame
@@ -652,7 +652,7 @@ func onCloned() {
 }
 `, `package main
 
-import "github.com/goplus/gop/cl/internal/spx"
+import "github.com/goplus/xgo/cl/internal/spx"
 
 type info struct {
 	x int
@@ -710,7 +710,7 @@ func onMsg(msg string) {
 }
 `, `package main
 
-import "github.com/goplus/gop/cl/internal/spx"
+import "github.com/goplus/xgo/cl/internal/spx"
 
 type Game struct {
 	*spx.MyGame
@@ -747,7 +747,7 @@ func onMsg(msg string) {
 
 import (
 	"fmt"
-	"github.com/goplus/gop/cl/internal/spx"
+	"github.com/goplus/xgo/cl/internal/spx"
 )
 
 type Game struct {
@@ -799,7 +799,7 @@ func onMsg(msg string) {
 
 import (
 	"fmt"
-	"github.com/goplus/gop/cl/internal/spx"
+	"github.com/goplus/xgo/cl/internal/spx"
 )
 
 type Game struct {
@@ -889,7 +889,7 @@ onKey2 "hello", key => {
 }
 `, `package main
 
-import "github.com/goplus/gop/cl/internal/spx"
+import "github.com/goplus/xgo/cl/internal/spx"
 
 type Mesh struct {
 }
@@ -960,7 +960,7 @@ t.run "a test", t => {
 
 import (
 	"fmt"
-	"github.com/goplus/gop/test"
+	"github.com/goplus/xgo/test"
 	"testing"
 )
 
@@ -997,7 +997,7 @@ t.log "Hi"
 `, `package main
 
 import (
-	"github.com/goplus/gop/test"
+	"github.com/goplus/xgo/test"
 	"testing"
 )
 
diff --git a/cl/compile_test.go b/cl/compile_test.go
index c8d8f237..aad1013e 100644
--- a/cl/compile_test.go
+++ b/cl/compile_test.go
@@ -22,8 +22,8 @@ import (
 	"testing"
 
 	"github.com/goplus/gogen"
-	"github.com/goplus/gop/cl"
-	"github.com/goplus/gop/cl/cltest"
+	"github.com/goplus/xgo/cl"
+	"github.com/goplus/xgo/cl/cltest"
 )
 
 const (
@@ -37,7 +37,7 @@ var (
 )
 
 func init() {
-	cltest.Gop.Root = gopRootDir
+	cltest.XGo.Root = gopRootDir
 	conf := cltest.Conf
 	gblConfLine = &cl.Config{
 		Fset:          conf.Fset,
@@ -1223,7 +1223,7 @@ type BigInt struct {
 }
 
 func TestAutoProperty(t *testing.T) {
-	gopClTest(t, `import "github.com/goplus/gop/ast/goptest"
+	gopClTest(t, `import "github.com/goplus/xgo/ast/goptest"
 
 func foo(script string) {
 	doc := goptest.New(script)!
@@ -1235,8 +1235,8 @@ func foo(script string) {
 
 import (
 	"fmt"
-	"github.com/goplus/gop/ast/gopq"
-	"github.com/goplus/gop/ast/goptest"
+	"github.com/goplus/xgo/ast/gopq"
+	"github.com/goplus/xgo/ast/goptest"
 	"github.com/qiniu/x/errors"
 )
 
@@ -1269,8 +1269,8 @@ func foo(script string) {
 
 import (
 	"fmt"
-	"github.com/goplus/gop/ast/gopq"
-	"github.com/goplus/gop/ast/goptest"
+	"github.com/goplus/xgo/ast/gopq"
+	"github.com/goplus/xgo/ast/goptest"
 	"github.com/qiniu/x/errors"
 )
 
@@ -1471,7 +1471,7 @@ var x, y uint128
 var z uint128 = x + y
 `, `package main
 
-import "github.com/qiniu/x/gop/ng"
+import "github.com/qiniu/x/xgo/ng"
 
 var x, y ng.Uint128
 var z ng.Uint128 = (ng.Uint128).Gop_Add__1(x, y)
@@ -1484,7 +1484,7 @@ var x, y int128
 var z int128 = x + y
 `, `package main
 
-import "github.com/qiniu/x/gop/ng"
+import "github.com/qiniu/x/xgo/ng"
 
 var x, y ng.Int128
 var z ng.Int128 = (ng.Int128).Gop_Add__1(x, y)
@@ -1497,7 +1497,7 @@ var x, y bigint
 var z bigint = x + y
 `, `package main
 
-import "github.com/qiniu/x/gop/ng"
+import "github.com/qiniu/x/xgo/ng"
 
 var x, y ng.Bigint
 var z ng.Bigint = (ng.Bigint).Gop_Add(x, y)
@@ -1510,7 +1510,7 @@ var x = 1r
 `, `package main
 
 import (
-	"github.com/qiniu/x/gop/ng"
+	"github.com/qiniu/x/xgo/ng"
 	"math/big"
 )
 
@@ -1523,7 +1523,7 @@ func TestUint128Lit(t *testing.T) {
 var x uint128 = 1
 `, `package main
 
-import "github.com/qiniu/x/gop/ng"
+import "github.com/qiniu/x/xgo/ng"
 
 var x ng.Uint128 = ng.Uint128_Init__0(1)
 `)
@@ -1534,7 +1534,7 @@ func TestInt128Lit(t *testing.T) {
 var x int128 = 1
 `, `package main
 
-import "github.com/qiniu/x/gop/ng"
+import "github.com/qiniu/x/xgo/ng"
 
 var x ng.Int128 = ng.Int128_Init__0(1)
 `)
@@ -1546,7 +1546,7 @@ var x = 1/2r
 `, `package main
 
 import (
-	"github.com/qiniu/x/gop/ng"
+	"github.com/qiniu/x/xgo/ng"
 	"math/big"
 )
 
@@ -1560,7 +1560,7 @@ var x = 3 + 1/2r
 `, `package main
 
 import (
-	"github.com/qiniu/x/gop/ng"
+	"github.com/qiniu/x/xgo/ng"
 	"math/big"
 )
 
@@ -1577,7 +1577,7 @@ var z = 100 + y
 `, `package main
 
 import (
-	"github.com/qiniu/x/gop/ng"
+	"github.com/qiniu/x/xgo/ng"
 	"math/big"
 )
 
@@ -1690,7 +1690,7 @@ var x bigint
 x += 3
 `, `package main
 
-import "github.com/qiniu/x/gop/ng"
+import "github.com/qiniu/x/xgo/ng"
 
 var x ng.Bigint
 
@@ -1707,7 +1707,7 @@ x *= 2
 `, `package main
 
 import (
-	"github.com/qiniu/x/gop/ng"
+	"github.com/qiniu/x/xgo/ng"
 	"math/big"
 )
 
@@ -1725,7 +1725,7 @@ x *= 2r
 `, `package main
 
 import (
-	"github.com/qiniu/x/gop/ng"
+	"github.com/qiniu/x/xgo/ng"
 	"math/big"
 )
 
@@ -2760,7 +2760,7 @@ func TestLocalImport(t *testing.T) {
 var a = spx.TestIntValue
 `, `package main
 
-import "github.com/goplus/gop/cl/internal/spx"
+import "github.com/goplus/xgo/cl/internal/spx"
 
 var a = spx.TestIntValue
 `)
@@ -3522,7 +3522,7 @@ func TestImportGopPkg(t *testing.T) {
 	defer autogen.Unlock()
 
 	removeAutogenFiles()
-	gopClTest(t, `import "github.com/goplus/gop/cl/internal/gop-in-go/foo"
+	gopClTest(t, `import "github.com/goplus/xgo/cl/internal/gop-in-go/foo"
 
 rmap := foo.ReverseMap(map[string]int{"Hi": 1, "Hello": 2})
 println(rmap)
@@ -3530,7 +3530,7 @@ println(rmap)
 
 import (
 	"fmt"
-	"github.com/goplus/gop/cl/internal/gop-in-go/foo"
+	"github.com/goplus/xgo/cl/internal/gop-in-go/foo"
 )
 
 func main() {
diff --git a/cl/compile_testdir_test.go b/cl/compile_testdir_test.go
index 0db6391d..d44a0b52 100644
--- a/cl/compile_testdir_test.go
+++ b/cl/compile_testdir_test.go
@@ -19,7 +19,7 @@ package cl_test
 import (
 	"testing"
 
-	"github.com/goplus/gop/cl/cltest"
+	"github.com/goplus/xgo/cl/cltest"
 )
 
 func TestTestspx(t *testing.T) {
diff --git a/cl/error_msg_test.go b/cl/error_msg_test.go
index 0dff2958..22b519d7 100644
--- a/cl/error_msg_test.go
+++ b/cl/error_msg_test.go
@@ -22,7 +22,7 @@ import (
 	"runtime"
 	"testing"
 
-	"github.com/goplus/gop/cl/cltest"
+	"github.com/goplus/xgo/cl/cltest"
 )
 
 func codeErrorTest(t *testing.T, msg, src string) {
@@ -948,11 +948,11 @@ import (
 )
 `)
 
-	codeErrorTest(t, `bar.xgo:3:2: no required module provides package github.com/goplus/gop/fmt2; to add it:
-	go get github.com/goplus/gop/fmt2
+	codeErrorTest(t, `bar.xgo:3:2: no required module provides package github.com/goplus/xgo/fmt2; to add it:
+	go get github.com/goplus/xgo/fmt2
 `, `
 import (
-	"github.com/goplus/gop/fmt2"
+	"github.com/goplus/xgo/fmt2"
 )
 `)
 }
@@ -987,7 +987,7 @@ func test() {
 }
 
 func TestErrInt128(t *testing.T) {
-	codeErrorTest(t, `bar.xgo:2:16: cannot use 1<<127 (type untyped int) as type github.com/qiniu/x/gop/ng.Int128 in assignment`, `
+	codeErrorTest(t, `bar.xgo:2:16: cannot use 1<<127 (type untyped int) as type github.com/qiniu/x/xgo/ng.Int128 in assignment`, `
 var a int128 = 1<<127
 `)
 	codeErrorTest(t, `bar.xgo:2:13: cannot convert 1<<127 (untyped int constant 170141183460469231731687303715884105728) to type Int128`, `
@@ -1003,13 +1003,13 @@ a := int128(b)
 }
 
 func TestErrUint128(t *testing.T) {
-	codeErrorTest(t, `bar.xgo:2:17: cannot use 1<<128 (type untyped int) as type github.com/qiniu/x/gop/ng.Uint128 in assignment`, `
+	codeErrorTest(t, `bar.xgo:2:17: cannot use 1<<128 (type untyped int) as type github.com/qiniu/x/xgo/ng.Uint128 in assignment`, `
 var a uint128 = 1<<128
 `)
 	codeErrorTest(t, `bar.xgo:2:14: cannot convert 1<<128 (untyped int constant 340282366920938463463374607431768211456) to type Uint128`, `
 a := uint128(1<<128)
 `)
-	codeErrorTest(t, `bar.xgo:2:17: cannot use -1 (type untyped int) as type github.com/qiniu/x/gop/ng.Uint128 in assignment`, `
+	codeErrorTest(t, `bar.xgo:2:17: cannot use -1 (type untyped int) as type github.com/qiniu/x/xgo/ng.Uint128 in assignment`, `
 var a uint128 = -1
 `)
 	codeErrorTest(t, `bar.xgo:2:14: cannot convert -1 (untyped int constant -1) to type Uint128`, `
diff --git a/cl/internal/gop-in-go/foo/footest_test.xgo b/cl/internal/gop-in-go/foo/footest_test.xgo
index 24284ed9..9cace526 100644
--- a/cl/internal/gop-in-go/foo/footest_test.xgo
+++ b/cl/internal/gop-in-go/foo/footest_test.xgo
@@ -3,7 +3,7 @@ package foo_test
 import (
 	"testing"
 
-	"github.com/goplus/gop/cl/internal/gop-in-go/foo"
+	"github.com/goplus/xgo/cl/internal/gop-in-go/foo"
 )
 
 func TestReverseMap(t *testing.T) {
diff --git a/cl/run_test.go b/cl/run_test.go
index e0837881..ec1dbc65 100644
--- a/cl/run_test.go
+++ b/cl/run_test.go
@@ -11,11 +11,11 @@ import (
 	"sync/atomic"
 	"testing"
 
-	"github.com/goplus/gop/cl"
-	"github.com/goplus/gop/cl/cltest"
-	"github.com/goplus/gop/parser"
-	"github.com/goplus/gop/parser/fsx/memfs"
-	"github.com/goplus/gop/scanner"
+	"github.com/goplus/xgo/cl"
+	"github.com/goplus/xgo/cl/cltest"
+	"github.com/goplus/xgo/parser"
+	"github.com/goplus/xgo/parser/fsx/memfs"
+	"github.com/goplus/xgo/scanner"
 )
 
 var (
diff --git a/cl/typeparams_test.go b/cl/typeparams_test.go
index 62e06b8b..84f5f853 100644
--- a/cl/typeparams_test.go
+++ b/cl/typeparams_test.go
@@ -22,10 +22,10 @@ import (
 	"runtime"
 	"testing"
 
-	"github.com/goplus/gop/cl"
-	"github.com/goplus/gop/cl/cltest"
-	"github.com/goplus/gop/parser"
-	"github.com/goplus/gop/parser/fsx/memfs"
+	"github.com/goplus/xgo/cl"
+	"github.com/goplus/xgo/cl/cltest"
+	"github.com/goplus/xgo/parser"
+	"github.com/goplus/xgo/parser/fsx/memfs"
 )
 
 func TestTypeParams(t *testing.T) {
@@ -746,7 +746,7 @@ func main() {
 }
 
 func TestGenericFuncAlias(t *testing.T) {
-	gopClTest(t, `import "github.com/goplus/gop/cl/internal/overload/foo"
+	gopClTest(t, `import "github.com/goplus/xgo/cl/internal/overload/foo"
 foo.test(100)
 foo.test("hello",100)
 foo.test__1(100)
@@ -755,7 +755,7 @@ foo.test__2(1, true)
 foo.test__2[int, string](1, "hello")
 `, `package main
 
-import "github.com/goplus/gop/cl/internal/overload/foo"
+import "github.com/goplus/xgo/cl/internal/overload/foo"
 
 func main() {
 	foo.Test__1(100)
@@ -770,7 +770,7 @@ func main() {
 
 func TestGoptLambdaFunc(t *testing.T) {
 	gopClTest(t, `
-import "github.com/goplus/gop/cl/internal/overload/bar"
+import "github.com/goplus/xgo/cl/internal/overload/bar"
 
 type Message struct {
 	info string
@@ -788,7 +788,7 @@ p.onCmd int, Message, 100, (n,msg) => {
 
 import (
 	"fmt"
-	"github.com/goplus/gop/cl/internal/overload/bar"
+	"github.com/goplus/xgo/cl/internal/overload/bar"
 )
 
 type Message struct {
@@ -811,7 +811,7 @@ func main() {
 
 func TestGoptLambdaError(t *testing.T) {
 	codeErrorTest(t, `bar.xgo:8:9: 100 not type`, `
-import "github.com/goplus/gop/cl/internal/overload/bar"
+import "github.com/goplus/xgo/cl/internal/overload/bar"
 
 type Message struct {
 	info string
@@ -832,7 +832,7 @@ p.onCmd 100, Message, 100, (n, msg) => {
 		msg = "bar.xgo:8:1: string does not satisfy ~int (string missing in ~int)"
 	}
 	codeErrorTest(t, msg, `
-import "github.com/goplus/gop/cl/internal/overload/bar"
+import "github.com/goplus/xgo/cl/internal/overload/bar"
 
 type Message struct {
 	info string
diff --git a/cmd/chore/goptestgo/goptestgo.go b/cmd/chore/goptestgo/goptestgo.go
index 27ff6a92..cf48a076 100644
--- a/cmd/chore/goptestgo/goptestgo.go
+++ b/cmd/chore/goptestgo/goptestgo.go
@@ -28,9 +28,9 @@ import (
 	"path/filepath"
 	"time"
 
-	"github.com/goplus/gop/tool"
-	"github.com/goplus/gop/x/gocmd"
-	"github.com/goplus/gop/x/gopenv"
+	"github.com/goplus/xgo/tool"
+	"github.com/goplus/xgo/x/gocmd"
+	"github.com/goplus/xgo/x/gopenv"
 )
 
 func fileIsDirty(srcMod time.Time, destFile string) bool {
@@ -42,9 +42,9 @@ func fileIsDirty(srcMod time.Time, destFile string) bool {
 }
 
 func runGoFile(dir, file, fname string) {
-	gopEnv := gopenv.Get()
-	conf := &tool.Config{Gop: gopEnv}
-	confCmd := &gocmd.BuildConfig{Gop: gopEnv}
+	xgo := gopenv.Get()
+	conf := &tool.Config{XGo: xgo}
+	confCmd := &gocmd.BuildConfig{XGo: xgo}
 	fi, err := os.Stat(file)
 	if err != nil {
 		log.Panicln(err)
diff --git a/cmd/internal/test/test.go b/cmd/internal/test/test.go
index a38db5b8..ad7203eb 100644
--- a/cmd/internal/test/test.go
+++ b/cmd/internal/test/test.go
@@ -24,11 +24,11 @@ import (
 	"reflect"
 
 	"github.com/goplus/gogen"
-	"github.com/goplus/gop/cl"
-	"github.com/goplus/gop/cmd/internal/base"
-	"github.com/goplus/gop/tool"
-	"github.com/goplus/gop/x/gocmd"
-	"github.com/goplus/gop/x/gopprojs"
+	"github.com/goplus/xgo/cl"
+	"github.com/goplus/xgo/cmd/internal/base"
+	"github.com/goplus/xgo/tool"
+	"github.com/goplus/xgo/x/gocmd"
+	"github.com/goplus/xgo/x/gopprojs"
 )
 
 // gop test
diff --git a/cmd/internal/test/testflag.go b/cmd/internal/test/testflag.go
index ddd2e536..8f2f8adb 100644
--- a/cmd/internal/test/testflag.go
+++ b/cmd/internal/test/testflag.go
@@ -1,7 +1,7 @@
 package test
 
 import (
-	"github.com/goplus/gop/cmd/internal/base"
+	"github.com/goplus/xgo/cmd/internal/base"
 )
 
 type boolFlag interface {
diff --git a/cmd/make_test.go b/cmd/make_test.go
index b40567fc..52a8abcb 100644
--- a/cmd/make_test.go
+++ b/cmd/make_test.go
@@ -14,7 +14,7 @@ import (
 	"strings"
 	"testing"
 
-	"github.com/goplus/gop/env"
+	"github.com/goplus/xgo/env"
 )
 
 const (
@@ -23,7 +23,7 @@ const (
 
 var script = "all.bash"
 var gopRoot = ""
-var gopBinFiles = []string{"gop", "gopfmt"}
+var gopBinFiles = []string{"gop", "xgo"}
 var installer = "cmd/make.go"
 var versionFile = "VERSION"
 var mainVersionFile = "env/version.go"
diff --git a/cmd/xgo/test_cmd.gox b/cmd/xgo/test_cmd.gox
index 142cfeeb..82044af1 100644
--- a/cmd/xgo/test_cmd.gox
+++ b/cmd/xgo/test_cmd.gox
@@ -14,7 +14,7 @@
  */
 
 import (
-	self "github.com/goplus/gop/cmd/internal/test"
+	self "github.com/goplus/xgo/cmd/internal/test"
 )
 
 use "test [flags] [packages]"
diff --git a/env/path_test.go b/env/path_test.go
index df9acf80..a24a2d51 100644
--- a/env/path_test.go
+++ b/env/path_test.go
@@ -27,9 +27,9 @@ import (
 func findGoModFile(dir string) (modfile string, noCacheFile bool, err error) {
 	modfile, err = mod.GOMOD(dir)
 	if err != nil {
-		gopRoot, err := findGopRoot()
+		xgoRoot, err := findXgoRoot()
 		if err == nil {
-			modfile = filepath.Join(gopRoot, "go.mod")
+			modfile = filepath.Join(xgoRoot, "go.mod")
 			return modfile, true, nil
 		}
 	}
@@ -41,39 +41,39 @@ func findGoModFile(dir string) (modfile string, noCacheFile bool, err error) {
 //
 //	  src/
 //		   subdir/
-//	  valid_goproot/
+//	  valid_xgoroot/
 //		   go.mod
 //		   go.sum
-//	    cmd/gop/
-func makeTestDir(t *testing.T) (root string, src string, gopRoot string) {
+//	    cmd/xgo/
+func makeTestDir(t *testing.T) (root string, src string, xgoRoot string) {
 	root, _ = filepath.EvalSymlinks(t.TempDir())
 	src = filepath.Join(root, "src")
-	gopRoot = filepath.Join(root, "valid_goproot")
-	makeValidGopRoot(gopRoot)
+	xgoRoot = filepath.Join(root, "valid_xgoroot")
+	makeValidXgoRoot(xgoRoot)
 	os.Mkdir(src, 0755)
 	return
 }
 
-func makeValidGopRoot(root string) {
+func makeValidXgoRoot(root string) {
 	os.Mkdir(root, 0755)
-	os.MkdirAll(filepath.Join(root, "cmd/gop"), 0755)
-	os.WriteFile(filepath.Join(root, "go.mod"), []byte(""), 0644)
-	os.WriteFile(filepath.Join(root, "go.sum"), []byte(""), 0644)
+	os.MkdirAll(filepath.Join(root, "cmd/xgo"), 0755)
+	os.WriteFile(filepath.Join(root, "go.mod"), nil, 0644)
+	os.WriteFile(filepath.Join(root, "go.sum"), nil, 0644)
 }
 
 func writeDummyFile(path string) {
-	os.WriteFile(path, []byte(""), 0644)
+	os.WriteFile(path, nil, 0644)
 }
 
 func cleanup() {
-	os.Setenv("GOPROOT", "")
+	os.Setenv("XGOROOT", "")
 	os.Setenv(envHOME, "")
 	defaultGopRoot = ""
 }
 
 func TestBasic(t *testing.T) {
 	defaultGopRoot = ".."
-	if GOPROOT() == "" {
+	if XGOROOT() == "" {
 		t.Fatal("TestBasic failed")
 	}
 	defaultGopRoot = ""
@@ -143,33 +143,33 @@ func TestFindGoModFileInGopRoot(t *testing.T) {
 	}
 	cleanupAll()
 
-	t.Run("without gop root", func(tt *testing.T) {
+	t.Run("without xgo root", func(tt *testing.T) {
 		tt.Cleanup(cleanupAll)
 		root, _, _ := makeTestDir(tt)
 
 		modfile, noCacheFile, err := findGoModFile(root)
 
 		if err == nil || noCacheFile || modfile != "" {
-			tt.Fatal("should not found go.mod without gop root, got:", modfile, noCacheFile, err)
+			tt.Fatal("should not found go.mod without xgo root, got:", modfile, noCacheFile, err)
 		}
 	})
 
-	t.Run("set GOPROOT to a valid goproot path", func(tt *testing.T) {
+	t.Run("set XGOROOT to a valid xgoroot path", func(tt *testing.T) {
 		tt.Cleanup(cleanupAll)
-		_, src, gopRoot := makeTestDir(tt)
+		_, src, xgoRoot := makeTestDir(tt)
 
-		os.Setenv("GOPROOT", gopRoot)
+		os.Setenv("XGOROOT", xgoRoot)
 		modfile, noCacheFile, err := findGoModFile(src)
 
-		if err != nil || modfile != filepath.Join(gopRoot, "go.mod") || !noCacheFile {
-			tt.Fatal("should found mod file in GOPROOT, got:", modfile, noCacheFile, err)
+		if err != nil || modfile != filepath.Join(xgoRoot, "go.mod") || !noCacheFile {
+			tt.Fatal("should found mod file in XGOROOT, got:", modfile, noCacheFile, err)
 		}
 	})
 
-	t.Run("set GOPROOT to an invalid goproot path", func(tt *testing.T) {
+	t.Run("set XGOROOT to an invalid xgoroot path", func(tt *testing.T) {
 		tt.Cleanup(cleanupAll)
 		root, src, _ := makeTestDir(tt)
-		invalidGopRoot := filepath.Join(root, "invalid_goproot")
+		invalidXgoRoot := filepath.Join(root, "invalid_xgoroot")
 
 		defer func() {
 			r := recover()
@@ -178,18 +178,18 @@ func TestFindGoModFileInGopRoot(t *testing.T) {
 			}
 		}()
 
-		os.Setenv("GOPROOT", invalidGopRoot)
+		os.Setenv("XGOROOT", invalidXgoRoot)
 		findGoModFile(src)
 	})
 
-	t.Run("set defaultGopRoot to a valid goproot path", func(tt *testing.T) {
+	t.Run("set defaultGopRoot to a valid xgoroot path", func(tt *testing.T) {
 		tt.Cleanup(cleanupAll)
-		_, src, gopRoot := makeTestDir(tt)
+		_, src, xgoRoot := makeTestDir(tt)
 
-		defaultGopRoot = gopRoot
+		defaultGopRoot = xgoRoot
 		modfile, noCacheFile, err := findGoModFile(src)
 
-		if err != nil || modfile != filepath.Join(gopRoot, "go.mod") || !noCacheFile {
+		if err != nil || modfile != filepath.Join(xgoRoot, "go.mod") || !noCacheFile {
 			tt.Fatal("should found go.mod in the dir of defaultGopRoot, got:", modfile, noCacheFile, err)
 		}
 	})
@@ -197,9 +197,9 @@ func TestFindGoModFileInGopRoot(t *testing.T) {
 	t.Run("set defaultGopRoot to an invalid path", func(tt *testing.T) {
 		tt.Cleanup(cleanupAll)
 		root, src, _ := makeTestDir(tt)
-		invalidGopRoot := filepath.Join(root, "invalid_goproot")
+		invalidXgoRoot := filepath.Join(root, "invalid_xgoroot")
 
-		defaultGopRoot = invalidGopRoot
+		defaultGopRoot = invalidXgoRoot
 		{
 			modfile, noCacheFile, err := findGoModFile(src)
 
@@ -209,7 +209,7 @@ func TestFindGoModFileInGopRoot(t *testing.T) {
 		}
 
 		{
-			os.Mkdir(invalidGopRoot, 0755)
+			os.Mkdir(invalidXgoRoot, 0755)
 			modfile, noCacheFile, err := findGoModFile(src)
 
 			if err == nil || noCacheFile || modfile != "" {
@@ -218,7 +218,7 @@ func TestFindGoModFileInGopRoot(t *testing.T) {
 		}
 	})
 
-	t.Run("use $HOME/gop or $HOME/goplus", func(tt *testing.T) {
+	t.Run("use $HOME/xgo", func(tt *testing.T) {
 		tt.Cleanup(cleanupAll)
 		root, src, _ := makeTestDir(tt)
 		home := filepath.Join(root, "home")
@@ -226,23 +226,12 @@ func TestFindGoModFileInGopRoot(t *testing.T) {
 		os.Setenv(envHOME, home)
 
 		{
-			gopRoot := filepath.Join(home, "goplus")
-			makeValidGopRoot(gopRoot)
+			xgoRoot := filepath.Join(home, "xgo")
+			makeValidXgoRoot(xgoRoot)
 
 			modfile, noCacheFile, err := findGoModFile(src)
 
-			if err != nil || !noCacheFile || modfile != filepath.Join(gopRoot, "go.mod") {
-				tt.Fatal("should found go.mod in $HOME/goplus, but got:", modfile, noCacheFile, err)
-			}
-		}
-
-		{
-			gopRoot := filepath.Join(home, "gop")
-			makeValidGopRoot(gopRoot)
-
-			modfile, noCacheFile, err := findGoModFile(src)
-
-			if err != nil || !noCacheFile || modfile != filepath.Join(gopRoot, "go.mod") {
+			if err != nil || !noCacheFile || modfile != filepath.Join(xgoRoot, "go.mod") {
 				tt.Fatal("should found go.mod in $HOME/gop, but got:", modfile, noCacheFile, err)
 			}
 		}
@@ -250,8 +239,8 @@ func TestFindGoModFileInGopRoot(t *testing.T) {
 
 	t.Run("check if parent dir of the executable is valid gop root", func(tt *testing.T) {
 		tt.Cleanup(cleanupAll)
-		_, src, gopRoot := makeTestDir(tt)
-		bin := filepath.Join(gopRoot, "bin")
+		_, src, xgoRoot := makeTestDir(tt)
+		bin := filepath.Join(xgoRoot, "bin")
 		exePath := filepath.Join(bin, "run")
 		os.Mkdir(bin, 0755)
 		writeDummyFile(exePath)
@@ -263,81 +252,38 @@ func TestFindGoModFileInGopRoot(t *testing.T) {
 
 		modfile, noCacheFile, err := findGoModFile(src)
 
-		if err != nil || !noCacheFile || modfile != filepath.Join(gopRoot, "go.mod") {
-			tt.Fatal("should found go.mod in gopRoot, but got:", modfile, noCacheFile, err)
+		if err != nil || !noCacheFile || modfile != filepath.Join(xgoRoot, "go.mod") {
+			tt.Fatal("should found go.mod in xgoRoot, but got:", modfile, noCacheFile, err)
 		}
 	})
 
-	t.Run("test gop root priority", func(tt *testing.T) {
+	t.Run("test xgo root priority", func(tt *testing.T) {
 		tt.Cleanup(cleanupAll)
 		root, src, _ := makeTestDir(tt)
 
-		tt.Run("without gop root", func(tt *testing.T) {
+		tt.Run("without xgo root", func(tt *testing.T) {
 			modfile, noCacheFile, err := findGoModFile(src)
 
 			if err == nil || noCacheFile || modfile != "" {
-				tt.Fatal("should not found go.mod without gop root, got:", modfile, noCacheFile, err)
-			}
-		})
-
-		tt.Run("set HOME but hasn't $HOME/gop/ and $HOME/goplus/", func(tt *testing.T) {
-			os.Setenv(envHOME, root)
-
-			modfile, noCacheFile, err := findGoModFile(src)
-
-			if err == nil || noCacheFile || modfile != "" {
-				tt.Fatal("should not found go.mod without gop root, got:", modfile, noCacheFile, err)
-			}
-		})
-
-		tt.Run("set HOME, and has valid $HOME/goplus/", func(tt *testing.T) {
-			gopRoot := filepath.Join(root, "goplus")
-			makeValidGopRoot(gopRoot)
-
-			modfile, noCacheFile, err := findGoModFile(src)
-
-			if err != nil || !noCacheFile || modfile != filepath.Join(gopRoot, "go.mod") {
-				tt.Fatal("should found go.mod in $HOME/goplus, but got:", modfile, noCacheFile, err)
-			}
-		})
-
-		tt.Run("set HOME, and has valid $HOME/gop/", func(tt *testing.T) {
-			gopRoot := filepath.Join(root, "gop")
-			makeValidGopRoot(gopRoot)
-
-			modfile, noCacheFile, err := findGoModFile(src)
-
-			if err != nil || !noCacheFile || modfile != filepath.Join(gopRoot, "go.mod") {
-				tt.Fatal("should found go.mod in $HOME/gop, but got:", modfile, noCacheFile, err)
-			}
-		})
-
-		tt.Run("set defaultGopRoot to an invalid gop root dir", func(tt *testing.T) {
-			gopRoot := filepath.Join(root, "gop")
-
-			defaultGopRoot = filepath.Join(root, "invalid_goproot")
-			modfile, noCacheFile, err := findGoModFile(src)
-
-			if err != nil || !noCacheFile || modfile != filepath.Join(gopRoot, "go.mod") {
-				tt.Fatal("should found go.mod in $HOME/gop, but got:", modfile, noCacheFile, err)
+				tt.Fatal("should not found go.mod without xgo root, got:", modfile, noCacheFile, err)
 			}
 		})
 
-		tt.Run("set defaultGopRoot to a valid gop root dir", func(tt *testing.T) {
-			newGopRoot := filepath.Join(root, "new_gop_root")
-			makeValidGopRoot(newGopRoot)
+		tt.Run("set defaultGopRoot to a valid xgo root dir", func(tt *testing.T) {
+			newXgoRoot := filepath.Join(root, "new_xgo_root")
+			makeValidXgoRoot(newXgoRoot)
 
-			defaultGopRoot = newGopRoot
+			defaultGopRoot = newXgoRoot
 			modfile, noCacheFile, err := findGoModFile(src)
 
-			if err != nil || !noCacheFile || modfile != filepath.Join(newGopRoot, "go.mod") {
-				tt.Fatal("should found go.mod in new_gop_root/, but got:", modfile, noCacheFile, err)
+			if err != nil || !noCacheFile || modfile != filepath.Join(newXgoRoot, "go.mod") {
+				tt.Fatal("should found go.mod in new_xgo_root/, but got:", modfile, noCacheFile, err)
 			}
 		})
 
-		tt.Run("the executable's parent dir is a valid gop root dir", func(tt *testing.T) {
+		tt.Run("the executable's parent dir is a valid xgo root dir", func(tt *testing.T) {
 			newGopRoot2 := filepath.Join(root, "new_gop_root2")
-			makeValidGopRoot(newGopRoot2)
+			makeValidXgoRoot(newGopRoot2)
 			bin := filepath.Join(newGopRoot2, "bin")
 			exePath := filepath.Join(bin, "run")
 			os.Mkdir(bin, 0755)
@@ -354,7 +300,7 @@ func TestFindGoModFileInGopRoot(t *testing.T) {
 			}
 		})
 
-		tt.Run("set GOPROOT to an invalid gop root dir", func(tt *testing.T) {
+		tt.Run("set XGOROOT to an invalid xgo root dir", func(tt *testing.T) {
 			newGopRoot3 := filepath.Join(root, "new_gop_root3")
 
 			defer func() {
@@ -364,15 +310,15 @@ func TestFindGoModFileInGopRoot(t *testing.T) {
 				}
 			}()
 
-			os.Setenv("GOPROOT", newGopRoot3)
+			os.Setenv("XGOROOT", newGopRoot3)
 			findGoModFile(src)
 		})
 
-		tt.Run("set GOPROOT to a valid gop root dir", func(tt *testing.T) {
+		tt.Run("set XGOROOT to a valid xgo root dir", func(tt *testing.T) {
 			newGopRoot4 := filepath.Join(root, "new_gop_root4")
-			makeValidGopRoot(newGopRoot4)
+			makeValidXgoRoot(newGopRoot4)
 
-			os.Setenv("GOPROOT", newGopRoot4)
+			os.Setenv("XGOROOT", newGopRoot4)
 			modfile, noCacheFile, err := findGoModFile(src)
 
 			if err != nil || !noCacheFile || modfile != filepath.Join(newGopRoot4, "go.mod") {
diff --git a/env/version_test.go b/env/version_test.go
index e15cb4b7..09bdac48 100644
--- a/env/version_test.go
+++ b/env/version_test.go
@@ -32,15 +32,15 @@ func TestPanic(t *testing.T) {
 		buildVersion = "v1.2"
 		initEnv()
 	})
-	t.Run("GOPROOT panic", func(t *testing.T) {
+	t.Run("XGOROOT panic", func(t *testing.T) {
 		defer func() {
 			if e := recover(); e == nil {
-				t.Fatal("GOPROOT: no panic?")
+				t.Fatal("XGOROOT: no panic?")
 			}
 		}()
 		defaultGopRoot = ""
-		os.Setenv(envGOPROOT, "")
-		GOPROOT()
+		os.Setenv(envXGOROOT, "")
+		XGOROOT()
 	})
 }
 
diff --git a/format/formatutil/format_test.go b/format/formatutil/format_test.go
index b5f3a0b1..8707399c 100644
--- a/format/formatutil/format_test.go
+++ b/format/formatutil/format_test.go
@@ -25,8 +25,8 @@ import (
 	"strings"
 	"testing"
 
-	"github.com/goplus/gop/scanner"
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/scanner"
+	"github.com/goplus/xgo/token"
 )
 
 func TestSeekAfter(t *testing.T) {
diff --git a/parser/parser_test.go b/parser/parser_test.go
index 45974573..c6874561 100644
--- a/parser/parser_test.go
+++ b/parser/parser_test.go
@@ -20,8 +20,8 @@ import (
 	"io/fs"
 	"testing"
 
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/token"
 	fsx "github.com/qiniu/x/http/fs"
 )
 
diff --git a/parser/parserdir_go118_test.go b/parser/parserdir_go118_test.go
index 46fc57db..cd041110 100644
--- a/parser/parserdir_go118_test.go
+++ b/parser/parserdir_go118_test.go
@@ -22,8 +22,8 @@ package parser
 import (
 	"testing"
 
-	"github.com/goplus/gop/parser/parsertest"
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/parser/parsertest"
+	"github.com/goplus/xgo/token"
 )
 
 var testStdCode = `package bar; import "io"
diff --git a/parser/parserdir_test.go b/parser/parserdir_test.go
index 459c38eb..f0e130e0 100644
--- a/parser/parserdir_test.go
+++ b/parser/parserdir_test.go
@@ -25,13 +25,13 @@ import (
 	"syscall"
 	"testing"
 
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/parser/fsx"
-	"github.com/goplus/gop/parser/fsx/memfs"
-	"github.com/goplus/gop/parser/iox"
-	"github.com/goplus/gop/parser/parsertest"
-	"github.com/goplus/gop/scanner"
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/parser/fsx"
+	"github.com/goplus/xgo/parser/fsx/memfs"
+	"github.com/goplus/xgo/parser/iox"
+	"github.com/goplus/xgo/parser/parsertest"
+	"github.com/goplus/xgo/scanner"
+	"github.com/goplus/xgo/token"
 	"github.com/qiniu/x/log"
 )
 
diff --git a/parser/parsertest/parsertest.go b/parser/parsertest/parsertest.go
index 41c194c7..d8444b23 100644
--- a/parser/parsertest/parsertest.go
+++ b/parser/parsertest/parsertest.go
@@ -27,9 +27,9 @@ import (
 	"sort"
 	"testing"
 
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/token"
-	tpltoken "github.com/goplus/gop/tpl/token"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/token"
+	tpltoken "github.com/goplus/xgo/tpl/token"
 	"github.com/qiniu/x/test"
 )
 
diff --git a/printer/_testdata/14-Using-goplus-in-Go/foo/footest_test.xgo b/printer/_testdata/14-Using-goplus-in-Go/foo/footest_test.xgo
index 3400ae30..382228c7 100644
--- a/printer/_testdata/14-Using-goplus-in-Go/foo/footest_test.xgo
+++ b/printer/_testdata/14-Using-goplus-in-Go/foo/footest_test.xgo
@@ -3,7 +3,7 @@ package foo_test
 import (
 	"testing"
 
-	"github.com/goplus/gop/tutorial/14-Using-goplus-in-Go/foo"
+	"github.com/goplus/xgo/tutorial/14-Using-goplus-in-Go/foo"
 )
 
 func TestReverseMap(t *testing.T) {
diff --git a/printer/_testdata/32-Import-gop-package/import_gop_pkg.xgo b/printer/_testdata/32-Import-gop-package/import_gop_pkg.xgo
index a5774c95..3429da9a 100644
--- a/printer/_testdata/32-Import-gop-package/import_gop_pkg.xgo
+++ b/printer/_testdata/32-Import-gop-package/import_gop_pkg.xgo
@@ -1,4 +1,4 @@
-import "github.com/goplus/gop/tutorial/14-Using-goplus-in-Go/foo"
+import "github.com/goplus/xgo/tutorial/14-Using-goplus-in-Go/foo"
 
 rmap := foo.ReverseMap({"Hi": 1, "Hello": 2})
 println(rmap)
diff --git a/printer/bugfix_test.go b/printer/bugfix_test.go
index 6d0842f1..3adfe534 100644
--- a/printer/bugfix_test.go
+++ b/printer/bugfix_test.go
@@ -8,9 +8,9 @@ import (
 	goprinter "go/printer"
 	gotoken "go/token"
 
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/printer"
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/printer"
+	"github.com/goplus/xgo/token"
 )
 
 func goIdents(name string) []*goast.Ident {
diff --git a/printer/gop_test.go b/printer/gop_test.go
index 245871e7..fda31bc5 100644
--- a/printer/gop_test.go
+++ b/printer/gop_test.go
@@ -24,11 +24,11 @@ import (
 	"strings"
 	"testing"
 
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/format"
-	"github.com/goplus/gop/parser"
-	"github.com/goplus/gop/printer"
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/format"
+	"github.com/goplus/xgo/parser"
+	"github.com/goplus/xgo/printer"
+	"github.com/goplus/xgo/token"
 )
 
 func init() {
diff --git a/printer/printer_test.go b/printer/printer_test.go
index 82c4de36..42f056a6 100644
--- a/printer/printer_test.go
+++ b/printer/printer_test.go
@@ -23,9 +23,9 @@ import (
 	"io/ioutil"
 	"testing"
 
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/parser"
-	"github.com/goplus/gop/token"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/parser"
+	"github.com/goplus/xgo/token"
 )
 
 const (
diff --git a/tpl/parser/parser_test.go b/tpl/parser/parser_test.go
index 7775e92f..a794e4b3 100644
--- a/tpl/parser/parser_test.go
+++ b/tpl/parser/parser_test.go
@@ -24,12 +24,12 @@ import (
 	"strings"
 	"testing"
 
-	gopp "github.com/goplus/gop/parser"
-	"github.com/goplus/gop/tpl/ast"
-	"github.com/goplus/gop/tpl/parser"
-	"github.com/goplus/gop/tpl/parser/parsertest"
-	"github.com/goplus/gop/tpl/scanner"
-	"github.com/goplus/gop/tpl/token"
+	gopp "github.com/goplus/xgo/parser"
+	"github.com/goplus/xgo/tpl/ast"
+	"github.com/goplus/xgo/tpl/parser"
+	"github.com/goplus/xgo/tpl/parser/parsertest"
+	"github.com/goplus/xgo/tpl/scanner"
+	"github.com/goplus/xgo/tpl/token"
 )
 
 func testFrom(t *testing.T, pkgDir, sel string) {
diff --git a/tpl/parser/parsertest/parsertest.go b/tpl/parser/parsertest/parsertest.go
index 0d4b3476..6f210bd6 100644
--- a/tpl/parser/parsertest/parsertest.go
+++ b/tpl/parser/parsertest/parsertest.go
@@ -24,8 +24,8 @@ import (
 	"reflect"
 	"testing"
 
-	"github.com/goplus/gop/tpl/ast"
-	"github.com/goplus/gop/tpl/token"
+	"github.com/goplus/xgo/tpl/ast"
+	"github.com/goplus/xgo/tpl/token"
 	"github.com/qiniu/x/test"
 )
 
diff --git a/tpl/scanner/scandir_test.go b/tpl/scanner/scandir_test.go
index b7264b62..ef7ff969 100644
--- a/tpl/scanner/scandir_test.go
+++ b/tpl/scanner/scandir_test.go
@@ -25,7 +25,7 @@ import (
 	"strings"
 	"testing"
 
-	"github.com/goplus/gop/tpl/scanner/scannertest"
+	"github.com/goplus/xgo/tpl/scanner/scannertest"
 	"github.com/qiniu/x/test"
 )
 
diff --git a/tpl/scanner/scanner_test.go b/tpl/scanner/scanner_test.go
index 5207c419..4571f211 100644
--- a/tpl/scanner/scanner_test.go
+++ b/tpl/scanner/scanner_test.go
@@ -19,8 +19,8 @@ package scanner
 import (
 	"testing"
 
-	"github.com/goplus/gop/tpl/token"
-	"github.com/goplus/gop/tpl/types"
+	"github.com/goplus/xgo/tpl/token"
+	"github.com/goplus/xgo/tpl/types"
 )
 
 type Token = types.Token
diff --git a/tpl/scanner/scannertest/scannertest.go b/tpl/scanner/scannertest/scannertest.go
index 20a16f49..2cb34e93 100644
--- a/tpl/scanner/scannertest/scannertest.go
+++ b/tpl/scanner/scannertest/scannertest.go
@@ -20,14 +20,14 @@ import (
 	"fmt"
 	"io"
 
-	"github.com/goplus/gop/tpl/scanner"
-	"github.com/goplus/gop/tpl/token"
+	"github.com/goplus/xgo/tpl/scanner"
+	"github.com/goplus/xgo/tpl/token"
 
 	goscanner "go/scanner"
 	gotoken "go/token"
 
-	gopscanner "github.com/goplus/gop/scanner"
-	goptoken "github.com/goplus/gop/token"
+	gopscanner "github.com/goplus/xgo/scanner"
+	goptoken "github.com/goplus/xgo/token"
 )
 
 // -----------------------------------------------------------------------------
diff --git a/x/build/build_test.go b/x/build/build_test.go
index 621fca96..dd926cc2 100644
--- a/x/build/build_test.go
+++ b/x/build/build_test.go
@@ -27,9 +27,9 @@ import (
 	"strings"
 	"testing"
 
-	"github.com/goplus/gop/cl"
-	"github.com/goplus/gop/parser/fsx"
-	"github.com/goplus/gop/x/build"
+	"github.com/goplus/xgo/cl"
+	"github.com/goplus/xgo/parser/fsx"
+	"github.com/goplus/xgo/x/build"
 )
 
 var (
@@ -43,7 +43,7 @@ func init() {
 	}
 	build.RegisterClassFileType(".tspx", "MyGame", []*build.Class{
 		{Ext: ".tspx", Class: "Sprite"},
-	}, "github.com/goplus/gop/cl/internal/spx")
+	}, "github.com/goplus/xgo/cl/internal/spx")
 	build.RegisterClassFileType("_yap.gox", "App", nil, "github.com/goplus/yap")
 }
 
@@ -240,7 +240,7 @@ println a+1/2r
 
 import (
 	"fmt"
-	"github.com/qiniu/x/gop/ng"
+	"github.com/qiniu/x/xgo/ng"
 	"math/big"
 )
 
@@ -264,7 +264,7 @@ for line <- lines(r) {
 
 import (
 	"fmt"
-	"github.com/qiniu/x/gop/osx"
+	"github.com/qiniu/x/osx"
 	"io"
 )
 
@@ -375,7 +375,7 @@ func TestSpx(t *testing.T) {
 
 import (
 	"fmt"
-	"github.com/goplus/gop/cl/internal/spx"
+	"github.com/goplus/xgo/cl/internal/spx"
 )
 
 type MyGame struct {
@@ -396,7 +396,7 @@ func main() {
 
 import (
 	"fmt"
-	"github.com/goplus/gop/cl/internal/spx"
+	"github.com/goplus/xgo/cl/internal/spx"
 )
 
 type Cat struct {
diff --git a/x/jsonrpc2/internal/stack/stacktest/stacktest.go b/x/jsonrpc2/internal/stack/stacktest/stacktest.go
index a5c58c46..71eafa52 100644
--- a/x/jsonrpc2/internal/stack/stacktest/stacktest.go
+++ b/x/jsonrpc2/internal/stack/stacktest/stacktest.go
@@ -8,7 +8,7 @@ import (
 	"testing"
 	"time"
 
-	"github.com/goplus/gop/x/jsonrpc2/internal/stack"
+	"github.com/goplus/xgo/x/jsonrpc2/internal/stack"
 )
 
 // this is only needed to support pre 1.14 when testing.TB did not have Cleanup
diff --git a/x/jsonrpc2/jsonrpc2test/cases/testcase.go b/x/jsonrpc2/jsonrpc2test/cases/testcase.go
index ef277554..a0876595 100644
--- a/x/jsonrpc2/jsonrpc2test/cases/testcase.go
+++ b/x/jsonrpc2/jsonrpc2test/cases/testcase.go
@@ -15,8 +15,8 @@ import (
 	"testing"
 	"time"
 
-	"github.com/goplus/gop/x/jsonrpc2"
-	"github.com/goplus/gop/x/jsonrpc2/internal/stack/stacktest"
+	"github.com/goplus/xgo/x/jsonrpc2"
+	"github.com/goplus/xgo/x/jsonrpc2/internal/stack/stacktest"
 )
 
 var callTests = []invoker{
diff --git a/x/jsonrpc2/jsonrpc2test/jsonrpc2_test.go b/x/jsonrpc2/jsonrpc2test/jsonrpc2_test.go
index 72abe2ca..360716c3 100644
--- a/x/jsonrpc2/jsonrpc2test/jsonrpc2_test.go
+++ b/x/jsonrpc2/jsonrpc2test/jsonrpc2_test.go
@@ -8,9 +8,9 @@ import (
 	"context"
 	"testing"
 
-	"github.com/goplus/gop/x/jsonrpc2"
-	"github.com/goplus/gop/x/jsonrpc2/jsonrpc2test"
-	"github.com/goplus/gop/x/jsonrpc2/jsonrpc2test/cases"
+	"github.com/goplus/xgo/x/jsonrpc2"
+	"github.com/goplus/xgo/x/jsonrpc2/jsonrpc2test"
+	"github.com/goplus/xgo/x/jsonrpc2/jsonrpc2test/cases"
 )
 
 func TestNetPipe(t *testing.T) {
diff --git a/x/jsonrpc2/jsonrpc2test/pipe.go b/x/jsonrpc2/jsonrpc2test/pipe.go
index e7977737..262a57bc 100644
--- a/x/jsonrpc2/jsonrpc2test/pipe.go
+++ b/x/jsonrpc2/jsonrpc2test/pipe.go
@@ -25,7 +25,7 @@ import (
 	"io"
 	"net"
 
-	"github.com/goplus/gop/x/jsonrpc2"
+	"github.com/goplus/xgo/x/jsonrpc2"
 )
 
 // NetPipeListener returns a new Listener that listens using net.Pipe.
diff --git a/x/typesutil/check_test.go b/x/typesutil/check_test.go
index 944285a6..5f355be6 100644
--- a/x/typesutil/check_test.go
+++ b/x/typesutil/check_test.go
@@ -10,11 +10,11 @@ import (
 	"path/filepath"
 	"testing"
 
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/parser"
-	"github.com/goplus/gop/token"
-	"github.com/goplus/gop/x/typesutil"
-	"github.com/goplus/mod/gopmod"
+	"github.com/goplus/mod/xgomod"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/parser"
+	"github.com/goplus/xgo/token"
+	"github.com/goplus/xgo/x/typesutil"
 )
 
 func init() {
@@ -69,7 +69,7 @@ func checkInfo(fset *token.FileSet, files []*ast.File, gofiles []*goast.File) (*
 	chkOpts := &typesutil.Config{
 		Types: types.NewPackage("main", "main"),
 		Fset:  fset,
-		Mod:   gopmod.Default,
+		Mod:   xgomod.Default,
 	}
 	info := &typesutil.Info{
 		Types:      make(map[ast.Expr]types.TypeAndValue),
diff --git a/x/typesutil/exprstring_test.go b/x/typesutil/exprstring_test.go
index e88d925f..9d60bb57 100644
--- a/x/typesutil/exprstring_test.go
+++ b/x/typesutil/exprstring_test.go
@@ -7,8 +7,8 @@ package typesutil_test
 import (
 	"testing"
 
-	"github.com/goplus/gop/parser"
-	"github.com/goplus/gop/x/typesutil"
+	"github.com/goplus/xgo/parser"
+	"github.com/goplus/xgo/x/typesutil"
 )
 
 type testEntry struct {
diff --git a/x/typesutil/info_test.go b/x/typesutil/info_test.go
index bfa8728f..8e5beaf2 100644
--- a/x/typesutil/info_test.go
+++ b/x/typesutil/info_test.go
@@ -16,29 +16,29 @@ import (
 	"unsafe"
 
 	"github.com/goplus/gogen"
-	"github.com/goplus/gop/ast"
-	"github.com/goplus/gop/cl/cltest"
-	"github.com/goplus/gop/format"
-	"github.com/goplus/gop/parser"
-	"github.com/goplus/gop/token"
-	"github.com/goplus/gop/tool"
-	"github.com/goplus/gop/x/typesutil"
 	"github.com/goplus/mod/env"
-	"github.com/goplus/mod/gopmod"
 	"github.com/goplus/mod/modfile"
 	"github.com/goplus/mod/modload"
+	"github.com/goplus/mod/xgomod"
+	"github.com/goplus/xgo/ast"
+	"github.com/goplus/xgo/cl/cltest"
+	"github.com/goplus/xgo/format"
+	"github.com/goplus/xgo/parser"
+	"github.com/goplus/xgo/token"
+	"github.com/goplus/xgo/tool"
+	"github.com/goplus/xgo/x/typesutil"
 )
 
 var spxProject = &modfile.Project{
 	Ext: ".tgmx", Class: "*MyGame",
 	Works:    []*modfile.Class{{Ext: ".tspx", Class: "Sprite"}},
-	PkgPaths: []string{"github.com/goplus/gop/cl/internal/spx", "math"}}
+	PkgPaths: []string{"github.com/goplus/xgo/cl/internal/spx", "math"}}
 
-var spxMod *gopmod.Module
+var spxMod *xgomod.Module
 var gotypesalias bool
 
 func init() {
-	spxMod = gopmod.New(modload.Default)
+	spxMod = xgomod.New(modload.Default)
 	spxMod.Opt.Projects = append(spxMod.Opt.Projects, spxProject)
 	spxMod.ImportClasses()
 	gotypesalias = cltest.EnableTypesalias()
@@ -65,7 +65,7 @@ func spxParserConf() parser.Config {
 	}
 }
 
-func parseMixedSource(mod *gopmod.Module, fset *token.FileSet, name, src string, goname string, gosrc string, parserConf parser.Config, updateGoTypesOverload bool) (*types.Package, *typesutil.Info, *types.Info, error) {
+func parseMixedSource(mod *xgomod.Module, fset *token.FileSet, name, src string, goname string, gosrc string, parserConf parser.Config, updateGoTypesOverload bool) (*types.Package, *typesutil.Info, *types.Info, error) {
 	f, err := parser.ParseEntry(fset, name, src, parserConf)
 	if err != nil {
 		return nil, nil, nil, err
@@ -80,7 +80,7 @@ func parseMixedSource(mod *gopmod.Module, fset *token.FileSet, name, src string,
 	}
 
 	conf := &types.Config{}
-	conf.Importer = tool.NewImporter(nil, &env.Gop{Root: "../..", Version: "1.0"}, fset)
+	conf.Importer = tool.NewImporter(nil, &env.XGo{Root: "../..", Version: "1.0"}, fset)
 	chkOpts := &typesutil.Config{
 		Types:                 types.NewPackage("main", f.Name.Name),
 		Fset:                  fset,
@@ -118,12 +118,12 @@ func parseSource(fset *token.FileSet, filename string, src any, mode parser.Mode
 
 	pkg := types.NewPackage("", f.Name.Name)
 	conf := &types.Config{}
-	Gop := &env.Gop{Version: "1.0"}
-	conf.Importer = tool.NewImporter(nil, Gop, fset)
+	xgo := &env.XGo{Version: "1.0"}
+	conf.Importer = tool.NewImporter(nil, xgo, fset)
 	chkOpts := &typesutil.Config{
 		Types: pkg,
 		Fset:  fset,
-		Mod:   gopmod.Default,
+		Mod:   xgomod.Default,
 	}
 	info := &typesutil.Info{
 		Types:      make(map[ast.Expr]types.TypeAndValue),
@@ -162,14 +162,14 @@ func parseGoSource(fset *token.FileSet, filename string, src any, mode goparser.
 }
 
 func testGopInfo(t *testing.T, src string, gosrc string, expect string) {
-	testGopInfoEx(t, gopmod.Default, "main.xgo", src, "main.go", gosrc, expect, parser.Config{})
+	testGopInfoEx(t, xgomod.Default, "main.xgo", src, "main.go", gosrc, expect, parser.Config{})
 }
 
 func testSpxInfo(t *testing.T, name string, src string, expect string) {
 	testGopInfoEx(t, spxMod, name, src, "main.go", "", expect, spxParserConf())
 }
 
-func testGopInfoEx(t *testing.T, mod *gopmod.Module, name string, src string, goname string, gosrc string, expect string, parseConf parser.Config) {
+func testGopInfoEx(t *testing.T, mod *xgomod.Module, name string, src string, goname string, gosrc string, expect string, parseConf parser.Config) {
 	fset := token.NewFileSet()
 	_, info, _, err := parseMixedSource(mod, fset, name, src, goname, gosrc, parseConf, false)
 	if err != nil {
@@ -1490,87 +1490,87 @@ func TestOverloadNamed(t *testing.T) {
 	var expect string
 	if gotypesalias {
 		expect = `== types ==
-000:  4: 7 | bar.Var             *ast.SelectorExpr              | type    : github.com/goplus/gop/cl/internal/overload/bar.Var__0[int] | type
-001:  4: 7 | bar.Var[int]        *ast.IndexExpr                 | type    : github.com/goplus/gop/cl/internal/overload/bar.Var__0[int] | type
+000:  4: 7 | bar.Var             *ast.SelectorExpr              | type    : github.com/goplus/xgo/cl/internal/overload/bar.Var__0[int] | type
+001:  4: 7 | bar.Var[int]        *ast.IndexExpr                 | type    : github.com/goplus/xgo/cl/internal/overload/bar.Var__0[int] | type
 002:  4:15 | int                 *ast.Ident                     | type    : int | type
-003:  5: 7 | bar.Var             *ast.SelectorExpr              | type    : github.com/goplus/gop/cl/internal/overload/bar.Var__1[github.com/goplus/gop/cl/internal/overload/bar.M] | type
-004:  5: 7 | bar.Var[bar.M]      *ast.IndexExpr                 | type    : github.com/goplus/gop/cl/internal/overload/bar.Var__1[github.com/goplus/gop/cl/internal/overload/bar.M] | type
-005:  5:15 | bar.M               *ast.SelectorExpr              | type    : github.com/goplus/gop/cl/internal/overload/bar.M | type
-006:  6: 6 | bar.Var             *ast.SelectorExpr              | value   : func[T github.com/goplus/gop/cl/internal/overload/bar.basetype]() *github.com/goplus/gop/cl/internal/overload/bar.Var__0[T] | value
-007:  6: 6 | bar.Var(string)     *ast.CallExpr                  | value   : *github.com/goplus/gop/cl/internal/overload/bar.Var__0[string] | value
+003:  5: 7 | bar.Var             *ast.SelectorExpr              | type    : github.com/goplus/xgo/cl/internal/overload/bar.Var__1[github.com/goplus/xgo/cl/internal/overload/bar.M] | type
+004:  5: 7 | bar.Var[bar.M]      *ast.IndexExpr                 | type    : github.com/goplus/xgo/cl/internal/overload/bar.Var__1[github.com/goplus/xgo/cl/internal/overload/bar.M] | type
+005:  5:15 | bar.M               *ast.SelectorExpr              | type    : github.com/goplus/xgo/cl/internal/overload/bar.M | type
+006:  6: 6 | bar.Var             *ast.SelectorExpr              | value   : func[T github.com/goplus/xgo/cl/internal/overload/bar.basetype]() *github.com/goplus/xgo/cl/internal/overload/bar.Var__0[T] | value
+007:  6: 6 | bar.Var(string)     *ast.CallExpr                  | value   : *github.com/goplus/xgo/cl/internal/overload/bar.Var__0[string] | value
 008:  6:14 | string              *ast.Ident                     | type    : string | type
-009:  7: 6 | bar.Var             *ast.SelectorExpr              | value   : func[T map[string]any]() *github.com/goplus/gop/cl/internal/overload/bar.Var__1[T] | value
-010:  7: 6 | bar.Var(bar.M)      *ast.CallExpr                  | value   : *github.com/goplus/gop/cl/internal/overload/bar.Var__1[github.com/goplus/gop/cl/internal/overload/bar.M] | value
-011:  7:14 | bar.M               *ast.SelectorExpr              | var     : github.com/goplus/gop/cl/internal/overload/bar.M | variable
+009:  7: 6 | bar.Var             *ast.SelectorExpr              | value   : func[T map[string]any]() *github.com/goplus/xgo/cl/internal/overload/bar.Var__1[T] | value
+010:  7: 6 | bar.Var(bar.M)      *ast.CallExpr                  | value   : *github.com/goplus/xgo/cl/internal/overload/bar.Var__1[github.com/goplus/xgo/cl/internal/overload/bar.M] | value
+011:  7:14 | bar.M               *ast.SelectorExpr              | var     : github.com/goplus/xgo/cl/internal/overload/bar.M | variable
 == defs ==
-000:  4: 5 | a                   | var main.a github.com/goplus/gop/cl/internal/overload/bar.Var__0[int]
-001:  5: 5 | b                   | var main.b github.com/goplus/gop/cl/internal/overload/bar.Var__1[github.com/goplus/gop/cl/internal/overload/bar.M]
-002:  6: 1 | c                   | var c *github.com/goplus/gop/cl/internal/overload/bar.Var__0[string]
+000:  4: 5 | a                   | var main.a github.com/goplus/xgo/cl/internal/overload/bar.Var__0[int]
+001:  5: 5 | b                   | var main.b github.com/goplus/xgo/cl/internal/overload/bar.Var__1[github.com/goplus/xgo/cl/internal/overload/bar.M]
+002:  6: 1 | c                   | var c *github.com/goplus/xgo/cl/internal/overload/bar.Var__0[string]
 003:  6: 1 | main                | func main.main()
-004:  7: 1 | d                   | var d *github.com/goplus/gop/cl/internal/overload/bar.Var__1[github.com/goplus/gop/cl/internal/overload/bar.M]
+004:  7: 1 | d                   | var d *github.com/goplus/xgo/cl/internal/overload/bar.Var__1[github.com/goplus/xgo/cl/internal/overload/bar.M]
 == uses ==
-000:  4: 7 | bar                 | package bar ("github.com/goplus/gop/cl/internal/overload/bar")
-001:  4:11 | Var                 | type github.com/goplus/gop/cl/internal/overload/bar.Var__0[T github.com/goplus/gop/cl/internal/overload/bar.basetype] struct{val T}
+000:  4: 7 | bar                 | package bar ("github.com/goplus/xgo/cl/internal/overload/bar")
+001:  4:11 | Var                 | type github.com/goplus/xgo/cl/internal/overload/bar.Var__0[T github.com/goplus/xgo/cl/internal/overload/bar.basetype] struct{val T}
 002:  4:15 | int                 | type int
-003:  5: 7 | bar                 | package bar ("github.com/goplus/gop/cl/internal/overload/bar")
-004:  5:11 | Var                 | type github.com/goplus/gop/cl/internal/overload/bar.Var__1[T map[string]any] struct{val T}
-005:  5:15 | bar                 | package bar ("github.com/goplus/gop/cl/internal/overload/bar")
-006:  5:19 | M                   | type github.com/goplus/gop/cl/internal/overload/bar.M = map[string]any
-007:  6: 6 | bar                 | package bar ("github.com/goplus/gop/cl/internal/overload/bar")
-008:  6:10 | Var                 | func github.com/goplus/gop/cl/internal/overload/bar.Gopx_Var_Cast__0[T github.com/goplus/gop/cl/internal/overload/bar.basetype]() *github.com/goplus/gop/cl/internal/overload/bar.Var__0[T]
+003:  5: 7 | bar                 | package bar ("github.com/goplus/xgo/cl/internal/overload/bar")
+004:  5:11 | Var                 | type github.com/goplus/xgo/cl/internal/overload/bar.Var__1[T map[string]any] struct{val T}
+005:  5:15 | bar                 | package bar ("github.com/goplus/xgo/cl/internal/overload/bar")
+006:  5:19 | M                   | type github.com/goplus/xgo/cl/internal/overload/bar.M = map[string]any
+007:  6: 6 | bar                 | package bar ("github.com/goplus/xgo/cl/internal/overload/bar")
+008:  6:10 | Var                 | func github.com/goplus/xgo/cl/internal/overload/bar.Gopx_Var_Cast__0[T github.com/goplus/xgo/cl/internal/overload/bar.basetype]() *github.com/goplus/xgo/cl/internal/overload/bar.Var__0[T]
 009:  6:14 | string              | type string
-010:  7: 6 | bar                 | package bar ("github.com/goplus/gop/cl/internal/overload/bar")
-011:  7:10 | Var                 | func github.com/goplus/gop/cl/internal/overload/bar.Gopx_Var_Cast__1[T map[string]any]() *github.com/goplus/gop/cl/internal/overload/bar.Var__1[T]
-012:  7:14 | bar                 | package bar ("github.com/goplus/gop/cl/internal/overload/bar")
-013:  7:18 | M                   | type github.com/goplus/gop/cl/internal/overload/bar.M = map[string]any
+010:  7: 6 | bar                 | package bar ("github.com/goplus/xgo/cl/internal/overload/bar")
+011:  7:10 | Var                 | func github.com/goplus/xgo/cl/internal/overload/bar.Gopx_Var_Cast__1[T map[string]any]() *github.com/goplus/xgo/cl/internal/overload/bar.Var__1[T]
+012:  7:14 | bar                 | package bar ("github.com/goplus/xgo/cl/internal/overload/bar")
+013:  7:18 | M                   | type github.com/goplus/xgo/cl/internal/overload/bar.M = map[string]any
 == overloads ==
-000:  4:11 | Var                 | type github.com/goplus/gop/cl/internal/overload/bar.Var = func(__gop_overload_args__ interface{_()})
-001:  5:11 | Var                 | type github.com/goplus/gop/cl/internal/overload/bar.Var = func(__gop_overload_args__ interface{_()})
-002:  6:10 | Var                 | type github.com/goplus/gop/cl/internal/overload/bar.Var = func(__gop_overload_args__ interface{_()})
-003:  7:10 | Var                 | type github.com/goplus/gop/cl/internal/overload/bar.Var = func(__gop_overload_args__ interface{_()})`
+000:  4:11 | Var                 | type github.com/goplus/xgo/cl/internal/overload/bar.Var = func(__gop_overload_args__ interface{_()})
+001:  5:11 | Var                 | type github.com/goplus/xgo/cl/internal/overload/bar.Var = func(__gop_overload_args__ interface{_()})
+002:  6:10 | Var                 | type github.com/goplus/xgo/cl/internal/overload/bar.Var = func(__gop_overload_args__ interface{_()})
+003:  7:10 | Var                 | type github.com/goplus/xgo/cl/internal/overload/bar.Var = func(__gop_overload_args__ interface{_()})`
 	} else {
 		expect = `== types ==
-000:  4: 7 | bar.Var             *ast.SelectorExpr              | type    : github.com/goplus/gop/cl/internal/overload/bar.Var__0[int] | type
-001:  4: 7 | bar.Var[int]        *ast.IndexExpr                 | type    : github.com/goplus/gop/cl/internal/overload/bar.Var__0[int] | type
+000:  4: 7 | bar.Var             *ast.SelectorExpr              | type    : github.com/goplus/xgo/cl/internal/overload/bar.Var__0[int] | type
+001:  4: 7 | bar.Var[int]        *ast.IndexExpr                 | type    : github.com/goplus/xgo/cl/internal/overload/bar.Var__0[int] | type
 002:  4:15 | int                 *ast.Ident                     | type    : int | type
-003:  5: 7 | bar.Var             *ast.SelectorExpr              | type    : github.com/goplus/gop/cl/internal/overload/bar.Var__1[map[string]any] | type
-004:  5: 7 | bar.Var[bar.M]      *ast.IndexExpr                 | type    : github.com/goplus/gop/cl/internal/overload/bar.Var__1[map[string]any] | type
+003:  5: 7 | bar.Var             *ast.SelectorExpr              | type    : github.com/goplus/xgo/cl/internal/overload/bar.Var__1[map[string]any] | type
+004:  5: 7 | bar.Var[bar.M]      *ast.IndexExpr                 | type    : github.com/goplus/xgo/cl/internal/overload/bar.Var__1[map[string]any] | type
 005:  5:15 | bar.M               *ast.SelectorExpr              | type    : map[string]any | type
-006:  6: 6 | bar.Var             *ast.SelectorExpr              | value   : func[T github.com/goplus/gop/cl/internal/overload/bar.basetype]() *github.com/goplus/gop/cl/internal/overload/bar.Var__0[T] | value
-007:  6: 6 | bar.Var(string)     *ast.CallExpr                  | value   : *github.com/goplus/gop/cl/internal/overload/bar.Var__0[string] | value
+006:  6: 6 | bar.Var             *ast.SelectorExpr              | value   : func[T github.com/goplus/xgo/cl/internal/overload/bar.basetype]() *github.com/goplus/xgo/cl/internal/overload/bar.Var__0[T] | value
+007:  6: 6 | bar.Var(string)     *ast.CallExpr                  | value   : *github.com/goplus/xgo/cl/internal/overload/bar.Var__0[string] | value
 008:  6:14 | string              *ast.Ident                     | type    : string | type
-009:  7: 6 | bar.Var             *ast.SelectorExpr              | value   : func[T map[string]any]() *github.com/goplus/gop/cl/internal/overload/bar.Var__1[T] | value
-010:  7: 6 | bar.Var(bar.M)      *ast.CallExpr                  | value   : *github.com/goplus/gop/cl/internal/overload/bar.Var__1[map[string]any] | value
+009:  7: 6 | bar.Var             *ast.SelectorExpr              | value   : func[T map[string]any]() *github.com/goplus/xgo/cl/internal/overload/bar.Var__1[T] | value
+010:  7: 6 | bar.Var(bar.M)      *ast.CallExpr                  | value   : *github.com/goplus/xgo/cl/internal/overload/bar.Var__1[map[string]any] | value
 011:  7:14 | bar.M               *ast.SelectorExpr              | var     : map[string]any | variable
 == defs ==
-000:  4: 5 | a                   | var main.a github.com/goplus/gop/cl/internal/overload/bar.Var__0[int]
-001:  5: 5 | b                   | var main.b github.com/goplus/gop/cl/internal/overload/bar.Var__1[map[string]any]
-002:  6: 1 | c                   | var c *github.com/goplus/gop/cl/internal/overload/bar.Var__0[string]
+000:  4: 5 | a                   | var main.a github.com/goplus/xgo/cl/internal/overload/bar.Var__0[int]
+001:  5: 5 | b                   | var main.b github.com/goplus/xgo/cl/internal/overload/bar.Var__1[map[string]any]
+002:  6: 1 | c                   | var c *github.com/goplus/xgo/cl/internal/overload/bar.Var__0[string]
 003:  6: 1 | main                | func main.main()
-004:  7: 1 | d                   | var d *github.com/goplus/gop/cl/internal/overload/bar.Var__1[map[string]any]
+004:  7: 1 | d                   | var d *github.com/goplus/xgo/cl/internal/overload/bar.Var__1[map[string]any]
 == uses ==
-000:  4: 7 | bar                 | package bar ("github.com/goplus/gop/cl/internal/overload/bar")
-001:  4:11 | Var                 | type github.com/goplus/gop/cl/internal/overload/bar.Var__0[T github.com/goplus/gop/cl/internal/overload/bar.basetype] struct{val T}
+000:  4: 7 | bar                 | package bar ("github.com/goplus/xgo/cl/internal/overload/bar")
+001:  4:11 | Var                 | type github.com/goplus/xgo/cl/internal/overload/bar.Var__0[T github.com/goplus/xgo/cl/internal/overload/bar.basetype] struct{val T}
 002:  4:15 | int                 | type int
-003:  5: 7 | bar                 | package bar ("github.com/goplus/gop/cl/internal/overload/bar")
-004:  5:11 | Var                 | type github.com/goplus/gop/cl/internal/overload/bar.Var__1[T map[string]any] struct{val T}
-005:  5:15 | bar                 | package bar ("github.com/goplus/gop/cl/internal/overload/bar")
-006:  5:19 | M                   | type github.com/goplus/gop/cl/internal/overload/bar.M = map[string]any
-007:  6: 6 | bar                 | package bar ("github.com/goplus/gop/cl/internal/overload/bar")
-008:  6:10 | Var                 | func github.com/goplus/gop/cl/internal/overload/bar.Gopx_Var_Cast__0[T github.com/goplus/gop/cl/internal/overload/bar.basetype]() *github.com/goplus/gop/cl/internal/overload/bar.Var__0[T]
+003:  5: 7 | bar                 | package bar ("github.com/goplus/xgo/cl/internal/overload/bar")
+004:  5:11 | Var                 | type github.com/goplus/xgo/cl/internal/overload/bar.Var__1[T map[string]any] struct{val T}
+005:  5:15 | bar                 | package bar ("github.com/goplus/xgo/cl/internal/overload/bar")
+006:  5:19 | M                   | type github.com/goplus/xgo/cl/internal/overload/bar.M = map[string]any
+007:  6: 6 | bar                 | package bar ("github.com/goplus/xgo/cl/internal/overload/bar")
+008:  6:10 | Var                 | func github.com/goplus/xgo/cl/internal/overload/bar.Gopx_Var_Cast__0[T github.com/goplus/xgo/cl/internal/overload/bar.basetype]() *github.com/goplus/xgo/cl/internal/overload/bar.Var__0[T]
 009:  6:14 | string              | type string
-010:  7: 6 | bar                 | package bar ("github.com/goplus/gop/cl/internal/overload/bar")
-011:  7:10 | Var                 | func github.com/goplus/gop/cl/internal/overload/bar.Gopx_Var_Cast__1[T map[string]any]() *github.com/goplus/gop/cl/internal/overload/bar.Var__1[T]
-012:  7:14 | bar                 | package bar ("github.com/goplus/gop/cl/internal/overload/bar")
-013:  7:18 | M                   | type github.com/goplus/gop/cl/internal/overload/bar.M = map[string]any
+010:  7: 6 | bar                 | package bar ("github.com/goplus/xgo/cl/internal/overload/bar")
+011:  7:10 | Var                 | func github.com/goplus/xgo/cl/internal/overload/bar.Gopx_Var_Cast__1[T map[string]any]() *github.com/goplus/xgo/cl/internal/overload/bar.Var__1[T]
+012:  7:14 | bar                 | package bar ("github.com/goplus/xgo/cl/internal/overload/bar")
+013:  7:18 | M                   | type github.com/goplus/xgo/cl/internal/overload/bar.M = map[string]any
 == overloads ==
-000:  4:11 | Var                 | type github.com/goplus/gop/cl/internal/overload/bar.Var = func(__gop_overload_args__ interface{_()})
-001:  5:11 | Var                 | type github.com/goplus/gop/cl/internal/overload/bar.Var = func(__gop_overload_args__ interface{_()})
-002:  6:10 | Var                 | type github.com/goplus/gop/cl/internal/overload/bar.Var = func(__gop_overload_args__ interface{_()})
-003:  7:10 | Var                 | type github.com/goplus/gop/cl/internal/overload/bar.Var = func(__gop_overload_args__ interface{_()})`
+000:  4:11 | Var                 | type github.com/goplus/xgo/cl/internal/overload/bar.Var = func(__gop_overload_args__ interface{_()})
+001:  5:11 | Var                 | type github.com/goplus/xgo/cl/internal/overload/bar.Var = func(__gop_overload_args__ interface{_()})
+002:  6:10 | Var                 | type github.com/goplus/xgo/cl/internal/overload/bar.Var = func(__gop_overload_args__ interface{_()})
+003:  7:10 | Var                 | type github.com/goplus/xgo/cl/internal/overload/bar.Var = func(__gop_overload_args__ interface{_()})`
 	}
 	testGopInfo(t, `
-import "github.com/goplus/gop/cl/internal/overload/bar"
+import "github.com/goplus/xgo/cl/internal/overload/bar"
 
 var a bar.Var[int]
 var b bar.Var[bar.M]
@@ -1836,22 +1836,22 @@ func onCloned() {
 006: 11: 6 | onInit              | func (*main.Kai).onInit()
 007: 18: 6 | onCloned            | func (*main.Kai).onCloned()
 == uses ==
-000:  0: 0 | Kai                 | type main.Kai struct{github.com/goplus/gop/cl/internal/spx.Sprite; *main.MyGame; a int}
-001:  0: 0 | MyGame              | type main.MyGame struct{*github.com/goplus/gop/cl/internal/spx.MyGame}
+000:  0: 0 | Kai                 | type main.Kai struct{github.com/goplus/xgo/cl/internal/spx.Sprite; *main.MyGame; a int}
+001:  0: 0 | MyGame              | type main.MyGame struct{*github.com/goplus/xgo/cl/internal/spx.MyGame}
 002:  3: 4 | int                 | type int
 003:  7: 4 | int                 | type int
 004:  8: 4 | int                 | type int
 005: 12: 2 | a                   | field a int
-006: 13: 2 | clone               | func github.com/goplus/gop/cl/internal/spx.Gopt_Sprite_Clone__0(sprite any)
-007: 14: 2 | clone               | func github.com/goplus/gop/cl/internal/spx.Gopt_Sprite_Clone__1(sprite any, data any)
+006: 13: 2 | clone               | func github.com/goplus/xgo/cl/internal/spx.Gopt_Sprite_Clone__0(sprite any)
+007: 14: 2 | clone               | func github.com/goplus/xgo/cl/internal/spx.Gopt_Sprite_Clone__1(sprite any, data any)
 008: 14: 8 | info                | type main.info struct{x int; y int}
-009: 15: 2 | clone               | func github.com/goplus/gop/cl/internal/spx.Gopt_Sprite_Clone__1(sprite any, data any)
+009: 15: 2 | clone               | func github.com/goplus/xgo/cl/internal/spx.Gopt_Sprite_Clone__1(sprite any, data any)
 010: 15: 9 | info                | type main.info struct{x int; y int}
-011: 19: 2 | say                 | func (*github.com/goplus/gop/cl/internal/spx.Sprite).Say(msg string, secs ...float64)
+011: 19: 2 | say                 | func (*github.com/goplus/xgo/cl/internal/spx.Sprite).Say(msg string, secs ...float64)
 == overloads ==
-000: 13: 2 | clone               | func (github.com/goplus/gop/cl/internal/spx.Sprite).Clone(__gop_overload_args__ interface{_()})
-001: 14: 2 | clone               | func (github.com/goplus/gop/cl/internal/spx.Sprite).Clone(__gop_overload_args__ interface{_()})
-002: 15: 2 | clone               | func (github.com/goplus/gop/cl/internal/spx.Sprite).Clone(__gop_overload_args__ interface{_()})`)
+000: 13: 2 | clone               | func (github.com/goplus/xgo/cl/internal/spx.Sprite).Clone(__gop_overload_args__ interface{_()})
+001: 14: 2 | clone               | func (github.com/goplus/xgo/cl/internal/spx.Sprite).Clone(__gop_overload_args__ interface{_()})
+002: 15: 2 | clone               | func (github.com/goplus/xgo/cl/internal/spx.Sprite).Clone(__gop_overload_args__ interface{_()})`)
 }
 
 func TestScopesInfo(t *testing.T) {
@@ -2125,7 +2125,7 @@ func _() {
 
 func TestMixedPackage(t *testing.T) {
 	fset := token.NewFileSet()
-	pkg, _, _, err := parseMixedSource(gopmod.Default, fset, "main.xgo", `
+	pkg, _, _, err := parseMixedSource(xgomod.Default, fset, "main.xgo", `
 Test
 Test 100
 var n N