Skip to content

refactor(xgomod): drop built-in spx project support#139

Merged
xushiwei merged 1 commit intogoplus:mainfrom
aofei:spx
Mar 24, 2026
Merged

refactor(xgomod): drop built-in spx project support#139
xushiwei merged 1 commit intogoplus:mainfrom
aofei:spx

Conversation

@aofei
Copy link
Copy Markdown
Member

@aofei aofei commented Mar 18, 2026

Built-in support for spx is no longer practical. Unlike a regular Go project, spx depends on a much more complex runtime and setup that cannot be represented reliably by hardcoded project metadata here.

spx also maintains its own gox.mod and evolves relatively quickly, so the built-in definition is easy to drift out of date. Remove the hardcoded registration and the legacy .gmx alias.

Built-in support for spx is no longer practical. Unlike a regular Go
project, spx depends on a much more complex runtime and setup that
cannot be represented reliably by hardcoded project metadata here.

spx also maintains its own `gox.mod` and evolves relatively quickly, so
the built-in definition is easy to drift out of date. Remove the
hardcoded registration and the legacy `.gmx` alias.

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
Copilot AI review requested due to automatic review settings March 18, 2026 09:02
@gemini-code-assist
Copy link
Copy Markdown

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 refactors the xgomod module by removing the built-in, hardcoded support for spx projects. This change addresses the impracticality of maintaining spx's complex and rapidly evolving runtime and setup within xgomod, allowing spx to manage its own gox.mod independently. The refactoring simplifies the codebase by eliminating outdated project metadata and a legacy alias.

Highlights

  • Removed SpxProject Definition: The hardcoded SpxProject variable, which defined the .spx extension and associated classes, was removed from xgomod/classfile.go.
  • Dropped SpxProject Registration: The explicit import and registration of SpxProject within the Module.ImportClasses method was removed.
  • Eliminated Legacy .gmx Alias: The legacy .gmx alias, which previously pointed to SpxProject, was removed.

🧠 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
Copy Markdown

@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

The pull request successfully refactors the xgomod package by removing the built-in spx project support. This change aligns with the description, addressing the complexities and maintenance challenges associated with hardcoded spx project metadata. The removal of SpxProject definition and its corresponding import calls in ImportClasses appears to be clean and complete within the modified classfile.go file, without introducing any obvious regressions or new issues.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 53.93%. Comparing base (e815d71) to head (2514a3c).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #139      +/-   ##
==========================================
- Coverage   54.09%   53.93%   -0.17%     
==========================================
  Files          13       13              
  Lines        1172     1170       -2     
==========================================
- Hits          634      631       -3     
- Misses        519      520       +1     
  Partials       19       19              

☔ 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.

Copy link
Copy Markdown

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 removes the hardcoded/built-in xgomod project registration for spx, including the legacy .gmx alias mapping, aligning xgomod with the idea that spx should be defined via external metadata (e.g., gox.mod) rather than embedded defaults.

Changes:

  • Deleted the built-in SpxProject definition from xgomod/classfile.go.
  • Stopped auto-importing SpxProject during Module.ImportClasses.
  • Removed the legacy .gmx extension alias that pointed to the spx project definition.

💡 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.

@xgopilot
Copy link
Copy Markdown

xgopilot bot commented Mar 18, 2026

The motivation is well-reasoned and the change is clean. Two points worth addressing:

  1. Breaking export removalSpxProject is an exported symbol; its removal is a semver-breaking change. A deprecation cycle or a clear callout in the release notes would ease downstream migration.
  2. Stale doc commentmodfile/rule.go:80 still uses .gmx as the canonical example for Project.Ext (eg. "_yap.gox" or ".gmx"). Since .gmx is now explicitly abandoned, this example should be updated (e.g. to .spx or .gsh) to avoid misleading readers.

aofei added a commit to aofei/fork.goplus.xgo that referenced this pull request Mar 18, 2026
Remove the remaining default `.spx` and `.gmx` classfile detection from
the parser, build helpers, formatter, watcher, and related tests.

This also drops legacy `.yap`-specific test cases and chore script
filters, keeping `_yap.gox` as the supported yap classfile form in this
repository.

Updates goplus/mod#139

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
aofei added a commit to aofei/fork.goplus.xgo that referenced this pull request Mar 18, 2026
Remove the remaining default `.spx` and `.gmx` classfile detection from
the parser, build helpers, formatter, watcher, and related tests.

This also drops legacy `.yap`-specific test cases and chore script
filters, keeping `_yap.gox` as the supported yap classfile form in this
repository.

Updates goplus/mod#139

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
aofei added a commit to aofei/fork.goplus.xgo that referenced this pull request Mar 18, 2026
Remove the remaining default `.spx` and `.gmx` classfile detection from
the parser, build helpers, formatter, watcher, and related tests.

This also drops legacy `.yap`-specific test cases and chore script
filters, keeping `_yap.gox` as the supported yap classfile form in this
repository.

Updates goplus/mod#139

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
@xushiwei xushiwei merged commit 39c2c13 into goplus:main Mar 24, 2026
13 of 15 checks passed
@aofei aofei deleted the spx branch March 24, 2026 06:58
aofei added a commit to aofei/fork.goplus.xgo that referenced this pull request Mar 26, 2026
Remove the remaining default `.spx` and `.gmx` classfile detection from
the parser, build helpers, formatter, watcher, and related tests.

This also drops legacy `.yap`-specific test cases and chore script
filters, keeping `_yap.gox` as the supported yap classfile form in this
repository.

Updates goplus/mod#139

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
aofei added a commit to aofei/fork.goplus.xgo that referenced this pull request Mar 26, 2026
Remove the remaining default `.spx` and `.gmx` classfile detection from
the parser, build helpers, formatter, watcher, and related tests.

This also drops legacy `.yap`-specific test cases and chore script
filters, keeping `_yap.gox` as the supported yap classfile form in this
repository.

Updates goplus/mod#139

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
aofei added a commit to aofei/fork.goplus.xgo that referenced this pull request Mar 26, 2026
Remove the remaining default `.spx` and `.gmx` classfile detection from
the parser, build helpers, formatter, watcher, and related tests.

Keep the standalone spec tooling scanning `.spx` and `.yap` inputs,
since those chore scripts do not read module class registrations.

Updates goplus/mod#139

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
aofei added a commit to aofei/fork.goplus.xgo that referenced this pull request Mar 26, 2026
Remove the remaining default `.spx` and `.gmx` classfile detection from
the parser, build helpers, formatter, watcher, and related tests.

Keep the standalone spec tooling scanning `.spx` and `.yap` inputs,
since those chore scripts do not read module class registrations.

Updates goplus/mod#139

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
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.

3 participants