Skip to content

bin/install only installs: copy the pinned manifest, instantiate, precompile - #326

Closed
1-Bort-1 wants to merge 2 commits into
mainfrom
agent/323-cleanup-bin-install-runs-the-test-suite-
Closed

1-Bort-1 wants to merge 2 commits into
mainfrom
agent/323-cleanup-bin-install-runs-the-test-suite-

Conversation

@1-Bort-1

Copy link
Copy Markdown
Member

TL;DR

bin/install now copies Manifest-v<major>.toml.default, instantiates the workspace and precompiles it with the Julia on the PATH, and does nothing else. It used to run Pkg.test() too, so a single erroring test (#314 on Julia 1.13) made the install exit 1 even though instantiate and precompile had worked. The box then treated the worktree as uninstallable.

What was wrong

Apart from the test run, the script changed things outside the repo. It ran juliaup add and juliaup default, added Revise to the global environment and appended alias jl=... to ~/.bashrc (or ~/.zshrc). Even with -y it chose the Julia version from the juliaup default and then installed and switched to it. It also called Pkg.resolve() after copying the .default, which can move what the manifest pins. When that failed it deleted the manifest and resolved from scratch, so the pins were lost without any error. The four sub-projects were resolved one by one against manifests the script created, but they are [workspace] members and share the root manifest, so one Pkg.instantiate() covers all of them.

What it does now

  • Uses julia as found on the PATH. Another version is chosen with JULIAUP_CHANNEL=1.12 ./bin/install, which bin/run_julia also respects. An unsupported or missing channel exits 1. bin/julia_major (new, 4 lines) prints the version's major.minor, and both bin/install and bin/update_default_manifest read it from there.
  • Copies the .default and runs Pkg.instantiate(). It never resolves.
  • --update runs Pkg.update() on the live manifest (seeded from the .default if missing) and leaves the .default alone.
  • -y is accepted and does nothing, because the script no longer asks anything. It stays: the box runs ./bin/install -y on every worktree, and the ecosystem's install contract names the flag.
  • Still does: precompiles root, examples, examples_3d, test and docs with the existing failure detection, deletes a stale system image, and copies .JETLSConfig.toml.
  • If Revise is missing from the global environment, it prints how to add it instead of adding it. bin/run_julia still does using Revise.

Also removed, each on purpose:

  • The 5 GB free-disk check. It was a guess at a threshold, and a full disk already fails the instantiate with Pkg's own error.
  • The "is juliaup installed" check. The script now needs julia on the PATH and checks for that instead.
  • The macOS MPLBACKEND=qtagg export. It only applied to the processes the install itself started. bin/run_julia sets it for the sessions where plots actually open.
  • The Pkg.Registry add/update step. Pkg.instantiate() adds General itself when no registry exists. An outdated registry is the risk named under Verification.
  • The closing using MakieControlPlots, DSP / using KiteViewers warm-ups. They loaded packages the precompile loop had just built, and they ended in || true, so they could not change the result.

bin/update_default_manifest, the only caller of --update, had the same problems. It switched the juliaup default, only knew 1.11 and 1.12, copied examples/Manifest-v1.11.toml (which the workspace never writes) and rm -rf'd the shared ~/.julia/compiled caches. Now it runs install --update and copies the live manifest onto the .default for the Julia on the PATH. The install line in CLAUDE.md now says the same.

Pushback

Dropping the version menu means someone at a terminal no longer gets asked which Julia to use. They set JULIAUP_CHANNEL instead, which -h explains. A menu that doesn't change the juliaup default would install for one version while run_julia starts another.

Verification

  • Reproduced first: the box's ./bin/install -y log ended in Some tests did not pass: 539 passed, 0 failed, 2 errored, 11 broken → exit 1
  • ./bin/install -y on Julia 1.13.0: exit 0 in 36 s. The live manifest is byte-identical to the .default, and ~/.bashrc and the juliaup default were unchanged (compared before and after)
  • JULIAUP_CHANNEL=1.12 ./bin/install -y: exit 0 (14 min, cold precompile cache), no precompile failures
  • JULIAUP_CHANNEL=1.10 ./bin/install -y: exit 1 with juliaup's "not installed" message. -h and a bad flag behave as expected
  • juliaserver session on the installed worktree: using KiteModels → v"0.11.17"
  • REUSE lint (fsfe/reuse container): the only files flagged are untracked box files (.agent/, LocalPreferences.toml, .JETLSConfig.toml)
  • bin/update_default_manifest (so install --update too), with a stub julia on the PATH that logs its arguments and marks the live manifest during "update": exit 0, the calls were Pkg.update() then the five precompiles, and the mark arrived in Manifest-v1.13.toml.default (restored afterwards). A real Pkg.update was not run, because it would move the pins
  • After the bin/julia_major change: ./bin/install -y exit 0 in 11 s (warm), manifest byte-identical to .default, ~/.bashrc and juliaup default unchanged; JULIAUP_CHANNEL=1.10 still exits 1
  • Local CI mirror (agent ci-local, 1.13): FAIL at test_find_steady_state (test/test-kps4.jl:581, "solver returned non-finite values" after iterations=247). That is find_steady_state! does not converge for KPS4 on Julia 1.13, and CI hides it #314, already on main, and this PR does not cause it: the branch leaves src/, test/, Project.toml and the .default manifest as they are on origin/main, the tests call no bin/ script, and include("test/test-kps4.jl") in the worktree session reproduces find_steady_state! does not converge for KPS4 on Julia 1.13, and CI hides it #314 with the same iteration count. GitHub CI stays green only because CI=true turns this error into @test_broken, which find_steady_state! does not converge for KPS4 on Julia 1.13, and CI hides it #314 describes
  • Risk: removing the resolve fallback means a .default that no longer instantiates now fails loudly instead of being quietly re-resolved. That is intended, but a user with an outdated registry may see it.

Scope

+79 / −592 across 5 files: bin/install rewritten, bin/update_default_manifest updated to match, the new bin/julia_major, the CLAUDE.md install line, and changelog.d/323-….md.

Not included:

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

1-Bort-1 and others added 2 commits September 26, 2026 19:39
Copy Manifest-v<major>.toml.default, instantiate the workspace and precompile
with the Julia on the PATH. No test run, no resolve, no juliaup add/default,
no global Revise, no ~/.bashrc alias. bin/update_default_manifest updates the
manifest of the Julia on the PATH instead of switching the juliaup default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bin/julia_major prints the major.minor of the Julia on the PATH;
bin/install and bin/update_default_manifest both call it instead of
parsing `julia --version` two different ways.

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 Sep 27, 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: APPROVE WITH COMMENTS · 1 inline, 0 off the diff

Good

  • Does what the card says: the Pkg.test() calls, Pkg.resolve(), the resolve-from-scratch fallback, juliaup add/default, the Revise install and the ~/.bashrc alias are all gone, matching TL;DR and 'What it does now' line for line
  • One Pkg.instantiate() on the root project replaces the four per-subproject resolves; the card correctly says these are [workspace] members sharing the root manifest (checked against the CLAUDE.md edit and root Project.toml)
  • Fails loudly: the shebang is #!/bin/bash -eu, so a failing instantiate or update, or a bad JULIAUP_CHANNEL making $(bin/julia_major) fail, stops the script with a non-zero exit instead of quietly re-resolving
  • The five near-identical 25-line resolve/instantiate heredocs and the duplicated 1.11 and ≥1.12 branches are now a single precompile loop, so §2's duplication is removed rather than moved (−592/+79)
  • run_precompile failure detection and the docs pyexpat carve-out are unchanged apart from wrapping to 92 columns, so the precompile checks still catch the same failures
  • bin/update_default_manifest no longer copies examples/Manifest-v1.11.toml (a file nothing writes) and no longer rm -rfs the shared ~/.julia/compiled, which fixes real bugs, and the card names both
  • Each removal (disk check, macOS MPLBACKEND, registry step, warm-ups) is named in the card with a reason, and run_julia keeping its own version parse is justified: copy_bin() copies only run_julia and create_sys_image2, confirmed in src/KiteModels.jl:1054
  • test/test_installation still works: ./install --update on a fresh clone now seeds the live manifest from .default and runs Pkg.update(), which adds General itself in a fresh depot
  • Verification covers the reported failure, exit codes, byte-identical manifest, and no changes to ~/.bashrc or the juliaup default; the one failed ci-local run is traced to #314, already on main

Not good

  • bin/install:140 — The Revise hint is printed after the green 'Installation complete!' banner and exits 0, yet bin/run_julia (the next step that same banner points to) errors without Revise. Fresh users following the README will likely miss the hint and hit a broken first launch. Print it before the banner, or name the requirement in README/index.md.
  • bin/julia_major prints major.minor (e.g. 1.12), so the name says less than the output; julia_minor_version or julia_channel would say what it returns
  • README.md:138 and docs/src/index.md:103 still describe a flow where ./install sets everything up, but a fresh user without global Revise now has ./bin/run_julia fail on using Revise, and neither page mentions JULIAUP_CHANNEL; the card's release checklist asks for README/index to be reconciled
  • bin/update_default_manifest calls bin/julia_major a second time after bin/install --update has already worked out the version; harmless, but two lookups can disagree if the environment changes between them
  • Removing the registry update means a user with an outdated General registry may now hit a hard instantiate failure; the card names this risk, but the script's error output gives no hint to run Pkg.Registry.update()

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
fi
fi
unset _config_file
if ! julia --startup-file=no -e 'exit(Base.find_package("Revise") === nothing)'; then

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.

MINOR: The Revise hint is printed after the green 'Installation complete!' banner and exits 0, yet bin/run_julia (the next step that same banner points to) errors without Revise. Fresh users following the README will likely miss the hint and hit a broken first launch. Print it before the banner, or name the requirement in README/index.md.

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.

Fair: bin/run_julia:36 does 'using Revise', so the hint belongs before the banner. The branch is on hold until @ufechner7 answers the numbered list on #323 (point 3), so it goes into that redo rather than a push now.

@1-Bort-1 1-Bort-1 added agent:queued Agent task state agent:review Agent task state agent:running Agent task state and removed agent:ci Agent task state agent:queued Agent task state labels Sep 27, 2026
@1-Bort-1

1-Bort-1 commented Sep 27, 2026 •

Copy link
Copy Markdown
Member Author

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

    init_springs!           |   34                    34     0.0s
    init_masses!            |   11                    11     0.0s
    calc_particle_forces!   |   11                    11     0.2s
    init                    |   11                    11     0.0s
    initial_residual        |    1              1      2     1.1s
    inner_loop!             |   11                    11     0.2s
    calc_aero_forces!       |   11                    11     0.2s
    test_loop               |   33                    33     0.2s
    test_residual!          |   30              9     39     0.4s
    test_getters            |    7              1      8     0.1s
    test_find_steady_state  |           1              1     1.1s
RNG of the outermost testset: Random.Xoshiro(0xe686fd3230a5b52d, 0x49db4f95c15fe981, 0x548b3307ff7dc073, 0xb6d795a9750a325a, 0x6ab602bda5819465)
ERROR: Package KiteModels errored during testing
Stacktrace:
  [1] pkgerror(msg::String)
    @ Pkg.Types ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/Types.jl:68
  [2] test(ctx::Pkg.Types.Context, pkgs::Vector{PackageSpec}; coverage::Bool, julia_args::Cmd, test_args::Cmd, test_fn::Nothing, force_latest_compatible_version::Bool, allow_earlier_backwards_compatible_versions::Bool, allow_reresolve::Bool)
    @ Pkg.Operations ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/Operations.jl:3148
  [3] test
    @ ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/Operations.jl:3026 [inlined]
  [4] test(ctx::Pkg.Types.Context, pkgs::Vector{PackageSpec}; coverage::Bool, test_fn::Nothing, julia_args::Cmd, test_args::Cmd, force_latest_compatible_version::Bool, allow_earlier_backwards_compatible_versions::Bool, allow_reresolve::Bool, kwargs::@Kwargs{io::IOContext{IO}})
    @ Pkg.API ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/API.jl:586
  [5] kwcall(::@NamedTuple{io::IOContext{IO}}, ::typeof(Pkg.API.test), ctx::Pkg.Types.Context, pkgs::Vector{PackageSpec})
    @ Pkg.API ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/API.jl:562
  [6] test(pkgs::Vector{PackageSpec}; io::IOContext{IO}, kwargs::@Kwargs{})
    @ Pkg.API ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/API.jl:172
  [7] test(pkgs::Vector{PackageSpec})
    @ Pkg.API ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/API.jl:161
  [8] test(; name::Nothing, uuid::Nothing, version::Nothing, url::Nothing, rev::Nothing, path::Nothing, mode::PackageMode, subdir::Nothing, kwargs::@Kwargs{})
    @ Pkg.API ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/API.jl:189
  [9] test()
    @ Pkg.API ~/.julia/juliaup/julia-1.13.0+0.x64.linux.gnu/share/julia/stdlib/v1.13/Pkg/src/API.jl:178
 [10] top-level scope
    @ none:1
 [11] eval(m::Module, e::Any)
    @ Core ./boot.jl:489
 [12] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:310
 [13] _start()
    @ Base ./client.jl:577

@1-Bort-1 1-Bort-1 removed the agent:running Agent task state label Sep 27, 2026
@1-Bort-1

Copy link
Copy Markdown
Member Author

All four are fair and go into the redo after the per-point answers on #323, not a push now (I promised no pushes until then): rename bin/julia_major to bin/julia_channel since it prints major.minor; point README/index.md at global Revise and JULIAUP_CHANNEL; have update_default_manifest read the version once; print a Pkg.Registry.update() hint when instantiate fails.

@1-Bort-1 1-Bort-1 added agent:ci Agent task state agent:review Agent task state agent:queued Agent task state agent:running Agent task state and removed agent:review Agent task state agent:ci Agent task state agent:queued Agent task state labels Sep 27, 2026
@1-Bort-1 1-Bort-1 added agent:ci Agent task state agent:review Agent task state and removed agent:running Agent task state agent:ci Agent task state labels Sep 27, 2026
@1-Bart-1
1-Bart-1 marked this pull request as draft September 28, 2026 16:17
@1-Bort-1
1-Bort-1 marked this pull request as ready for review October 3, 2026 15:04
@1-Bort-1 1-Bort-1 removed the agent:review Agent task state label Oct 3, 2026
@ufechner7

Copy link
Copy Markdown
Member

No

@ufechner7 ufechner7 closed this Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:review Agent task state

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cleanup: bin/install runs the test suite and edits the machine; make...

2 participants