modfile,xgomod: support AutoLambdas - #157
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
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:
AutoLambdasis never populated. No directive inparseVerb(modfile/rule.go) assigns it, soClassInfoalways returns anilmap 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
autoLambdasreturn value.TestClassfile2discards 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.