Beyfish: Library > RTK > Upgrade, with rtk in ~/.cargo/bin, failed every
time with cargo's "multiple packages with binaries found: rtk, rtk-proxy
... Please specify a package" (#2092 said the same and was closed as
fixed). The cargo upgrader ran `cargo install --git
https://github.com/rtk-ai/rtk --force`.
Checked against the repository (gh api, read only): the root Cargo.toml's
package is `rtk`, and proxy/Cargo.toml declares another binary. Its own
comment says cargo scans every manifest regardless of workspace membership
and that the documented install names the package. The upgrader now runs
`cargo install --git https://github.com/rtk-ai/rtk rtk --force`, the fix
ggbdpq's patch on the issue proposed.
Siblings: this is the only `install --git` in magpie. The page's own
install goes through Homebrew, winget or rtk's script; the agent CLI
updaters run npm/brew with the package named.
Test: TestRTKUpgradeCargoNamesThePackage runs UpgradeRTK end to end on an
rtk in ~/.cargo/bin with a fake cargo that refuses as cargo does unless
the package is named. Red with the package dropped from the command (cargo
failed, exit 101), green with it.
Run in this worktree (on origin/main dd25997a4):
- go test -tags nogui -p 1 -count=1 -run TestRTK ./internal/library/: ok
- gofmt -l internal/library: clean
- go vet -tags nogui ./internal/library/ for GOOS=darwin, linux, windows: clean
Not run: a real cargo build of rtk.
Co-authored-by: ggbdpq <ggbdpq@gmail.com>
Full suite: SUITE_LINE