refactor: remove LegacyCLIVersion from codebase#28
Merged
miguelsanchez-upsun merged 2 commits intomainfrom Mar 12, 2026
Merged
Conversation
LegacyCLIVersion is no longer meaningful in the unified codebase. The ldflag that set it was removed in 73a97c7 and it has reported "0.0.0" since then. - Remove the LegacyCLIVersion variable - Remove "Embedded Legacy CLI version" from verbose version output - Simplify legacy cache directory to use the CLI version alone - Simplify user agent string (use CLI version, drop WRAPPER field) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the unused LegacyCLIVersion constant from the legacy wrapper and updates related outputs/identifiers to rely on the wrapper’s version instead.
Changes:
- Removed the
LegacyCLIVersionglobal and its use in tests. - Removed “Embedded Legacy CLI version …” from verbose
versionoutput. - Simplified the legacy cache directory name and the legacy CLI
USER_AGENTvalue to no longer includeLegacyCLIVersion.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| internal/legacy/legacy.go | Removes LegacyCLIVersion, updates cache dir naming, and simplifies USER_AGENT construction. |
| internal/legacy/legacy_test.go | Updates the legacy wrapper test to no longer set LegacyCLIVersion. |
| commands/version.go | Removes verbose output line that printed legacy.LegacyCLIVersion. |
💡 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.
miguelsanchez-upsun
approved these changes
Mar 12, 2026
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.
Summary
LegacyCLIVersionvariable (always reported "0.0.0" since 73a97c7)--versionoutputlegacy-{PHPVersion}-{LegacyCLIVersion}tolegacy-{Version}🤖 Generated with Claude Code