-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle newly-introduced types.Alias type #286
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #286 +/- ##
=======================================
Coverage 87.91% 87.91%
=======================================
Files 66 66
Lines 7935 7935
=======================================
Hits 6976 6976
Misses 785 785
Partials 174 174 ☔ View full report in Codecov by Sentry. |
Golden TestWarning ❌ NilAway errors reported on stdlib are different. 3211 errors on base branch (main, 045b340) Diffs+ /opt/hostedtoolcache/go/1.23.2/x64/src/internal/unsafeheader/unsafeheader.go:1:1: INTERNAL ERROR(s):
+ nilaway_assertion_analyzer: nilaway_function_analyzer: analyzing function AppendSeq at /opt/hostedtoolcache/go/1.23.2/x64/src/slices/iter.go:49.1: backpropagation across node (/opt/hostedtoolcache/go/1.23.2/x64/src/slices/iter.go:50:6) of type *ast.AssignStmt failed for reason: unrecognized type of rhs in range statement: iter.Seq[E]
+ /opt/hostedtoolcache/go/1.23.2/x64/src/internal/unsafeheader/unsafeheader.go:1:1: INTERNAL ERROR(s):
+ nilaway_assertion_analyzer: nilaway_function_analyzer: analyzing function ExampleChunk at /opt/hostedtoolcache/go/1.23.2/x64/src/slices/example_test.go:388.1: backpropagation across node (/opt/hostedtoolcache/go/1.23.2/x64/src/slices/example_test.go:405:6) of type *ast.AssignStmt failed for reason: unrecognized type of rhs in range statement: iter.Seq[slices_test.People]
+ analyzing function TestValues at /opt/hostedtoolcache/go/1.23.2/x64/src/slices/iter_test.go:58.1: backpropagation across node (/opt/hostedtoolcache/go/1.23.2/x64/src/slices/iter_test.go:66:7) of type *ast.AssignStmt failed for reason: unrecognized type of rhs in range statement: iter.Seq[int]
+ analyzing function TestChunkRange at /opt/hostedtoolcache/go/1.23.2/x64/src/slices/iter_test.go:275.1: backpropagation across node (/opt/hostedtoolcache/go/1.23.2/x64/src/slices/iter_test.go:278:6) of type *ast.AssignStmt failed for reason: unrecognized type of rhs in range statement: iter.Seq[[]int]
+ /opt/hostedtoolcache/go/1.23.2/x64/src/internal/unsafeheader/unsafeheader.go:1:1: INTERNAL ERROR(s):
+ nilaway_assertion_analyzer: nilaway_function_analyzer: analyzing function ExamplePreorder at /opt/hostedtoolcache/go/1.23.2/x64/src/go/ast/example_test.go:143.1: backpropagation across node (/opt/hostedtoolcache/go/1.23.2/x64/src/go/ast/example_test.go:159:6) of type *ast.AssignStmt failed for reason: unrecognized type of rhs in range statement: iter.Seq[go/ast.Node]
+ analyzing function TestPreorderBreak at /opt/hostedtoolcache/go/1.23.2/x64/src/go/ast/walk_test.go:14.1: backpropagation across node (/opt/hostedtoolcache/go/1.23.2/x64/src/go/ast/walk_test.go:28:6) of type *ast.AssignStmt failed for reason: unrecognized type of rhs in range statement: iter.Seq[go/ast.Node]
+ /opt/hostedtoolcache/go/1.23.2/x64/src/internal/unsafeheader/unsafeheader.go:1:1: INTERNAL ERROR(s):
+ nilaway_assertion_analyzer: nilaway_function_analyzer: analyzing function TestKeys at /opt/hostedtoolcache/go/1.23.2/x64/src/maps/iter_test.go:32.1: backpropagation across node (/opt/hostedtoolcache/go/1.23.2/x64/src/maps/iter_test.go:42:7) of type *ast.AssignStmt failed for reason: unrecognized type of rhs in range statement: iter.Seq[int]
+ analyzing function TestValues at /opt/hostedtoolcache/go/1.23.2/x64/src/maps/iter_test.go:52.1: backpropagation across node (/opt/hostedtoolcache/go/1.23.2/x64/src/maps/iter_test.go:62:7) of type *ast.AssignStmt failed for reason: unrecognized type of rhs in range statement: iter.Seq[int]
- /opt/hostedtoolcache/go/1.23.2/x64/src/internal/race/norace.go:1:1: INTERNAL ERROR(s):
- nilaway_assertion_analyzer: nilaway_function_analyzer: analyzing function AppendSeq at /opt/hostedtoolcache/go/1.23.2/x64/src/slices/iter.go:49.1: backpropagation across node (/opt/hostedtoolcache/go/1.23.2/x64/src/slices/iter.go:50:6) of type *ast.AssignStmt failed for reason: unrecognized type of rhs in range statement: iter.Seq[E]
- /opt/hostedtoolcache/go/1.23.2/x64/src/internal/race/norace.go:1:1: INTERNAL ERROR(s):
- nilaway_assertion_analyzer: nilaway_function_analyzer: analyzing function ExampleChunk at /opt/hostedtoolcache/go/1.23.2/x64/src/slices/example_test.go:388.1: backpropagation across node (/opt/hostedtoolcache/go/1.23.2/x64/src/slices/example_test.go:405:6) of type *ast.AssignStmt failed for reason: unrecognized type of rhs in range statement: iter.Seq[slices_test.People]
- analyzing function TestValues at /opt/hostedtoolcache/go/1.23.2/x64/src/slices/iter_test.go:58.1: backpropagation across node (/opt/hostedtoolcache/go/1.23.2/x64/src/slices/iter_test.go:66:7) of type *ast.AssignStmt failed for reason: unrecognized type of rhs in range statement: iter.Seq[int]
- analyzing function TestChunkRange at /opt/hostedtoolcache/go/1.23.2/x64/src/slices/iter_test.go:275.1: backpropagation across node (/opt/hostedtoolcache/go/1.23.2/x64/src/slices/iter_test.go:278:6) of type *ast.AssignStmt failed for reason: unrecognized type of rhs in range statement: iter.Seq[[]int]
- /opt/hostedtoolcache/go/1.23.2/x64/src/internal/race/norace.go:1:1: INTERNAL ERROR(s):
- nilaway_assertion_analyzer: nilaway_function_analyzer: analyzing function ExamplePreorder at /opt/hostedtoolcache/go/1.23.2/x64/src/go/ast/example_test.go:143.1: backpropagation across node (/opt/hostedtoolcache/go/1.23.2/x64/src/go/ast/example_test.go:159:6) of type *ast.AssignStmt failed for reason: unrecognized type of rhs in range statement: iter.Seq[go/ast.Node]
- analyzing function TestPreorderBreak at /opt/hostedtoolcache/go/1.23.2/x64/src/go/ast/walk_test.go:14.1: backpropagation across node (/opt/hostedtoolcache/go/1.23.2/x64/src/go/ast/walk_test.go:28:6) of type *ast.AssignStmt failed for reason: unrecognized type of rhs in range statement: iter.Seq[go/ast.Node]
- /opt/hostedtoolcache/go/1.23.2/x64/src/internal/race/norace.go:1:1: INTERNAL ERROR(s):
- nilaway_assertion_analyzer: nilaway_function_analyzer: analyzing function TestKeys at /opt/hostedtoolcache/go/1.23.2/x64/src/maps/iter_test.go:32.1: backpropagation across node (/opt/hostedtoolcache/go/1.23.2/x64/src/maps/iter_test.go:42:7) of type *ast.AssignStmt failed for reason: unrecognized type of rhs in range statement: iter.Seq[int]
- analyzing function TestValues at /opt/hostedtoolcache/go/1.23.2/x64/src/maps/iter_test.go:52.1: backpropagation across node (/opt/hostedtoolcache/go/1.23.2/x64/src/maps/iter_test.go:62:7) of type *ast.AssignStmt failed for reason: unrecognized type of rhs in range statement: iter.Seq[int] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Could you also add support for iter.Seq
? The golden test is reporting internal errors.
This seems to be a separate issue we should handle, will do that in a follow-up PR :) |
Done in #288 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome. Good to land after the needed support added in #288 .
Go 1.22 [1] introduces a proper
types.Alias
type for type aliases. This PR adds handling (by simply unwrapping alias node - effectively restoring previous behavior) for such a type.Further simplification and refactors will be in future PRs.