Skip to content

Modernize toolchain: drop Anaconda, add VSCodium/Miniforge/Node/Quarto - #11

Merged
jt14den merged 4 commits into
masterfrom
modernize-setup-2026
Jul 17, 2026
Merged

Modernize toolchain: drop Anaconda, add VSCodium/Miniforge/Node/Quarto#11
jt14den merged 4 commits into
masterfrom
modernize-setup-2026

Conversation

@jt14den

@jt14den jt14den commented Jul 17, 2026

Copy link
Copy Markdown

Summary

  • Swaps cask "anaconda" for cask "miniforge", matching The Carpentries' March 2025 lesson setup task force recommendations, which explicitly advise moving off Anaconda after its 2024 ToS enforcement actions
  • Adds cask "vscodium" (also a Carpentries 2025 recommendation) and cask "quarto" (used across DSC for reports/slides)
  • Adds 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 via npm create astro, not installed globally, so Node is the right unit here
  • Drops the redundant brew "docker" formula, keeping just the Docker Desktop cask (simpler for workshop learners than a CLI-only install)
  • Removes dead code: the commented-out Anaconda curl installer and a no-op RStudio volume-mount conditional
  • Fixes README links that pointed at thoughtbot/laptop instead of this repo (issue tracker, wiki) — bug reports and log attachments were going to the wrong project
  • Removes README claims for tools the script doesn't actually install (pandoc, awscli, Postgres, Redis)

This 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 check against the extracted Brewfile block — every formula/cask name resolves, no unknown-package errors
  • Full sh mac run 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

jt14den added 2 commits July 16, 2026 17:58
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).
@jt14den

jt14den commented Jul 17, 2026

Copy link
Copy Markdown
Author

Follow-up commit (4db69a7) after a deeper read of mac. Turns out the script has been failing on every run, silently, for a while:

The actual root cause: 4 of the script's 6 brew tap lines are dead in current Homebrew — homebrew/services, homebrew/cask, homebrew/core, and homebrew/bundle are all now either merged into Homebrew core or emptied out (plus homebrew/cask-fonts, already fixed in the first commit, was retired outright in 2023). Verified live: attempting to tap all six today fails on four of them. brew bundle keeps installing everything else after a tap failure, but returns exit 1 overall — 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 at the bottom of the script. Only universal-ctags/universal-ctags and buo/cask-upgrade are still real, needed taps — kept those, dropped the rest.

Also while in there:

  • update_shell was firing (and prompting for sudo) on every run on Apple Silicon, not just when the shell actually needed changing — its guard compared against a hardcoded Intel Homebrew path that can never match on arm64. Simplified to just check $SHELL directly.
  • Removed dead code: gem_install_or_update (defined, never called), a commented-out Apple Silicon permissions block, an obsolete brew-cask uninstall check (that package was merged into Homebrew core ~2016), and a literal duplicate brew "tree" line.

Re-verified with shellcheck (same pre-existing warnings, nothing new) and brew bundle check against the full Brewfile block — everything now resolves with zero failures.

jt14den added 2 commits July 16, 2026 18:15
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.
@jt14den

jt14den commented Jul 17, 2026

Copy link
Copy Markdown
Author

Two more small commits, both verified against real CI runs on this branch:

  1. CI itself was lying (ce37d49): the workflow step was sh mac 2>&1 | tee ~/laptop.log with no set -o pipefail, so the step's exit code was tee's (always 0), not sh mac's. Proved this by pulling the log from this branch's very first CI run (before the tap fixes) — sh mac printed multiple has failed! lines and its own failed trap output, exited 1 internally, and GitHub still marked the job green. Added set -o pipefail and bumped actions/checkout from v1 (deprecated, EOL Node runtime) to v4.
  2. cask "docker"cask "docker-desktop" (0e6b39f): surfaced as a CI annotation on the first real green run (Cask docker was renamed to docker-desktop). Old name still resolves via alias today but is deprecated.

Real proof this now works, not just static checks: with the pipefail fix in place, two consecutive full runs of sh mac completed successfully end-to-end on macos-latest GitHub-hosted runners (8m29s, 7m28s) — every formula, tap, and cask installs cleanly, and conda init/conda update at the tail of the script (previously silently skipped on every run, forever) now actually execute. Direct links: run 1, run 2.

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.

@jt14den
jt14den merged commit 3611ed9 into master Jul 17, 2026
1 of 2 checks passed
@jt14den
jt14den deleted the modernize-setup-2026 branch July 17, 2026 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

download and install rstudio remove cask tools

1 participant