Skip to content

modfile,xgomod: support AutoLambdas - #157

Merged
xushiwei merged 5 commits into
goplus:mainfrom
xushiwei:q
Aug 10, 2026
Merged

modfile,xgomod: support AutoLambdas#157
xushiwei merged 5 commits into
goplus:mainfrom
xushiwei:q

Conversation

@xushiwei

@xushiwei xushiwei commented Aug 10, 2026

Copy link
Copy Markdown
Member

@codecov

codecov Bot commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.96%. Comparing base (9d3e55b) to head (f85904c).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #157       +/-   ##
===========================================
+ Coverage   55.89%   76.96%   +21.07%     
===========================================
  Files          13       11        -2     
  Lines        1222      890      -332     
===========================================
+ Hits          683      685        +2     
+ Misses        520      186      -334     
  Partials       19       19               

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review summary

This PR adds an AutoLambdas map[string]int field to Project, introduces ClassInfo (returning the auto-lambda map alongside isProj/ok), and deprecates ClassKind by delegating to it. The deprecation is idiomatic and backward-compatible, and build + go test ./xgomod/ ./modfile/ pass.

Main things to confirm before merge:

  • AutoLambdas is never populated. No directive in parseVerb (modfile/rule.go) assigns it, so ClassInfo always returns a nil map today. This looks like a preparatory step for goplus/xgo#2828 — fine if population lands in a follow-up, but worth stating in the PR description so consumers don't assume the map is live yet.
  • No test asserts the new autoLambdas return value. TestClassfile2 discards it with _ (xgomod/xgomod_test.go:153). Understandable while the field is unpopulated; once a directive fills it, add a fixture and assert the returned map contents.

Inline comments below cover the map-aliasing note and a stale test message. Performance review: no issues.

View job run

Comment thread modfile/rule.go
Comment thread xgomod/classfile.go
Comment thread xgomod/xgomod_test.go Outdated
@xushiwei
xushiwei merged commit ef83a06 into goplus:main Aug 10, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant