Skip to content

Commit

Permalink
gogensig:mv change pkg origin
Browse files Browse the repository at this point in the history
  • Loading branch information
luoliwoshang committed Nov 27, 2024
1 parent d431f81 commit e80391e
Show file tree
Hide file tree
Showing 29 changed files with 98 additions and 72 deletions.
4 changes: 2 additions & 2 deletions cmd/gogensig/config/conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
"sort"
"strings"

"github.com/goplus/llgo/chore/gogensig/unmarshal"
cppgtypes "github.com/goplus/llgo/chore/llcppg/types"
"github.com/goplus/llcppg/cmd/gogensig/unmarshal"
cppgtypes "github.com/goplus/llcppg/types"
)

// llcppg.cfg
Expand Down
4 changes: 2 additions & 2 deletions cmd/gogensig/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"testing"

"github.com/google/go-cmp/cmp"
"github.com/goplus/llgo/chore/gogensig/config"
cppgtypes "github.com/goplus/llgo/chore/llcppg/types"
"github.com/goplus/llcppg/cmd/gogensig/config"
cppgtypes "github.com/goplus/llcppg/types"
)

func TestLookupSymbolOK(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions cmd/gogensig/convert/_comment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package convert_test
import (
"testing"

"github.com/goplus/llgo/chore/gogensig/cmptest"
"github.com/goplus/llgo/chore/gogensig/config"
cppgtypes "github.com/goplus/llgo/chore/llcppg/types"
"github.com/goplus/llcppg/cmd/gogensig/cmptest"
"github.com/goplus/llcppg/cmd/gogensig/config"
cppgtypes "github.com/goplus/llcppg/types"
)

// TODO
Expand Down
2 changes: 1 addition & 1 deletion cmd/gogensig/convert/_testdata/_depcjson/conf/llcppg.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
"include": ["temp.h"],
"cflags" :"$(pkg-config --cflags libcjson)",
"cplusplus":false,
"deps": ["github.com/goplus/llgo/chore/gogensig/convert/testdata/cjson"]
"deps": ["github.com/goplus/llcppg/cmd/gogensig/convert/testdata/cjson"]
}
2 changes: 1 addition & 1 deletion cmd/gogensig/convert/_testdata/_depcjson/gogensig.expect
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package _depcjson

import (
"github.com/goplus/llgo/c"
"github.com/goplus/llgo/chore/gogensig/convert/testdata/cjson"
"github.com/goplus/llcppg/cmd/gogensig/convert/testdata/cjson"
_ "unsafe"
)
//go:linkname CreateResponse C.create_response
Expand Down
4 changes: 2 additions & 2 deletions cmd/gogensig/convert/ast.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
This file is used to convert ast
from "github.com/goplus/llgo/chore/llcppg/ast" to "go/ast"
from "github.com/goplus/llcppg/ast" to "go/ast"
*/
package convert

Expand All @@ -9,7 +9,7 @@ import (
goast "go/ast"
"go/token"

"github.com/goplus/llgo/chore/llcppg/ast"
"github.com/goplus/llcppg/ast"
)

type ConvertComment struct {
Expand Down
4 changes: 2 additions & 2 deletions cmd/gogensig/convert/ast_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
goast "go/ast"
"testing"

"github.com/goplus/llgo/chore/gogensig/convert"
"github.com/goplus/llgo/chore/llcppg/ast"
"github.com/goplus/llcppg/ast"
"github.com/goplus/llcppg/cmd/gogensig/convert"
)

func TestConvertCommentGroupOK(t *testing.T) {
Expand Down
8 changes: 4 additions & 4 deletions cmd/gogensig/convert/basic/basic.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package basic

import (
"github.com/goplus/llgo/chore/gogensig/convert"
"github.com/goplus/llgo/chore/gogensig/processor"
"github.com/goplus/llgo/chore/gogensig/unmarshal"
"github.com/goplus/llgo/chore/gogensig/visitor"
"github.com/goplus/llcppg/cmd/gogensig/convert"
"github.com/goplus/llcppg/cmd/gogensig/processor"
"github.com/goplus/llcppg/cmd/gogensig/unmarshal"
"github.com/goplus/llcppg/cmd/gogensig/visitor"
)

// For a default full convert processing,for main logic
Expand Down
2 changes: 1 addition & 1 deletion cmd/gogensig/convert/builtin.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"go/types"

"github.com/goplus/gogen"
"github.com/goplus/llgo/chore/llcppg/ast"
"github.com/goplus/llcppg/ast"
)

type BuiltinTypeMap struct {
Expand Down
4 changes: 2 additions & 2 deletions cmd/gogensig/convert/builtin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"go/types"
"testing"

"github.com/goplus/llgo/chore/gogensig/convert"
"github.com/goplus/llgo/chore/llcppg/ast"
"github.com/goplus/llcppg/ast"
"github.com/goplus/llcppg/cmd/gogensig/convert"
)

func TestBuiltinType(t *testing.T) {
Expand Down
8 changes: 4 additions & 4 deletions cmd/gogensig/convert/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"errors"
"log"

cfg "github.com/goplus/llgo/chore/gogensig/config"
"github.com/goplus/llgo/chore/gogensig/visitor"
"github.com/goplus/llgo/chore/llcppg/ast"
cppgtypes "github.com/goplus/llgo/chore/llcppg/types"
"github.com/goplus/llcppg/ast"
cfg "github.com/goplus/llcppg/cmd/gogensig/config"
"github.com/goplus/llcppg/cmd/gogensig/visitor"
cppgtypes "github.com/goplus/llcppg/types"
)

type AstConvert struct {
Expand Down
10 changes: 5 additions & 5 deletions cmd/gogensig/convert/convert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import (
"strings"
"testing"

"github.com/goplus/llgo/chore/gogensig/config"
"github.com/goplus/llgo/chore/gogensig/convert"
"github.com/goplus/llgo/chore/gogensig/convert/basic"
"github.com/goplus/llgo/chore/gogensig/unmarshal"
"github.com/goplus/llgo/chore/llcppg/ast"
"github.com/goplus/llcppg/ast"
"github.com/goplus/llcppg/cmd/gogensig/config"
"github.com/goplus/llcppg/cmd/gogensig/convert"
"github.com/goplus/llcppg/cmd/gogensig/convert/basic"
"github.com/goplus/llcppg/cmd/gogensig/unmarshal"
"github.com/goplus/llgo/xtool/env"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/gogensig/convert/deps/deps.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"errors"
"path/filepath"

"github.com/goplus/llgo/chore/gogensig/config"
"github.com/goplus/llcppg/cmd/gogensig/config"
"github.com/goplus/mod/gopmod"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/gogensig/convert/expr.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strconv"

"github.com/goplus/llgo/chore/llcppg/ast"
"github.com/goplus/llcppg/ast"
)

type ConvertExpr struct {
Expand Down
4 changes: 2 additions & 2 deletions cmd/gogensig/convert/expr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"testing"

"github.com/google/go-cmp/cmp"
"github.com/goplus/llgo/chore/gogensig/convert"
"github.com/goplus/llgo/chore/llcppg/ast"
"github.com/goplus/llcppg/ast"
"github.com/goplus/llcppg/cmd/gogensig/convert"
)

func TestBasicLitFail(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/gogensig/convert/headerfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"log"

"github.com/goplus/llgo/chore/gogensig/convert/names"
"github.com/goplus/llcppg/cmd/gogensig/convert/names"
)

type HeaderFile struct {
Expand Down
12 changes: 6 additions & 6 deletions cmd/gogensig/convert/package.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import (
"regexp"

"github.com/goplus/gogen"
"github.com/goplus/llgo/chore/_xtool/llcppsymg/config/cfgparse"
cfg "github.com/goplus/llgo/chore/gogensig/config"
"github.com/goplus/llgo/chore/gogensig/convert/deps"
"github.com/goplus/llgo/chore/gogensig/convert/names"
"github.com/goplus/llgo/chore/llcppg/ast"
cppgtypes "github.com/goplus/llgo/chore/llcppg/types"
"github.com/goplus/llcppg/_xtool/llcppsymg/config/cfgparse"
"github.com/goplus/llcppg/ast"
cfg "github.com/goplus/llcppg/cmd/gogensig/config"
"github.com/goplus/llcppg/cmd/gogensig/convert/deps"
"github.com/goplus/llcppg/cmd/gogensig/convert/names"
cppgtypes "github.com/goplus/llcppg/types"
)

const (
Expand Down
12 changes: 6 additions & 6 deletions cmd/gogensig/convert/package_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import (
"testing"

"github.com/goplus/gogen"
"github.com/goplus/llgo/chore/gogensig/cmp"
cfg "github.com/goplus/llgo/chore/gogensig/config"
"github.com/goplus/llgo/chore/gogensig/convert"
"github.com/goplus/llgo/chore/gogensig/convert/names"
"github.com/goplus/llgo/chore/llcppg/ast"
cppgtypes "github.com/goplus/llgo/chore/llcppg/types"
"github.com/goplus/llcppg/ast"
"github.com/goplus/llcppg/cmd/gogensig/cmp"
cfg "github.com/goplus/llcppg/cmd/gogensig/config"
"github.com/goplus/llcppg/cmd/gogensig/convert"
"github.com/goplus/llcppg/cmd/gogensig/convert/names"
cppgtypes "github.com/goplus/llcppg/types"
)

func init() {
Expand Down
8 changes: 4 additions & 4 deletions cmd/gogensig/convert/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
"unsafe"

"github.com/goplus/gogen"
"github.com/goplus/llgo/chore/gogensig/config"
"github.com/goplus/llgo/chore/gogensig/convert/names"
"github.com/goplus/llgo/chore/gogensig/convert/sizes"
"github.com/goplus/llgo/chore/llcppg/ast"
"github.com/goplus/llcppg/ast"
"github.com/goplus/llcppg/cmd/gogensig/config"
"github.com/goplus/llcppg/cmd/gogensig/convert/names"
"github.com/goplus/llcppg/cmd/gogensig/convert/sizes"
)

type HeaderInfo struct {
Expand Down
6 changes: 3 additions & 3 deletions cmd/gogensig/convert/type_builtin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"testing"

"github.com/goplus/gogen"
"github.com/goplus/llgo/chore/gogensig/config"
"github.com/goplus/llgo/chore/llcppg/ast"
cppgtypes "github.com/goplus/llgo/chore/llcppg/types"
"github.com/goplus/llcppg/ast"
"github.com/goplus/llcppg/cmd/gogensig/config"
cppgtypes "github.com/goplus/llcppg/types"
)

func TestIdentRef(t *testing.T) {
Expand Down
8 changes: 4 additions & 4 deletions cmd/gogensig/gogensig.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import (
"os"
"path/filepath"

"github.com/goplus/llgo/chore/gogensig/config"
"github.com/goplus/llgo/chore/gogensig/convert"
"github.com/goplus/llgo/chore/gogensig/convert/basic"
"github.com/goplus/llgo/chore/gogensig/unmarshal"
"github.com/goplus/llcppg/cmd/gogensig/config"
"github.com/goplus/llcppg/cmd/gogensig/convert"
"github.com/goplus/llcppg/cmd/gogensig/convert/basic"
"github.com/goplus/llcppg/cmd/gogensig/unmarshal"
)

func runGoCmds(wd, pkg string) {
Expand Down
8 changes: 4 additions & 4 deletions cmd/gogensig/processor/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package processor
import (
"fmt"

"github.com/goplus/llgo/chore/gogensig/config"
"github.com/goplus/llgo/chore/gogensig/unmarshal"
"github.com/goplus/llgo/chore/gogensig/visitor"
"github.com/goplus/llgo/chore/llcppg/ast"
"github.com/goplus/llcppg/ast"
"github.com/goplus/llcppg/cmd/gogensig/config"
"github.com/goplus/llcppg/cmd/gogensig/unmarshal"
"github.com/goplus/llcppg/cmd/gogensig/visitor"
)

type DocVisitorManager struct {
Expand Down
14 changes: 7 additions & 7 deletions cmd/gogensig/processor/processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import (
"reflect"
"testing"

"github.com/goplus/llgo/chore/gogensig/config"
"github.com/goplus/llgo/chore/gogensig/convert"
"github.com/goplus/llgo/chore/gogensig/convert/basic"
"github.com/goplus/llgo/chore/gogensig/processor"
"github.com/goplus/llgo/chore/gogensig/unmarshal"
"github.com/goplus/llgo/chore/gogensig/visitor"
"github.com/goplus/llgo/chore/llcppg/ast"
"github.com/goplus/llcppg/ast"
"github.com/goplus/llcppg/cmd/gogensig/config"
"github.com/goplus/llcppg/cmd/gogensig/convert"
"github.com/goplus/llcppg/cmd/gogensig/convert/basic"
"github.com/goplus/llcppg/cmd/gogensig/processor"
"github.com/goplus/llcppg/cmd/gogensig/unmarshal"
"github.com/goplus/llcppg/cmd/gogensig/visitor"
)

func TestProcessValidSigfetchContent(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/gogensig/unmarshal/unmarshal.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"os"

"github.com/goplus/llgo/chore/llcppg/ast"
"github.com/goplus/llcppg/ast"
)

type NodeUnmarshaler func(data []byte) (ast.Node, error)
Expand Down
4 changes: 2 additions & 2 deletions cmd/gogensig/unmarshal/unmarshal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"strings"
"testing"

"github.com/goplus/llgo/chore/gogensig/unmarshal"
"github.com/goplus/llgo/chore/llcppg/ast"
"github.com/goplus/llcppg/ast"
"github.com/goplus/llcppg/cmd/gogensig/unmarshal"
)

func TestUnmarshalNode(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/gogensig/visitor/ast_visitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package visitor
import (
"fmt"

"github.com/goplus/llgo/chore/llcppg/ast"
"github.com/goplus/llcppg/ast"
)

type DocVisitor interface {
Expand Down
12 changes: 12 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,15 @@ module github.com/goplus/llcppg
go 1.20

require github.com/goplus/llgo v0.9.8-0.20241127093550-38a7f4f7d589
require (
github.com/google/go-cmp v0.6.0
github.com/goplus/gogen v1.16.3
github.com/goplus/llgo v0.9.7
github.com/goplus/mod v0.13.12
)

require (
github.com/qiniu/x v1.13.10 // indirect
golang.org/x/mod v0.19.0 // indirect
golang.org/x/tools v0.19.0 // indirect
)
13 changes: 13 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/goplus/gogen v1.16.3 h1:nNkV1b6zd89d/UhMb4bZHcEfdAHtPaadrJFXNcoUITI=
github.com/goplus/gogen v1.16.3/go.mod h1:6TQYbabXDF9LCdDkOOzHmfg1R4ENfXQ3XpHa9RhTSD8=
github.com/goplus/llgo v0.9.7 h1:LRF2Fq9ts4QrVxOPZufexalbIoJ1oiBERjCWQ45wxbg=
github.com/goplus/llgo v0.9.7/go.mod h1:5Fs+08NslqofJ7xtOiIXugkurYOoQvY02ZkFNWA1uEI=
github.com/goplus/llgo v0.9.8-0.20241127093550-38a7f4f7d589 h1:u0aqHCN6z+Md1FYB052ROjP/6PVlFBtWWuTi/LGuifs=
github.com/goplus/llgo v0.9.8-0.20241127093550-38a7f4f7d589/go.mod h1:1phqPJEgr/uw59PRz/NB7s54OoP+NGjC6pz0HovT5JY=
github.com/goplus/mod v0.13.12 h1:Trwk6j3i9VvBuW6/9ZxmkoFlEL2v3HKQu0Na1c6DAdw=
github.com/goplus/mod v0.13.12/go.mod h1:fyCcoiL02uUQK9CWxGK9pQzuJT+rZIvRKaaG+hSa2bk=
github.com/qiniu/x v1.13.10 h1:J4Z3XugYzAq85SlyAfqlKVrbf05glMbAOh+QncsDQpE=
github.com/qiniu/x v1.13.10/go.mod h1:INZ2TSWSJVWO/RuELQROERcslBwVgFG7MkTfEdaQz9E=
golang.org/x/mod v0.19.0 h1:fEdghXQSo20giMthA7cd28ZC+jts4amQ3YMXiP5oMQ8=
golang.org/x/mod v0.19.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
golang.org/x/tools v0.19.0 h1:tfGCXNR1OsFG+sVdLAitlpjAvD/I6dHDKnYrpEZUHkw=
golang.org/x/tools v0.19.0/go.mod h1:qoJWxmGSIBmAeriMx19ogtrEPrGtDbPK634QFIcLAhc=
1 change: 1 addition & 0 deletions types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ type Config struct {
CFlags string `json:"cflags"`
Libs string `json:"libs"`
Include []string `json:"include"`
Deps []string `json:"deps"`
TrimPrefixes []string `json:"trimPrefixes"`
Cplusplus bool `json:"cplusplus"`
}
Expand Down

0 comments on commit e80391e

Please sign in to comment.