Modernize toolchain: drop Anaconda, add VSCodium/Miniforge/Node/Quarto - #11
Conversation
Aligns the script with The Carpentries' March 2025 lesson setup task force recommendations (Miniforge over Anaconda, VSCodium as default editor) and adds the tooling DSC/OSPO actually use day to day. - mac: swap cask "anaconda" -> cask "miniforge" (Carpentries recommendation, avoids Anaconda's 2024 ToS enforcement issues); add cask "vscodium"; add brew "node" for Astro/Jekyll/Hugo site work; add cask "quarto" for DSC reports/slides; drop the redundant brew "docker" formula (keeping the Docker Desktop cask); remove dead Anaconda curl-installer cruft and a no-op RStudio volume-mount conditional - README.md: fix issue-tracker and wiki links that pointed at thoughtbot/laptop instead of UCLA-DataSquad/laptop; drop tool descriptions for things the script doesn't actually install (pandoc, awscli, Postgres, Redis); document the new tools Verified with shellcheck (no new warnings vs. the pre-existing bash-isms in untouched code) and `brew bundle check` (all formula/cask names resolve). Closes #3, closes #5
brew bundle currently fails every run, silently: 4 of the 6 taps in the Brewfile are deprecated/no-longer-needed in modern Homebrew (homebrew/services, homebrew/cask, homebrew/core, homebrew/bundle are all now built into brew core or emptied), plus homebrew/cask-fonts was retired outright in 2023 (repo 404s). brew bundle keeps processing remaining lines after a tap failure, but returns exit 1 at the end -- and since `mac` runs under `set -e` with no guard on that call, every run has been silently skipping brew cleanup, conda init, and conda update since whichever of these taps broke first. Verified live: attempting to tap all six failed on four of them (services, cask, core, bundle) with the same exit-1 behavior; only universal-ctags/universal-ctags and buo/cask-upgrade still work and are kept. Also: - Fix update_shell firing (and prompting for sudo) on every run on Apple Silicon: the guard compared `command -v zsh` against a hardcoded Intel Homebrew path that can never match on arm64, so it always evaluated true. Simplified to skip entirely when $SHELL is already zsh, which is the actual condition being tested for. - Remove gem_install_or_update: defined, never called - Remove the commented-out Apple Silicon /opt permissions block: dead since Homebrew already handles this on install - Remove the brew-cask uninstall check: brew-cask was merged into Homebrew core in ~2016, this package hasn't existed in years - Remove a literal duplicate `brew "tree"` line Re-verified with shellcheck (same pre-existing warning set, nothing new) and `brew bundle check` against the full Brewfile block (all formula/cask/tap names now resolve cleanly, zero failures).
|
Follow-up commit (4db69a7) after a deeper read of The actual root cause: 4 of the script's 6 Also while in there:
Re-verified with |
The smoke test badge has been meaningless: `sh mac 2>&1 | tee ~/laptop.log` has no set -o pipefail, so the step's exit code is tee's (which basically always succeeds), not sh mac's. Confirmed directly from a real run's log on this branch's first commit (before the tap fixes): sh mac printed multiple "has failed!" lines and a final "failed" from its own trap, exited 1 internally -- and the job still reported "success". Also bumps actions/checkout from v1, deprecated for years and running on an EOL Node runtime, to v4.
Surfaced as a CI annotation on the first real green run: "Cask docker was renamed to docker-desktop." Still resolves today via alias, but using the deprecated name risks breaking on a future Homebrew release.
|
Two more small commits, both verified against real CI runs on this branch:
Real proof this now works, not just static checks: with the pipefail fix in place, two consecutive full runs of At this point the "full sh mac run on a clean machine" item from my earlier test plan is effectively covered by CI itself now that the badge is honest — still worth a human running it once on an actual DSC laptop before merge, but the automated signal is real now. |
Summary
cask "anaconda"forcask "miniforge", matching The Carpentries' March 2025 lesson setup task force recommendations, which explicitly advise moving off Anaconda after its 2024 ToS enforcement actionscask "vscodium"(also a Carpentries 2025 recommendation) andcask "quarto"(used across DSC for reports/slides)brew "node"— needed for Astro (OSPO's site framework going forward, also used by IMLS/personal sites), plus Jekyll/Hugo repos elsewhere in the org. Astro itself is scaffolded per-project vianpm create astro, not installed globally, so Node is the right unit herebrew "docker"formula, keeping just the Docker Desktop cask (simpler for workshop learners than a CLI-only install)thoughtbot/laptopinstead of this repo (issue tracker, wiki) — bug reports and log attachments were going to the wrong projectThis repo hadn't been touched since Aug 2022 and had drifted from what DSC staff actually run locally (confirmed by comparing against a live Apple Silicon machine already on Miniforge/VSCodium/RStudio+Positron).
Test plan
shellcheck -s sh mac— zero new warnings introduced (pre-existing bash-isms in untouched code remain, same as before this PR)brew bundle checkagainst the extracted Brewfile block — every formula/cask name resolves, no unknown-package errorssh macrun on a real clean-ish machine (not run here — recommend a DSC staff member smoke-test before merge, since CI hasn't actually executed since 2022 despite the badge)Closes #3, closes #5