Skip to content
This repository has been archived by the owner on May 18, 2024. It is now read-only.

gox => gogen #241

Merged
merged 2 commits into from
Mar 8, 2024
Merged

gox => gogen #241

merged 2 commits into from
Mar 8, 2024

Conversation

xushiwei
Copy link
Member

@xushiwei xushiwei commented Mar 8, 2024

No description provided.

@@ -131,7 +131,7 @@ func testWith(t *testing.T, name string, fn string, code string, outFunc string,
}
pkg, err := NewPackage("", "main", doc, conf)
check(err)
file := gox.ASTFile(pkg.Package)
file := gogen.ASTFile(pkg.Package)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golangci-lint] SA1019: gogen.ASTFile is deprecated: Use pkg.ASTFile instead. (staticcheck)

If you have any questions about this comment, feel free to raise an issue here:

@@ -67,7 +67,7 @@ func (p Package) InitDependencies() {
switch t := scope.Lookup(uf).Type().(type) {
case *types.Signature:
sig = t
case *gox.SubstType:
case *gogen.SubstType:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golangci-lint] SA1019: gogen.SubstType is deprecated: use TySubst instead of SubstType. (staticcheck)

If you have any questions about this comment, feel free to raise an issue here:

if old != nil {
if t, ok := old.Type().(*gox.SubstType); ok {
if t, ok := old.Type().(*gogen.SubstType); ok {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golangci-lint] SA1019: gogen.SubstType is deprecated: use TySubst instead of SubstType. (staticcheck)

If you have any questions about this comment, feel free to raise an issue here:

@@ -57,7 +57,7 @@ func NewPointer(typ types.Type) types.Type {
return types.Typ[types.UnsafePointer]
}
case *types.Signature:
if gox.IsCSignature(t) {
if gogen.IsCSignature(t) {
return types.NewSignature(nil, t.Params(), t.Results(), t.Variadic())
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golangci-lint] SA1019: types.NewSignature has been deprecated since Go 1.18: Use NewSignatureType instead which allows for type parameters. (staticcheck)

If you have any questions about this comment, feel free to raise an issue here:

@@ -243,7 +243,7 @@ func execProjDone(base string, flags int, conf *c2goConf) {
if pkg := conf.Reused.Pkg(); pkg.IsValid() {
dir := pathutil.Canonical(base, conf.Target.Dir)
os.MkdirAll(dir, 0777)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[golangci-lint] Error return value of os.MkdirAll is not checked (errcheck)

If you have any questions about this comment, feel free to raise an issue here:

@@ -131,7 +131,7 @@ func testWith(t *testing.T, name string, fn string, code string, outFunc string,
}
pkg, err := NewPackage("", "main", doc, conf)
check(err)
file := gox.ASTFile(pkg.Package)
file := gogen.ASTFile(pkg.Package)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[staticcheck] gogen.ASTFile is deprecated: Use pkg.ASTFile instead. (SA1019)

If you have any questions about this comment, feel free to raise an issue here:

@@ -67,7 +67,7 @@ func (p Package) InitDependencies() {
switch t := scope.Lookup(uf).Type().(type) {
case *types.Signature:
sig = t
case *gox.SubstType:
case *gogen.SubstType:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[staticcheck] gogen.SubstType is deprecated: use TySubst instead of SubstType. (SA1019)

If you have any questions about this comment, feel free to raise an issue here:

if old != nil {
if t, ok := old.Type().(*gox.SubstType); ok {
if t, ok := old.Type().(*gogen.SubstType); ok {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[staticcheck] gogen.SubstType is deprecated: use TySubst instead of SubstType. (SA1019)

If you have any questions about this comment, feel free to raise an issue here:

@@ -57,7 +57,7 @@ func NewPointer(typ types.Type) types.Type {
return types.Typ[types.UnsafePointer]
}
case *types.Signature:
if gox.IsCSignature(t) {
if gogen.IsCSignature(t) {
return types.NewSignature(nil, t.Params(), t.Results(), t.Variadic())
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[staticcheck] types.NewSignature has been deprecated since Go 1.18: Use NewSignatureType instead which allows for type parameters. (SA1019)

If you have any questions about this comment, feel free to raise an issue here:

Copy link

codecov bot commented Mar 8, 2024

Codecov Report

Attention: Patch coverage is 91.91919% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 89.13%. Comparing base (32d2563) to head (c42762d).

Files Patch % Lines
cl/blockctx.go 78.94% 3 Missing and 1 partial ⚠️
cl/codebuild.go 93.93% 1 Missing and 1 partial ⚠️
cl/expr.go 90.90% 1 Missing ⚠️
cl/type_and_var.go 93.33% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #241   +/-   ##
=======================================
  Coverage   89.13%   89.13%           
=======================================
  Files          10       10           
  Lines        3517     3517           
=======================================
  Hits         3135     3135           
  Misses        299      299           
  Partials       83       83           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@xushiwei xushiwei merged commit 4ae6565 into goplus:main Mar 8, 2024
4 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant