Skip to content

bin/install picks a supported Julia by itself and changes nothing outside the repo - #74

Open
1-Bort-1 wants to merge 5 commits into
mainfrom
agent/71-cleanup-bring-bin-install-to-the-box-s-i
Open

1-Bort-1 wants to merge 5 commits into
mainfrom
agent/71-cleanup-bring-bin-install-to-the-box-s-i

Conversation

@1-Bort-1

@1-Bort-1 1-Bort-1 commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

TL;DR

./bin/install -y now falls back to the newest installed Julia that has a tracked Manifest-v<major>.toml.default, through JULIAUP_CHANNEL, instead of refusing the active 1.13. It no longer runs tests by default, writes to @v#.# or ~/.bashrc, or deletes the manifest on --update. Without that, no worktree of this repo could be installed on the box.

What was wrong

On the box (juliaup status: 1.11.9, 1.12.7, default *1.13.0), -y took the active 1.13 and stopped at Error: Julia 1.13 is not supported. Only Julia 1.11 and 1.12 are supported. The script also drifted from AGENTS.md §2 in the other three ways the issue lists: Pkg.test() by default, Pkg.add("Revise") into the shared environment plus a jl alias appended to ~/.bashrc/~/.zshrc, and --update deleting the manifest before Pkg.update.

What changed

  • Choosing the Julia (bin/setup_env): active_julia reads julia --version (20 ms, against 330 ms for starting Julia to print VERSION), and run_julia now uses it instead of its own string slicing. select_julia_channel keeps the active Julia if it is supported, and otherwise exports JULIAUP_CHANNEL as the first installed supported channel. A version counts as supported when the repo tracks Manifest-v<major>.toml.default for it, so the version list lives in one place. Adding a 1.13 manifest (Support Julia 1.13 in KiteControllers #73) makes 1.13 supported with no script edits. Without -y, the menu still offers the versions and runs juliaup add, but never juliaup default.
  • bin/install: copies the .default over the live manifest, instantiates, precompiles examples and smoke-loads it. --tests is the only way to get the test suite; --no-tests and the question about tests are gone, which the changelog marks BREAKING. --update runs Pkg.update on the live manifest and seeds it from the .default only when it is missing. I dropped the clean-retry that deleted the manifest and resolved from scratch after a failure: it silently replaced the pins, and now a failure stops the script. The script went from ~590 lines to ~120, mostly because of the duplicated registry and retry blocks.
  • Kept from the old script: the 5 GB disk check (and its error when df gives nothing), MPLBACKEND=qtagg on macOS (moved into bin/setup_env, so install and run_julia share one copy), and removing leftover member manifests on 1.12. Dropped on purpose: the Linux "MakieControlPlots could not be loaded" warning, because the smoke load now stops the install with the real error instead; and the per-OS juliaup install commands, replaced by one line pointing at https://julialang.org/install that is printed only when no supported Julia is found and juliaup is missing. juliaup is no longer required when the active Julia is already supported.
  • Julia 1.11 has no workspaces, and its tracked .default is the examples manifest (that is what bin/update_default_manifest copies). So the root and examples each get a copy (the project list is (. examples) against (.) on 1.12, which never expands an empty array, since macOS's bash 3.2 aborts on one under -u) and run Pkg.resolve(); Pkg.instantiate(), as before. On 1.12 the workspace manifest covers examples/test/docs, and instantiate alone is enough.
  • bin/run_julia chooses the Julia the same way (preferring versions that have an install_version_*.txt), and runs using Revise only when Revise is findable. Otherwise, removing Revise from the global install would break the REPL for a user who never installed it.

Where I'd push back

  • The box's juliaserver session launches a plain julia, so it runs 1.13.0 for this repo however the install picks. I checked: Pkg.activate(examples); using KiteControllers in the session fails with Package KiteControllers ... does not seem to be installed. The repo side of that fix is Support Julia 1.13 in KiteControllers #73 (support 1.13), in line with Bart's comment on 1-Bart-1/Agents#629.
  • The 1.11 .default is stale against examples/Project.toml. The 1.11 resolve drops CondaPkg's chain (CondaPkg, MicroMamba, micromamba_jll, Pidfile, pixi_jll; CondaPkg was removed in d7ccbfd) and moves the path-sourced KiteControllers 0.2.28→0.2.31. Every registered pin holds. I didn't regenerate the manifest here, because that is a PR of its own.
  • bin/update_default_manifest still runs juliaup default, which is the same drift in the next script over. I left it out to keep this PR to one script's contract.

Verification

  • Reproduced first: ./bin/install -y on main → Error: Julia 1.13 is not supported., exit 1 (box log in the thread)
  • ./bin/install -y with default 1.13 → Using Julia 1.12.7, Installation complete!, exit 0; live Manifest-v1.12.toml byte-identical to the .default
  • JULIAUP_CHANNEL=1.11 ./bin/install -y → Using Julia 1.11.9, exit 0 (red first: failed to find source of parent package: "IntervalArithmetic" before the 1.11 resolve was restored)
  • After the review round: ./bin/install -y (default 1.13) → Using Julia 1.12.7, Installation complete!, exit 0; live manifest identical to the .default; ~/.bashrc and @v1.1{1,2,3} hashes unchanged
  • Not run on macOS / bash 3.2; the 1.12 path no longer expands an empty array
  • sha256 of ~/.bashrc and ~/.julia/environments/v1.1{1,2,3}/Project.toml identical before and after all three runs
  • -h prints usage; --no-tests and unknown flags exit 1 with usage; select_julia_channel 9.9 → 1; select_julia_channel 1.11 → JULIAUP_CHANNEL=1.11
  • --update not run: it would Pkg.update this worktree's live manifest, which §2 rules out by hand
  • --tests not run (it is Pkg.test())
  • Local CI mirror started, but it runs Pkg.test() on the box's Julia 1.13.0, which this repo does not support, so its result says nothing about this change. GitHub CI does not call bin/install.
  • Docs: no public symbol changed. No REUSE in this repo. Up to date with main.
  • Risk: select_julia_channel reads juliaup status by column. A juliaup that changes that table would make -y fail with the "no Julia with a default manifest" error, not pick the wrong version.

Scope

+129 / −546 across 5 files: bin/install rewritten to the contract, the channel helper in bin/setup_env, bin/run_julia using it, the changelog fragment, and .gitignore widened from examples/LocalPreferences.toml to LocalPreferences.toml in any project. The box writes the root one per worktree, and it is per-machine like the examples one.

Opened by 1-Bort-1, an AI agent working for @1-Bart-1.
Closes #71 · task KiteControllers.jl-71

1-Bort-1 and others added 4 commits October 6, 2026 14:42
-y uses a supported Julia already installed via JULIAUP_CHANNEL instead of
refusing the active one; supported versions are those with a tracked
Manifest-v<major>.toml.default. Tests only with --tests. Nothing outside the
repo changes: no juliaup default, no Revise in @v#.#, no shell alias.
--update runs Pkg.update on the live manifest. bin/run_julia picks the
channel the same way and loads Revise only where installed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 1.11 default manifest is the examples manifest, which the root project
has to resolve down to its own dependencies before it can instantiate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@1-Bort-1 1-Bort-1 added agent:running Agent task state agent:ci Agent task state and removed agent:running Agent task state labels Oct 6, 2026

@1-Bort-1 1-Bort-1 left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent review (advisory)

Verdict: REQUEST CHANGES · 2 inline, 0 off the diff

Good

  • The plan and the diff agree. -y now goes through select_julia_channel, juliaup default is gone, Revise no longer goes into @v#.#, the .bashrc/.zshrc alias is gone, and tests run only with --tests. I checked each against the card's 'What changed' list.
  • Failures now stop the script as the card says: bin/install starts with #!/bin/bash -eu, so a failed Pkg.instantiate exits before Installation complete! and before install_version_*.txt is written.
  • The supported versions come from one place: SUPPORTED_JULIA is built from the tracked Manifest-v*.toml.default files (on this branch: 1.11 and 1.12). That removes the hard-coded 1.11/1.12 checks and the menu.
  • In bin/run_julia, select_julia_channel runs before julia_major is computed at its line 39. The system image and install_version lookup therefore follow the chosen channel, not the active 1.13.
  • --update no longer deletes the manifest. It seeds from the .default only when no live manifest exists, as AGENTS.md §2 asks.
  • The Revise guard (Base.find_package("Revise") === nothing || @eval using Revise) means removing the global Revise install cannot break the REPL.
  • The changelog fragment marks the --no-tests removal BREAKING and lists every behaviour change visible to users.

Not good

  • bin/install:86 — On 1.12 install_projects=() is empty. Under -u, "${install_projects[@]}" aborts with 'unbound variable' on bash older than 4.4, which is the macOS system /bin/bash (3.2). Install therefore fails on every 1.12 run on macOS, a platform the old script handled explicitly.
  • bin/run_julia:24 — This file now has active_julia available but still computes julia_major by slicing julia --version at line 39. That is two codepaths for the same quantity in a file this PR opens. §2 says to unify them here.
  • The rewrite drops several behaviours the card does not name: the macOS MPLBACKEND=qtagg export before precompile and the smoke load, the Linux MakieControlPlots load warning, and the 'juliaup is not installed' help with per-OS install commands. Each is either deliberate or a regression, and the reviewer cannot tell which.
  • The disk check no longer guards an empty df result. Under -u an empty available_kb evaluates to 0, so the user gets a false 'not enough free disk space' error instead of 'could not determine'.
  • On 1.12 the script no longer removes examples/Manifest-v1.12.toml. Any leftover from an earlier install now sits next to the workspace manifest without being cleaned up.
  • The two-line comment at bin/install:77-78 explains why the 1.11 branch is shaped as it is. Under §3 that reasoning belongs in the PR card, where it already is.
  • active_julia starts a whole Julia process just to print major.minor. bin/run_julia now pays for that on every launch, on top of its own julia --version call.

claude, rubric CLEAN_CODE.md. A different lab from the implementer
on purpose: a reviewer sharing its blind spots would not flag its mistakes.

Comment thread bin/install Outdated
for _label in "${RETRIED_RESOLVES[@]}"; do
echo " - ${_label}"
done
for project in . "${install_projects[@]}"; do

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAJOR: On 1.12 install_projects=() is empty. Under -u, "${install_projects[@]}" aborts with 'unbound variable' on bash older than 4.4, which is the macOS system /bin/bash (3.2). Install therefore fails on every 1.12 run on macOS, a platform the old script handled explicitly.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 347c87d: the list is now (. examples) on 1.11 and (.) otherwise, so no empty array is expanded. Not run on bash 3.2.

Comment thread bin/run_julia
@1-Bort-1 1-Bort-1 added agent:queued Agent task state and removed agent:ci Agent task state labels Oct 6, 2026
@1-Bort-1

1-Bort-1 commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

Local full suite: PASS (1 min, Julia 1.13.0, one cell of the matrix)

@1-Bort-1 1-Bort-1 added agent:running Agent task state priority Open work waits on this and removed agent:queued Agent task state labels Oct 6, 2026
…t guards

- Never expand an empty project array (aborts under -u on macOS bash 3.2).
- active_julia reads julia --version; run_julia uses it instead of slicing.
- Guard an empty df result; remove leftover member manifests on 1.12.
- MPLBACKEND on macOS lives in setup_env, shared by install and run_julia.
- Point at the juliaup installer when no supported Julia is found.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@1-Bort-1

1-Bort-1 commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

347c87d, one line per finding. Dropped behaviours: MPLBACKEND restored, moved into setup_env so install and run_julia share one copy. The MakieControlPlots warning is dropped on purpose because the smoke load now fails the install with the real error. The per-OS juliaup commands are replaced by one julialang.org/install line, printed only when juliaup is missing. Empty df: restored the 'could not determine' error. Leftover examples/test Manifest-v1.12.toml: removed on 1.12 again. 77-78 comment: cut to one line saying 1.11 has no workspaces; the reasoning stays on the card. active_julia: now parses julia --version, 20 ms against 330 ms. Re-ran ./bin/install -y afterwards: 1.12.7, exit 0.

@1-Bort-1 1-Bort-1 added agent:ci Agent task state and removed agent:running Agent task state labels Oct 6, 2026
@1-Bort-1
1-Bort-1 marked this pull request as ready for review October 6, 2026 13:39
@1-Bort-1 1-Bort-1 added agent:review Agent task state and removed agent:ci Agent task state labels Oct 6, 2026
@1-Bort-1
1-Bort-1 requested a review from 1-Bart-1 October 6, 2026 13:40

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:review Agent task state priority Open work waits on this

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cleanup: bring bin/install to the box's install contract (AGENTS.md...

1 participant