fix(retract): preserve full phantom tag prefixes - #4886
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Updates retract-phantom.sh to compute module-relative paths more precisely so retraction tags only strip a true semantic-major directory (/vN/) and preserve lookalike prefixes (e.g., v2client, v4.0.0, v5-plugins). This supports the ongoing effort to publish correct “phantom module” retraction tags so proxy-cached bad module paths don’t remain installable.
Changes:
- Add
module_relative_path()helper to strip onlygo-micro.dev/vN/when it’s an exact major-version directory. - Replace duplicated
case-based prefix stripping in both the sanity-check loop and tag construction loop with the new helper.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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
/vN/semantic-major directory from phantom module pathsv2client,v4.0.0, andv5-pluginswhen constructing retraction tagsTesting
bash -n retract-phantom.sh./retract-phantom.sh --dry-rungo build ./...go test ./...Follow-up to #4884.
Closes #4884