-
Notifications
You must be signed in to change notification settings - Fork 562
chore(deps): bump github.com/goplus/gogen from 1.19.6 to 1.19.9-0.20260114155758-01b7b91c31d1 #2532
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
Conversation
Summary of ChangesHello @aofei, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request primarily focuses on updating the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request updates the github.com/goplus/gogen dependency and adapts compileReturnStmt to use a defer statement. This is a solid improvement that ensures Return is always called, preventing spurious 'missing return' errors. I've found a critical bug in the xgo-calc demo where division was incorrectly implemented as addition. Please see the specific comment for details.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2532 +/- ##
=======================================
Coverage 93.98% 93.98%
=======================================
Files 34 34
Lines 9631 9631
=======================================
Hits 9052 9052
Misses 414 414
Partials 165 165 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…60114155758-01b7b91c31d1 This also adapts `compileReturnStmt` to use defer for calling `Return`, ensuring return statements are recorded in AST even when argument compilation fails, preventing spurious "missing return" errors. Updates goplus/gogen#557 Signed-off-by: Aofei Sheng <[email protected]>
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.
Pull request overview
This PR updates the github.com/goplus/gogen dependency from version 1.19.6 to 1.19.9-0.20260114155758-01b7b91c31d1 and fixes a compiler bug where "missing return" errors were incorrectly reported when return statement argument compilation failed. The fix uses a deferred call to ensure return statements are always recorded in the AST for control flow analysis, and includes test updates to add missing return statements that were previously not caught due to the bug.
Changes:
- Bumps
github.com/goplus/gogendependency to version1.19.9-0.20260114155758-01b7b91c31d1 - Refactors
compileReturnStmtto usedeferfor callingctx.cb.Return, ensuring return statements are recorded even when argument compilation fails - Fixes a bug in the calculator demo where division was using addition operator
- Adds
panicstatements for unreachable code paths in the calculator demo - Updates test fixtures to include return statements that were previously missing but uncaught
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| go.mod | Updates gogen dependency version |
| go.sum | Updates checksums for new gogen version |
| cl/stmt.go | Refactors compileReturnStmt to use defer for Return call, ensuring AST recording even on compilation failure |
| demo/xgo-calc/calc.xgo | Fixes division operator bug and adds panic statements for error handling |
| cl/compile_test.go | Adds return statements to test fixtures that were previously missing |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Code Review Summary This PR correctly addresses gogen#557 by using The implementation is sound - the defer pattern matches similar cleanup patterns used elsewhere in All tests pass. LGTM. |
This also adapts
compileReturnStmtto use defer for callingReturn, ensuring return statements are recorded in AST even when argument compilation fails, preventing spurious "missing return" errors.Updates goplus/gogen#557