You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(wpm): add expose and unexpose subcommands for bin/ entry links (Fixes #1835) - #1844
Added wpm expose <package>... [--force] [--dry-run] [--json] and wpm unexpose <package>... [--dry-run] [--json] in src/commands/wpm.cpp:
wpm expose materializes an installed package's declared commands as entry links in <root>/bin (handling aliases, bundled packages without receipts, and --force / --dry-run / --json), reconciles intra-package declared links from the install receipt, and records the exposed entry links in the receipt.
wpm unexpose removes the package's declared <root>/bin entry links and drops them from the receipt's recorded destinations without removing the package payload, usr/bin shims, or receipt.
Wired expose / unexpose into print_usage(), dispatch(), and REGISTER_COMMAND help/examples.
Added unit test wpm_expose_and_unexpose_manage_bin_links_without_uninstalling in tests/unit/wpm/wpm_unit_test.cpp.
Verification
Built test-wpm with MSVC (cmake --preset test) and ran wpm.*: 91/91 passed.
Captain update: the A side of this PR (expose/unexpose + receipt
destination sync) has been split out and relayed as #2012 per
the owner's direction, with the unexpose ownership guard from the r1
review implemented (a bin name is deleted only when verifiably this
package's link - payload identity, or the receipt record when the
payload is gone; foreign files are skipped and reported) and the
A-side pin gaps filled (bundled no-receipt, idempotency, --force,
alias, guard).
This PR is therefore re-scoped to the B side only: the declared
intra-package links subsystem (links.json reconcile, the receipt links field, install/uninstall/rebuild declared-set handling, the
hardlink-fallback warning). Please rebase onto main, drop the
expose/unexpose hunks (they land via the relay), and add the B-side
pins the r1 review listed (declared-link install materialization,
receipt links round-trip, rebuild reconcile, uninstall cleanup,
hardlink fallback warning) before re-requesting review.
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
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.
Fixes #1835.
Summary
wpm expose <package>... [--force] [--dry-run] [--json]andwpm unexpose <package>... [--dry-run] [--json]insrc/commands/wpm.cpp:wpm exposematerializes an installed package's declared commands as entry links in<root>/bin(handling aliases, bundled packages without receipts, and--force/--dry-run/--json), reconciles intra-package declared links from the install receipt, and records the exposed entry links in the receipt.wpm unexposeremoves the package's declared<root>/binentry links and drops them from the receipt's recorded destinations without removing the package payload,usr/binshims, or receipt.expose/unexposeintoprint_usage(),dispatch(), andREGISTER_COMMANDhelp/examples.wpm_expose_and_unexpose_manage_bin_links_without_uninstallingintests/unit/wpm/wpm_unit_test.cpp.Verification
test-wpmwith MSVC (cmake --preset test) and ranwpm.*: 91/91 passed.