Skip to content

Commit

Permalink
goplus#1596: gop/x/errors
Browse files Browse the repository at this point in the history
  • Loading branch information
xushiwei committed Jan 6, 2024
1 parent 7b32e03 commit d1bb4a8
Show file tree
Hide file tree
Showing 12 changed files with 346 additions and 18 deletions.
2 changes: 1 addition & 1 deletion build_install_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ import (
"log"
"os"

"github.com/goplus/gop/x/errors"
"github.com/goplus/gop/x/gocmd"
"github.com/qiniu/x/errors"
)

// -----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion cl/compile.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ import (
"github.com/goplus/gop/ast"
"github.com/goplus/gop/ast/fromgo"
"github.com/goplus/gop/token"
"github.com/goplus/gop/x/errors"
"github.com/goplus/gox"
"github.com/goplus/gox/cpackages"
"github.com/goplus/mod/modfile"
"github.com/qiniu/x/errors"
)

type dbgFlags int
Expand Down
18 changes: 9 additions & 9 deletions cl/compile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ import (
"fmt"
"os"
"github.com/goplus/gop/builtin/iox"
"github.com/qiniu/x/errors"
"github.com/goplus/gop/x/errors"
)
func main() {
Expand Down Expand Up @@ -933,7 +933,7 @@ func main() {
import (
"fmt"
"github.com/qiniu/x/errors"
"github.com/goplus/gop/x/errors"
)
func t() (int, int, error) {
Expand Down Expand Up @@ -966,7 +966,7 @@ func main() {
t()!
}`, `package main
import "github.com/qiniu/x/errors"
import "github.com/goplus/gop/x/errors"
func t() error {
return nil
Expand Down Expand Up @@ -1475,8 +1475,8 @@ func foo(script string) {
import (
"fmt"
"github.com/goplus/gop/ast/goptest"
"github.com/qiniu/x/errors"
"github.com/goplus/gop/ast/gopq"
"github.com/goplus/gop/x/errors"
)
func foo(script string) {
Expand Down Expand Up @@ -1509,8 +1509,8 @@ func foo(script string) {
import (
"fmt"
"github.com/goplus/gop/ast/goptest"
"github.com/qiniu/x/errors"
"github.com/goplus/gop/ast/gopq"
"github.com/goplus/gop/x/errors"
)
func foo(script string) {
Expand Down Expand Up @@ -1540,7 +1540,7 @@ func add(x, y string) (int, error) {
import (
"strconv"
"github.com/qiniu/x/errors"
"github.com/goplus/gop/x/errors"
)
func add(x string, y string) (int, error) {
Expand Down Expand Up @@ -1609,7 +1609,7 @@ var ret int = println("Hi")!
import (
"fmt"
"github.com/qiniu/x/errors"
"github.com/goplus/gop/x/errors"
)
var ret int = func() (_gop_ret int) {
Expand All @@ -1633,7 +1633,7 @@ func mkdir(name string) error {
mkdir! "foo"
`, `package main
import "github.com/qiniu/x/errors"
import "github.com/goplus/gop/x/errors"
func mkdir(name string) error {
return nil
Expand Down Expand Up @@ -1661,7 +1661,7 @@ func foo() (func(), error) {
foo()!()
`, `package main
import "github.com/qiniu/x/errors"
import "github.com/goplus/gop/x/errors"
func foo() (func(), error) {
return nil, nil
Expand Down
2 changes: 1 addition & 1 deletion cl/expr.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const (
objCPkgRef
)

const errorPkgPath = "github.com/qiniu/x/errors"
const errorPkgPath = "github.com/goplus/gop/x/errors"

func compileIdent(ctx *blockCtx, ident *ast.Ident, flags int) (pkg *gox.PkgRef, kind int) {
fvalue := (flags&clIdentSelectorExpr) != 0 || (flags&clIdentLHS) == 0
Expand Down
2 changes: 1 addition & 1 deletion cmd/internal/gengo/go.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ import (
"github.com/goplus/gop"
"github.com/goplus/gop/cl"
"github.com/goplus/gop/cmd/internal/base"
"github.com/goplus/gop/x/errors"
"github.com/goplus/gop/x/gopprojs"
"github.com/goplus/gox"
"github.com/qiniu/x/errors"
)

// gop go
Expand Down
2 changes: 1 addition & 1 deletion gengo.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ import (
"strings"
"syscall"

"github.com/goplus/gop/x/errors"
"github.com/goplus/mod/gopmod"
"github.com/goplus/mod/modcache"
"github.com/goplus/mod/modfetch"
"github.com/qiniu/x/errors"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion load.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ import (
"github.com/goplus/gop/parser"
"github.com/goplus/gop/token"
"github.com/goplus/gop/x/c2go"
"github.com/goplus/gop/x/errors"
"github.com/goplus/gop/x/gopenv"
"github.com/goplus/gox"
"github.com/goplus/mod/env"
"github.com/goplus/mod/gopmod"
"github.com/qiniu/x/errors"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion tidy.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ import (
"os"
"os/exec"

"github.com/goplus/gop/x/errors"
"github.com/goplus/mod"
"github.com/goplus/mod/env"
"github.com/goplus/mod/gopmod"
"github.com/goplus/mod/modfetch"
"github.com/qiniu/x/errors"
)

func Tidy(dir string, gop *env.Gop) (err error) {
Expand Down
2 changes: 1 addition & 1 deletion x/build/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ println addSafe("10", "abc")
import (
"fmt"
"strconv"
"github.com/qiniu/x/errors"
"github.com/goplus/gop/x/errors"
)
func add(x string, y string) (int, error) {
Expand Down
Loading

0 comments on commit d1bb4a8

Please sign in to comment.