-
Notifications
You must be signed in to change notification settings - Fork 180
[FEATURE] Support marketplace notation (name@marketplace) in apm uninstall #1323
Copy link
Copy link
Closed
Labels
area/cliCLI command surface, flags, help text (cross-cutting).CLI command surface, flags, help text (cross-cutting).area/docs-sitedocs/src/content (Starlight), README, doc generation.docs/src/content (Starlight), README, doc generation.area/marketplacemarketplace.json schema, federation, authoring suite, source parity.marketplace.json schema, federation, authoring suite, source parity.priority/highShips in current or next milestoneShips in current or next milestonestatus/acceptedDirection approved, safe to start work.Direction approved, safe to start work.status/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).Initial agentic triage complete; pending maintainer ratification (silence = approval).theme/portabilityOne manifest, every target. Multi-target deploy, marketplace, packaging, install.One manifest, every target. Multi-target deploy, marketplace, packaging, install.type/featureNew capability, new flag, new primitive.New capability, new flag, new primitive.
Metadata
Metadata
Assignees
Labels
area/cliCLI command surface, flags, help text (cross-cutting).CLI command surface, flags, help text (cross-cutting).area/docs-sitedocs/src/content (Starlight), README, doc generation.docs/src/content (Starlight), README, doc generation.area/marketplacemarketplace.json schema, federation, authoring suite, source parity.marketplace.json schema, federation, authoring suite, source parity.priority/highShips in current or next milestoneShips in current or next milestonestatus/acceptedDirection approved, safe to start work.Direction approved, safe to start work.status/triagedInitial agentic triage complete; pending maintainer ratification (silence = approval).Initial agentic triage complete; pending maintainer ratification (silence = approval).theme/portabilityOne manifest, every target. Multi-target deploy, marketplace, packaging, install.One manifest, every target. Multi-target deploy, marketplace, packaging, install.type/featureNew capability, new flag, new primitive.New capability, new flag, new primitive.
Type
Projects
Status
Done
Is your feature request related to a problem? Please describe.
apm installaccepts marketplace notation (apm install my-plugin@official), butapm uninstalldoes not -- it rejects any package whose name does not contain/:The rejection happens in
_validate_uninstall_packages(src/apm_cli/commands/uninstall/engine.py:48), before any resolution is attempted. To remove a plugin that was installed via a marketplace, users have to openapm.yml(orapm.lock.yaml) to look up the canonicalowner/repoform -- a clear install/uninstall asymmetry that breaks the "remove what you installed, the way you installed it" expectation set by npm/pip/cargo.Describe the solution you'd like
Make
apm uninstallaccept the sameNAME@MARKETPLACE[#REF]grammar thatapm installaccepts (defined by_MARKETPLACE_REinsrc/apm_cli/marketplace/resolver.py:41). Resolve the marketplace ref to its canonical identity, then run the existing identity-match logic againstapm.yml.Resolution strategy (lockfile-first, registry fallback):
LockFile.dependenciesfor entries whosediscovered_via == <marketplace>andmarketplace_plugin_name == <name>-- this provenance is already written at install time (src/apm_cli/deps/lockfile.py:43-44).install): when the lockfile does not carry the provenance, callparse_marketplace_ref()+resolve_marketplace_plugin()to obtain the canonicalowner/repoand match by identity.plugin '<name>@<marketplace>' is not installed(marketplace-specific wording, distinct from the generic "not found in apm.yml" used for canonical refs).Expected behaviour after the change:
apm uninstall my-plugin@official --dry-run,-g, and batch mixes (canonical + marketplace refs that point at the same dep) should all work without extra flags.Describe alternatives you've considered
--resolve-marketplace) for the registry fallback. Rejected:installis silent, and the lockfile-first path covers the common case with zero network calls, so requiring a flag would just add friction without protecting against anything.owner/repois inapm.ymland reachable.Additional context
src/apm_cli/commands/uninstall/engine.py:48._MARKETPLACE_REinsrc/apm_cli/marketplace/resolver.py:41.discovered_via,marketplace_plugin_nameinsrc/apm_cli/deps/lockfile.py:43-44, populated insrc/apm_cli/commands/install.py:400-405.apm.ymlstorage format (marketplace refs continue to be resolved to canonical form before being persisted); no change toinstall; no new flags.