fix: untrack zellij plugin build dir; installer updates all PATH copies

- Remove zellij_socktop_plugin/target from git (3,577 files committed by
  accident in bf6ac87): the root .gitignore anchors /target to the repo
  root, so the standalone plugin's own build dir wasn't covered. Ignore
  target/ at any depth (also fixes the pre-existing
  '/socktop-wasm-test/target' entry, which pointed at a hyphenated path
  that doesn't exist).

- install.sh now updates EVERY copy of socktop/socktop_agent on PATH,
  not just $PREFIX: a stale 'cargo install' in ~/.cargo/bin shadows
  /usr/local/bin on most PATHs, so an install could 'succeed' while
  'socktop --version' kept reporting the old release. Extra copies that
  can't be written are warned about, not fatal, and the script now
  prints which binary is actually active on PATH at the end.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
jasonwitty
2026-08-20 10:23:45 -07:00
parent 2c773eaa6c
commit f61b232e42
3579 changed files with 28 additions and 67498 deletions
+3 -2
View File
@@ -1,6 +1,7 @@
/target # Any crate's build directory, including standalone sub-crates
# (zellij_socktop_plugin, socktop_wasm_test) that live outside the workspace.
target/
.vscode/ .vscode/
/socktop-wasm-test/target
/.cargo/ /.cargo/
# Documentation files from development sessions (context-specific, not for public repo) # Documentation files from development sessions (context-specific, not for public repo)
+25
View File
@@ -96,6 +96,29 @@ say "Installing to $PREFIX"
$SUDO install -m 755 "$CLIENT" "$PREFIX/socktop" $SUDO install -m 755 "$CLIENT" "$PREFIX/socktop"
$SUDO install -m 755 "$AGENT" "$PREFIX/socktop_agent" $SUDO install -m 755 "$AGENT" "$PREFIX/socktop_agent"
# Update every other copy on PATH as well. A stale `cargo install` in
# ~/.cargo/bin would otherwise SHADOW the fresh binary (~/.cargo/bin
# usually precedes /usr/local/bin on PATH), leaving `socktop --version`
# stuck on the old release after a "successful" install.
update_path_copies() {
local name="$1" src="$2" copy dir
# type -ap lists every match on PATH (bash builtin, symlinks not resolved)
for copy in $(type -ap "$name" | sort -u); do
[ "$copy" = "$PREFIX/$name" ] && continue
dir="$(dirname "$copy")"
say "Updating additional copy on PATH: $copy"
if [ -w "$copy" ] || [ -w "$dir" ]; then
install -m 755 "$src" "$copy"
else
# Non-fatal: an un-updatable extra copy shouldn't kill the install,
# but the user must know it may shadow the fresh binary.
$SUDO install -m 755 "$src" "$copy" || warn "could not update $copy — it may shadow $PREFIX/$name"
fi
done
}
update_path_copies socktop "$CLIENT"
update_path_copies socktop_agent "$AGENT"
# ---------- systemd service (Linux only) ---------- # ---------- systemd service (Linux only) ----------
if [ "$OS" = "Linux" ] && [ "$NO_SERVICE" -eq 0 ] \ if [ "$OS" = "Linux" ] && [ "$NO_SERVICE" -eq 0 ] \
&& command -v systemctl >/dev/null \ && command -v systemctl >/dev/null \
@@ -120,3 +143,5 @@ fi
say "Installed:" say "Installed:"
"$PREFIX/socktop" --version "$PREFIX/socktop" --version
"$PREFIX/socktop_agent" --version "$PREFIX/socktop_agent" --version
say "Active on PATH: $(type -p socktop || true) / $(type -p socktop_agent || true)"
socktop --version
@@ -1 +0,0 @@
{"rustc_fingerprint":15410446560398401115,"outputs":{"7971740275564407648":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/jasonw/.rustup/toolchains/stable-x86_64-unknown-linux-gnu\noff\npacked\nunpacked\n___\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\nunix\n","stderr":""},"2493264757018902864":{"success":true,"status":"","code":0,"stdout":"rustc 1.96.0 (ac68faa20 2026-05-25)\nbinary: rustc\ncommit-hash: ac68faa20c58cbccd01ee7208bf3b6e93a7d7f96\ncommit-date: 2026-05-25\nhost: x86_64-unknown-linux-gnu\nrelease: 1.96.0\nLLVM version: 22.1.2\n","stderr":""}},"successes":{}}
@@ -1,3 +0,0 @@
Signature: 8a477f597d28d172789f06886806bc55
# This file is a cache directory tag created by cargo.
# For information about cache directory tags see https://bford.info/cachedir/
@@ -1 +0,0 @@
This file has an mtime of when this was started.
@@ -1 +0,0 @@
{"rustc":16696009966390864400,"features":"[]","declared_features":"[\"all\", \"alloc\", \"bin\", \"cargo-all\", \"core\", \"cpp_demangle\", \"default\", \"fallible-iterator\", \"loader\", \"rustc-demangle\", \"rustc-dep-of-std\", \"smallvec\", \"std\", \"wasm\"]","target":7709716332375371761,"profile":2241668132362809309,"path":13646899500103550558,"deps":[[18122473562710263097,"gimli",false,5009013607712618494]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/addr2line-3889f82da56c923e/dep-lib-addr2line","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
@@ -1 +0,0 @@
This file has an mtime of when this was started.
@@ -1 +0,0 @@
6633978d983cfbcd
@@ -1 +0,0 @@
{"rustc":16696009966390864400,"features":"[]","declared_features":"[\"core\", \"default\", \"rustc-dep-of-std\", \"std\"]","target":6569825234462323107,"profile":2241668132362809309,"path":16477429559295111439,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/adler2-011fdb1c26934692/dep-lib-adler2","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
@@ -1 +0,0 @@
This file has an mtime of when this was started.
@@ -1 +0,0 @@
915b9c2f1edae892
@@ -1 +0,0 @@
{"rustc":16696009966390864400,"features":"[\"alloc\"]","declared_features":"[\"alloc\", \"blobby\", \"default\", \"dev\", \"heapless\", \"std\"]","target":17699850227775374271,"profile":2241668132362809309,"path":526659330375803601,"deps":[[17738927884925025478,"generic_array",false,2333957161326891105]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/aead-7ee386579ec9268b/dep-lib-aead","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
@@ -1 +0,0 @@
This file has an mtime of when this was started.
@@ -1 +0,0 @@
18021a5df0e6a616
@@ -1 +0,0 @@
{"rustc":16696009966390864400,"features":"[]","declared_features":"[]","target":15188848890219333408,"profile":2241668132362809309,"path":8580132564503159960,"deps":[[7880011738006502139,"cipher",false,18157585675583447495],[17247424983952747352,"aes_soft",false,3972488419545052902]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/aes-7489e98965cdae79/dep-lib-aes","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
@@ -1 +0,0 @@
This file has an mtime of when this was started.
@@ -1 +0,0 @@
f0b3cdac5673c4d3
@@ -1 +0,0 @@
{"rustc":16696009966390864400,"features":"[\"aes\", \"alloc\", \"default\"]","declared_features":"[\"aes\", \"alloc\", \"default\", \"heapless\", \"std\", \"zeroize\"]","target":14755649619688925796,"profile":2241668132362809309,"path":12158335834777654263,"deps":[[1552950840212332988,"aead",false,10585950747317001105],[2487314826258863575,"ctr",false,13308215392957317356],[7719821159916746520,"subtle",false,17207282761987950351],[7880011738006502139,"cipher",false,18157585675583447495],[12419152769575215845,"ghash",false,13853575390738165228],[16883558493574317758,"aes",false,1632245834996908568]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/aes-gcm-b94dfff3f8bb85bc/dep-lib-aes_gcm","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
@@ -1 +0,0 @@
This file has an mtime of when this was started.
@@ -1 +0,0 @@
e6f655a12b1d2137
@@ -1 +0,0 @@
{"rustc":16696009966390864400,"features":"[]","declared_features":"[\"semi_fixslice\"]","target":15741416177792721431,"profile":2241668132362809309,"path":3827217868119803007,"deps":[[7880011738006502139,"cipher",false,18157585675583447495],[13927846409374511869,"opaque_debug",false,6888222839025251272]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/aes-soft-222c8572dbe47aad/dep-lib-aes_soft","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
@@ -1 +0,0 @@
This file has an mtime of when this was started.
@@ -1 +0,0 @@
{"rustc":16696009966390864400,"features":"[\"perf-literal\", \"std\"]","declared_features":"[\"default\", \"logging\", \"perf-literal\", \"std\"]","target":7534583537114156500,"profile":2241668132362809309,"path":3001368859775851590,"deps":[[12613788554453945248,"memchr",false,4760767297193619319]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/aho-corasick-2fedbb04f4493ff9/dep-lib-aho_corasick","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
@@ -1 +0,0 @@
This file has an mtime of when this was started.
@@ -1 +0,0 @@
36340d624d8712b5
@@ -1 +0,0 @@
{"rustc":16696009966390864400,"features":"[\"default\", \"std\"]","declared_features":"[\"backtrace\", \"default\", \"std\"]","target":1563897884725121975,"profile":2225463790103693989,"path":17426940001522930328,"deps":[[10364619138950789809,"build_script_build",false,5514133708288779743]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/anyhow-0d4c9fbeaea12909/dep-lib-anyhow","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
@@ -1 +0,0 @@
{"rustc":16696009966390864400,"features":"[\"default\", \"std\"]","declared_features":"[\"backtrace\", \"default\", \"std\"]","target":5408242616063297496,"profile":2225463790103693989,"path":15898178468353630419,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/anyhow-0ee1330d60939d89/dep-build-script-build-script-build","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
@@ -1 +0,0 @@
This file has an mtime of when this was started.
@@ -1 +0,0 @@
{"rustc":16696009966390864400,"features":"","declared_features":"","target":0,"profile":0,"path":0,"deps":[[10364619138950789809,"build_script_build",false,10463845798452951772]],"local":[{"RerunIfChanged":{"output":"debug/build/anyhow-0f0baeddd061bf8f/output","paths":["src/nightly.rs"]}},{"RerunIfEnvChanged":{"var":"RUSTC_BOOTSTRAP","val":null}}],"rustflags":[],"config":0,"compile_kind":0}
@@ -1 +0,0 @@
{"rustc":16696009966390864400,"features":"","declared_features":"","target":0,"profile":0,"path":0,"deps":[[10364619138950789809,"build_script_build",false,16891870362859091692]],"local":[{"RerunIfChanged":{"output":"debug/build/anyhow-6855f3fb29d1644e/output","paths":["src/nightly.rs"]}},{"RerunIfEnvChanged":{"var":"RUSTC_BOOTSTRAP","val":null}}],"rustflags":[],"config":0,"compile_kind":0}
@@ -1 +0,0 @@
{"rustc":16696009966390864400,"features":"[\"backtrace\", \"default\", \"std\"]","declared_features":"[\"backtrace\", \"default\", \"std\"]","target":5408242616063297496,"profile":2225463790103693989,"path":15898178468353630419,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/anyhow-d2208267e0c6520f/dep-build-script-build-script-build","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
@@ -1 +0,0 @@
This file has an mtime of when this was started.
@@ -1 +0,0 @@
This file has an mtime of when this was started.
@@ -1 +0,0 @@
7b7af3e9cf5d57af
@@ -1 +0,0 @@
{"rustc":16696009966390864400,"features":"[\"backtrace\", \"default\", \"std\"]","declared_features":"[\"backtrace\", \"default\", \"std\"]","target":1563897884725121975,"profile":2241668132362809309,"path":17426940001522930328,"deps":[[10364619138950789809,"build_script_build",false,780337507045004983]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/anyhow-f33988e9ec2b740a/dep-lib-anyhow","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
@@ -1 +0,0 @@
This file has an mtime of when this was started.
@@ -1 +0,0 @@
b115a8b5460fcb52
@@ -1 +0,0 @@
{"rustc":16696009966390864400,"features":"[]","declared_features":"[\"experimental-strategies\", \"experimental-thread-local\", \"internal-test-strategies\", \"serde\", \"weak\"]","target":3875146365114806171,"profile":2241668132362809309,"path":209361042634296472,"deps":[[16991438365634268121,"rustversion",false,17645280650221248004]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/arc-swap-0ed163a7351354fd/dep-lib-arc_swap","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
@@ -1 +0,0 @@
This file has an mtime of when this was started.
@@ -1 +0,0 @@
3d363f6a1e408920
@@ -1 +0,0 @@
{"rustc":16696009966390864400,"features":"[]","declared_features":"[\"array-sizes-129-255\", \"array-sizes-33-128\", \"default\", \"serde\", \"std\", \"unstable-const-fn\"]","target":10123127388291370278,"profile":2241668132362809309,"path":10845529551968022874,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/arrayvec-52d89aa39fe89d07/dep-lib-arrayvec","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
@@ -1 +0,0 @@
This file has an mtime of when this was started.
@@ -1 +0,0 @@
{"rustc":16696009966390864400,"features":"[]","declared_features":"[]","target":4756655004811021963,"profile":2225463790103693989,"path":16920460510259826377,"deps":[[2713742371683562785,"syn",false,12291857242565882470],[8949245912927223590,"quote",false,13025575884811989780]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/async-attributes-f05e7bbc310d542c/dep-lib-async_attributes","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
@@ -1 +0,0 @@
This file has an mtime of when this was started.
@@ -1 +0,0 @@
{"rustc":16696009966390864400,"features":"[\"default\", \"std\"]","declared_features":"[\"default\", \"portable-atomic\", \"std\"]","target":2348331682808714104,"profile":2241668132362809309,"path":18095695755650671716,"deps":[[704993722384941283,"futures_core",false,9445737769001693686],[2251399859588827949,"pin_project_lite",false,12109455339434302527],[12100481297174703255,"concurrent_queue",false,2929355862389054194],[17148897597675491682,"event_listener_strategy",false,5961974098130494729]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/async-channel-0a82030ded83e60e/dep-lib-async_channel","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
@@ -1 +0,0 @@
This file has an mtime of when this was started.
@@ -1 +0,0 @@
{"rustc":16696009966390864400,"features":"[]","declared_features":"[]","target":10271149513551571463,"profile":2241668132362809309,"path":1461130162811428048,"deps":[[704993722384941283,"futures_core",false,9445737769001693686],[1464803193346256239,"event_listener",false,8341039281747622162],[12100481297174703255,"concurrent_queue",false,2929355862389054194]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/async-channel-13bfe03c5c66b349/dep-lib-async_channel","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
@@ -1 +0,0 @@
This file has an mtime of when this was started.
@@ -1 +0,0 @@
{"rustc":16696009966390864400,"features":"[]","declared_features":"[\"static\"]","target":7483652822946339806,"profile":2241668132362809309,"path":14951765489380588524,"deps":[[332082171437474983,"fastrand",false,12047079406034810336],[867502981669738401,"async_task",false,2910000105609104844],[2251399859588827949,"pin_project_lite",false,12109455339434302527],[9090520973410485560,"futures_lite",false,13679018480482419684],[12100481297174703255,"concurrent_queue",false,2929355862389054194],[14895711841936801505,"slab",false,18353976936488081658]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/async-executor-9d172fcf18ef1e5b/dep-lib-async_executor","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
@@ -1 +0,0 @@
This file has an mtime of when this was started.
@@ -1 +0,0 @@
{"rustc":16696009966390864400,"features":"[\"async-io\", \"default\"]","declared_features":"[\"async-io\", \"default\", \"tokio\", \"tokio-crate\", \"tokio02\", \"tokio02-crate\", \"tokio03\", \"tokio03-crate\"]","target":6513592296586730228,"profile":2241668132362809309,"path":9057861791747842848,"deps":[[5855319743879205494,"once_cell",false,2802405865659289905],[6633419628244209595,"async_channel",false,951023466325436022],[9090520973410485560,"futures_lite",false,13679018480482419684],[11099682918945173275,"blocking",false,15653528257567120483],[15550619062825872913,"async_io",false,4875448860714952253],[16549948769818400386,"async_lock",false,17474619914081585432],[16784658679919228589,"async_executor",false,14997820178583794889]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/async-global-executor-753f2c4582f4179d/dep-lib-async_global_executor","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
@@ -1 +0,0 @@
{"rustc":16696009966390864400,"features":"","declared_features":"","target":0,"profile":0,"path":0,"deps":[[15550619062825872913,"build_script_build",false,1121208361569585652]],"local":[{"Precalculated":"2.6.0"}],"rustflags":[],"config":0,"compile_kind":0}
@@ -1 +0,0 @@
{"rustc":16696009966390864400,"features":"[]","declared_features":"[\"tracing\"]","target":5408242616063297496,"profile":4831801323318853768,"path":1702902945468378510,"deps":[[1924499573722464170,"autocfg",false,7943154379262010829]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/async-io-1c53ba7ce41a5629/dep-build-script-build-script-build","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
@@ -1 +0,0 @@
This file has an mtime of when this was started.
@@ -1 +0,0 @@
This file has an mtime of when this was started.
@@ -1 +0,0 @@
3d667f57e812a943
@@ -1 +0,0 @@
{"rustc":16696009966390864400,"features":"[]","declared_features":"[\"tracing\"]","target":10084595033463382892,"profile":595352080743954639,"path":4811583305924606563,"deps":[[189982446159473706,"parking",false,12351846635295087741],[7667230146095136825,"cfg_if",false,10646474851945608328],[9090520973410485560,"futures_lite",false,13679018480482419684],[11059951343532549838,"futures_io",false,9327035250472184219],[12100481297174703255,"concurrent_queue",false,2929355862389054194],[14271827750077741315,"polling",false,10626851110225878832],[14895711841936801505,"slab",false,18353976936488081658],[15550619062825872913,"build_script_build",false,841526499379027265],[18407532691439737072,"rustix",false,11369413027993962166]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/async-io-1cf7c98cfef87ac3/dep-lib-async_io","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
@@ -1 +0,0 @@
This file has an mtime of when this was started.
@@ -1 +0,0 @@
{"rustc":16696009966390864400,"features":"[\"default\", \"std\"]","declared_features":"[\"default\", \"loom\", \"std\"]","target":4686383084901058664,"profile":13827760451848848284,"path":1699303358119115500,"deps":[[2251399859588827949,"pin_project_lite",false,12109455339434302527],[3846636397644523246,"event_listener",false,18120736193358486925],[17148897597675491682,"event_listener_strategy",false,5961974098130494729]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/async-lock-9978a6a340f12c69/dep-lib-async_lock","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}
@@ -1 +0,0 @@
This file has an mtime of when this was started.
@@ -1 +0,0 @@
{"rustc":16696009966390864400,"features":"[]","declared_features":"[\"tracing\"]","target":5244141512695498248,"profile":12181835655012388449,"path":14067034954486064084,"deps":[[867502981669738401,"async_task",false,2910000105609104844],[3846636397644523246,"event_listener",false,18120736193358486925],[6633419628244209595,"async_channel",false,951023466325436022],[7667230146095136825,"cfg_if",false,10646474851945608328],[9090520973410485560,"futures_lite",false,13679018480482419684],[15550619062825872913,"async_io",false,4875448860714952253],[16428028762717909172,"async_signal",false,13439892807214484624],[16549948769818400386,"async_lock",false,17474619914081585432],[18407532691439737072,"rustix",false,11369413027993962166]],"local":[{"CheckDepInfo":{"dep_info":"debug/.fingerprint/async-process-9429e2b7937c58c8/dep-lib-async_process","checksum":false}}],"rustflags":[],"config":8247474407144887393,"compile_kind":0}

Some files were not shown because too many files have changed in this diff Show More