On v0.1.4210 the reporter (Windows) still couldn't add
@magpie-community/tools-goanyapi from the dist branch:
"bun add ./dist/magpie-community-tools-goanyapi-0.1.1.tgz: exit status 1:
Saved lockfile installed @magpie-community/tools-goanyapi@./dist/... 1
package removed ... Failed to install 1 package". Bun had installed
goanyapi; another package failed, but the line naming it comes before
"Saved lockfile", and the error kept only the last six lines, so
othersFailed found no name and the add failed. The tgz is fine (sha512
matches the index, no dependencies); nothing changes in the plugins repo.
- bunSaid: every Bun error magpie shows (add, update, remove, the dist
mend) keeps up to 8 failure lines from anywhere in the output before
its last lines, ANSI and CRs stripped.
- bunFailed reads every way Bun 1.4.4's source (install/*.rs) names a
failed package: failed to install/link <name>:, refusing to install
dependency, extracting tarball from/for, downloading tarball <name>@,
failed to download, Failed to open node_modules folder for, path for
package.
- othersFailed: a failure naming no package is another's when the add's
own package is in package.json and installed at the exact version asked
for (the spec's exact version, or the one installDist read from the
index; installDist now returns it). Its own package named still fails.
This covers every plugin kind, provider plugins and tools alike, as all
go through install().
Run:
- Old code (origin/main 5bd41301b with the new tests): all five new or
changed tests red, TestUnnamedFailureDoesNotFailADistAdd with the
reporter's message byte for byte.
- mote: go test -timeout 30m ./internal/plugin/... ok (174s);
GOOS=windows go vet ./internal/plugin/ and GOOS=linux go vet -tags
nogui ./internal/plugin/ ok; gofmt -l clean.
- xiaomi-gpu (Windows 11), real Bun 1.4.4, sandbox USERPROFILE/APPDATA/
XDG_CONFIG_HOME, magpie.exe -tags nogui built from this tree:
`magpie plugin add @magpie-community/tools-goanyapi` from a clean
plugins folder installs 0.1.1 from dist with its 37 tools; with
agency-agents installed and a file of it held open, the add drops
agency-agents and installs goanyapi. That second shape passes on
origin/main too (Bun's EBUSY line names agency-agents there).
Not tried: the reporter's exact hidden line, which their message cut
off; no shape I made on Windows hid the name. Publishing tools-goanyapi
to npm, which would skip the dist path, needs the owner.