Skip to content

refactor: standardize yap classfiles on _yap.gox#183

Draft
aofei wants to merge 1 commit intogoplus:mainfrom
aofei:_yap.gox
Draft

refactor: standardize yap classfiles on _yap.gox#183
aofei wants to merge 1 commit intogoplus:mainfrom
aofei:_yap.gox

Conversation

@aofei
Copy link
Member

@aofei aofei commented Mar 18, 2026

Remove the .yap classfile entries from gox.mod and rename the yap demo and test files to _yap.gox so the repository matches the preferred classfile convention.

Update the README, manual, and ytest docs to use _yap.gox examples and xgo commands throughout.

Refresh the checked-in generated files and replace the leftover gop_autogen outputs in ytest/demo/_example with xgo_autogen files by updating the example to use the current bearer auth helper.

Remove the `.yap` classfile entries from `gox.mod` and rename the yap
demo and test files to `_yap.gox` so the repository matches the
preferred classfile convention.

Update the README, manual, and `ytest` docs to use `_yap.gox` examples
and `xgo` commands throughout.

Refresh the checked-in generated files and replace the leftover
`gop_autogen` outputs in `ytest/demo/_example` with `xgo_autogen`
files by updating the example to use the current bearer auth helper.

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
@gemini-code-assist
Copy link

Summary of Changes

Hello, 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 focuses on standardizing the naming convention for yap classfiles, transitioning from the .yap suffix to _yap.gox. This change enhances consistency throughout the project and aligns with preferred classfile conventions. The update encompasses renaming numerous demo and test files, modifying the gox.mod configuration, and updating all relevant documentation and generated code to reflect this new standard.

Highlights

  • Classfile Suffix Standardization: The yap classfile suffix has been standardized from .yap to _yap.gox across the repository for consistency.
  • Configuration and File Renames: The gox.mod file was updated to reflect the new _yap.gox classfile convention, and all .yap demo and test files were renamed accordingly.
  • Documentation and Generated Code Updates: Documentation (README, manual, ytest docs) was updated to refer to the new _yap.gox suffix and xgo commands. Generated gop_autogen files were replaced with xgo_autogen outputs, and ytest examples were updated to use the current bearer authentication helper.

🧠 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 Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a 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 is a significant refactoring to standardize the yap classfile extension to _yap.gox. The changes include renaming numerous .yap files, updating the gox.mod configuration, and modifying documentation (README.md, doc/manual.md) to reflect the new convention and switch from gop to xgo commands. Additionally, autogenerated files have been refreshed across various demo projects, which also includes an update from an oauth2 helper to bearer.New in one of the examples. The changes appear to be consistent and systematically applied across the repository. The refactoring is thorough and aligns with the stated goal of standardizing classfile conventions.

@aofei aofei marked this pull request as ready for review March 18, 2026 07:28
Copilot AI review requested due to automatic review settings March 18, 2026 07:28
@codecov
Copy link

codecov bot commented Mar 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.86%. Comparing base (dcdb56c) to head (e083920).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #183   +/-   ##
=======================================
  Coverage   80.86%   80.86%           
=======================================
  Files           8        8           
  Lines         852      852           
=======================================
  Hits          689      689           
  Misses        133      133           
  Partials       30       30           

☔ View full report in Codecov by Sentry.
📢 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.

@xgopilot
Copy link

xgopilot bot commented Mar 18, 2026

Clean, well-scoped refactor. The rename from .yap_yap.gox is consistent across all demo files, generated code, gox.mod, and documentation. The toolchain migration (gopxgo) and API update (oauth2bearer.New) are correctly applied. Two items worth a second look: the gox.mod consolidation implicitly drops v1 App-based classfile support (noted inline), and cmd/wechat/xgo_autogen.go is a no-op stub whose source is still commented out.

Copy link

Copilot AI left a 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 standardizes YAP classfiles on the _yap.gox suffix and refreshes the repository’s checked-in generated outputs and documentation to match the updated XGo/YAP conventions.

Changes:

  • Update gox.mod to remove legacy .yap entries and standardize the YAP project/classfile suffix on _yap.gox.
  • Rename/introduce demo and ytest classfiles using _yap.gox and refresh corresponding xgo_autogen*.go outputs (including updated //line mappings).
  • Update top-level docs (README/manual/ytest README) to reference _yap.gox examples and use xgo commands consistently; refresh ytest _example to use bearer auth and current matching helpers.

Reviewed changes

Copilot reviewed 19 out of 33 changed files in this pull request and generated no comments.

Show a summary per file
File Description
gox.mod Removes .yap configuration and standardizes YAP classfile configuration on _yap.gox.
README.md Updates docs/links/commands to _yap.gox and xgo workflows.
doc/manual.md Updates classfile suffix explanations and demo links to _yap.gox / xgo.
ytest/README.md Updates example links and installation command to xgo get and _yap.gox filenames.
demo/classfile_hello/xgo_autogen.go Refreshes generated //line references to main_yap.gox.
demo/classfile_hello/main_yap.gox Adds new _yap.gox classfile version of the hello demo.
demo/classfile_blog/xgo_autogen.go Refreshes generated app type/entrypoint and //line references for new _yap.gox demo file.
demo/classfile_blog/main_yap.gox Adds new _yap.gox classfile version of the blog demo entry.
demo/classfile_nestetemplate/xgo_autogen.go Refreshes generated app type/entrypoint and //line references for new _yap.gox demo file.
demo/classfile_nestetemplate/main_yap.gox Adds new _yap.gox classfile version of the nested-template demo entry.
demo/classfile2_static/xgo_autogen.go Refreshes generated //line references to main_yap.gox.
demo/classfile2_static/main_yap.gox Adds new _yap.gox classfile version of the static demo entry.
demo/classfile2_statichttp/xgo_autogen.go Refreshes generated //line references to main_yap.gox.
demo/classfile2_statichttp/main_yap.gox Adds new _yap.gox classfile version of the static-http demo entry.
demo/classfile2_hello/xgo_autogen.go Refreshes generated handler mappings to get_yap.gox / get_p_#id_yap.gox.
demo/classfile2_hello/get_yap.gox Adds new handler classfile in _yap.gox convention.
demo/classfile2_hello/get_p_#id_yap.gox Adds new handler classfile in _yap.gox convention.
demo/classfile2_blog/xgo_autogen.go Refreshes generated handler mappings to get_yap.gox / get_p_#id_yap.gox and main entry to main_yap.gox.
demo/classfile2_blog/main_yap.gox Adds new _yap.gox classfile version of the blog v2 main entry.
demo/classfile2_blog/get_yap.gox Adds new handler classfile in _yap.gox convention.
demo/classfile2_blog/get_p_#id_yap.gox Adds new handler classfile in _yap.gox convention.
ytest/demo/foo/xgo_autogen.go Refreshes generated //line references to get_p_#id_yap.gox.
ytest/demo/foo/get_p_#id_yap.gox Adds new handler classfile in _yap.gox convention for ytest demo.
ytest/demo/jwtdemo/xgo_autogen.go Refreshes generated //line references to get_p_#id_yap.gox.
ytest/demo/jwtdemo/get_p_#id_yap.gox Adds new handler classfile in _yap.gox convention for ytest demo.
ytest/demo/match/hello/xgo_autogen.go Refreshes generated //line references to get_p_#id_yap.gox.
ytest/demo/match/hello/get_p_#id_yap.gox Adds new handler classfile in _yap.gox convention for ytest demo.
ytest/demo/match/diveinto/xgo_autogen.go Refreshes generated //line references to get_p_#id_yap.gox.
ytest/demo/match/diveinto/get_p_#id_yap.gox Adds new handler classfile in _yap.gox convention for ytest demo.
ytest/demo/_example/example_ytest.gox Updates example to use bearer auth helper and aligns with current ytest directives.
ytest/demo/_example/xgo_autogen_test.go Refreshes generated test to CaseApp, bearer auth, and current match/concat helpers.
ytest/demo/_example/xgo_autogen.go Adds/refreshes generated header for the example package.
cmd/wechat/xgo_autogen.go Adds generated output for the wechat_yapt.gox command directory.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@aofei aofei marked this pull request as draft March 18, 2026 08:49
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.

2 participants