Fix: don't develop a dependency's test-only [sources] transitively on Julia <1.11#98
Merged
ChrisRackauckas merged 2 commits intoJun 16, 2026
Conversation
….11) The tests.yml "Develop in-repo [sources] path deps" step walked the [sources] graph transitively on Julia <1.11. When the package-under-test sources an in-repo dependency that itself declares test-only [sources] (names in [extras]/[targets].test, not [deps]), those test-only path deps were Pkg.develop-ed into the active environment as phantom direct deps. Aqua's stale-deps and deps-compat checks then failed. This is what makes every Optimization.jl sublibrary's QA group fail on Julia lts: OptimizationBase's test-only [sources] (OptimizationLBFGSB, OptimizationManopt) were pulled into ~26 dependent sublibraries' envs. QA on Julia >=1.11 is green because the whole helper is a no-op there. Fix: extract the walk into scripts/develop_sources.jl and, when recursing into an already-developed dependency, only follow [sources] entries that are also that dependency's runtime [deps]. The package-under-test itself (the root of the walk) is exempt, so its own test-only [sources] are still developed for its own test suite. tests.yml now checks out SciML/.github (at dotgithub-ref, default v1, matching the sibling workflows) and calls the script, giving a single tested source of truth. Adds test/runtests.jl coverage asserting a dependency's test-only [sources] are excluded while the runtime transitive chain (and the root's own test-only sources) are still developed. Fixes SciML/Optimization.jl#1228 Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The actionlint+shellcheck job uses a docker:// action, but `runs-on: ubuntu-latest` lets it land on the self-hosted pool (which squats `ubuntu-latest` and cannot pull/run Docker images) -> intermittent "Docker pull failed with exit code 1". Self-hosted runners do not carry the `ubuntu-24.04` label, so pinning forces a GitHub-hosted runner where Docker works. The Julia script-tests job is left on ubuntu-latest (no Docker; self-hosted is fine). Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ChrisRackauckas
added a commit
that referenced
this pull request
Jun 17, 2026
…s monorepo sublibrary CI) The "Develop in-repo [sources]" step (added in #98) runs with `shell: julia {0}`, which writes the body to a temp file under RUNNER_TEMP and executes it from there. Julia's `include` resolves a RELATIVE path against the including file's directory (RUNNER_TEMP), not GITHUB_WORKSPACE where `.sciml-dotgithub` is checked out -- so the relative `include(joinpath(".sciml-dotgithub", ...))` failed with `SystemError: opening file ".../_temp/.sciml-dotgithub/scripts/develop_sources.jl"`. This broke every monorepo's sublibrary CI (project != '.'/'@.') the moment v1.15.1 was retagged (e.g. ModelingToolkit Sublibrary CI). Anchor the include at ENV["GITHUB_WORKSPACE"] so it resolves regardless of the temp script's location. Verified by simulating the step (julia temp-script in RUNNER_TEMP, run from a third cwd, .sciml-dotgithub under GITHUB_WORKSPACE): the relative form reproduces the SystemError; the GITHUB_WORKSPACE-anchored form loads develop_sources cleanly. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the bug tracked in SciML/Optimization.jl#1228: every Optimization.jl sublibrary's QA group fails on Julia lts (<1.11) with Aqua
Stale dependenciesand missing-deps-compat findings forOptimizationLBFGSBandOptimizationManopt, even in sublibraries that have nothing to do with those packages. QA on Julia 1 (>=1.11) is green.Where the bug lived
The
tests.ymlreusable workflow's "Develop in-repo [sources] path deps" step (run on Julia <1.11 only) walks the[sources]graph transitively andPkg.develops every path source it finds. Crucially, when it recursed into an already-developed dependency, it followed that dependency's test-only[sources]too — sources whose names live in[extras]/[targets].test, not in[deps].OptimizationBasedeclares[sources]for its own test-only depsOptimizationLBFGSB/OptimizationManopt(so its own test suite resolves on <1.11). Any sublibrary that legitimately sourcesOptimizationBase(≈26 of them) therefore hadOptimizationLBFGSB/OptimizationManoptPkg.develop-ed into its environment as phantom direct deps.Pkg.developwrites them into the activeProject.toml's[deps], and Aqua (run against that sublib) then flags them as stale / missing-compat. On Julia >=1.11 the whole helper is a no-op (VERSION < v"1.11.0-DEV.0"), which is exactly why QA-Julia-1 is green and QA-Julia-lts fails.This bug is in SciML/.github (the project model
tests.yml, whichgrouped-tests.ymlandsublibrary-project-tests.ymlboth delegate to). It needs av1retag to reach consumers. (SciMLTesting.jl'sdevelop_sources!has the same transitive-walk shape for the folder model, but Optimization.jl uses the.githubproject model; that's a separate follow-up if desired.)The fix
[sources]walk intoscripts/develop_sources.jl(collect_source_pathsis a pure, env-mutation-free function;develop_sourcesactivates + develops).tests.ymlnow checks outSciML/.githubatdotgithub-ref(defaultv1, matching the sibling workflows) and calls the script — one tested source of truth instead of an untested inline block.[sources]entries that are also that dependency's runtime[deps]. A dependency's test-only sources are never developed into the package-under-test's env.[sources]are still developed, because its own test suite legitimately needs them (e.g. testing OptimizationBase directly still develops LBFGSB/Manopt).Local verification (Julia 1.10, both directions)
Reproduced against a real Optimization.jl checkout by replicating the workflow's develop step, then running Aqua's stale-deps + deps-compat checks against
OptimizationCMAEvolutionStrategy.(a) Bug reproduced (old, buggy helper): develop step injects
OptimizationLBFGSB+OptimizationManoptinto CMAES's[deps]; Aqua fails exactly as in the issue:(a) Fix works: with
scripts/develop_sources.jl, onlyOptimizationBaseis developed; CMAES's[deps]stays{CMAEvolutionStrategy, OptimizationBase, Reexport, SciMLBase}(no phantom deps); the same Aqua stale-deps + deps-compat checks now pass 5/5, exit 0.(b) No regression (legitimate transitive runtime developing still works): built a synthetic monorepo
Top → Mid → LeafwhereMidruntime-sourcesLeaf(in[deps]) and test-only-sourcesTestOnly(only in[extras]/[targets].test). With the fix, developingTopdevelops the full runtime chain{Mid, Leaf}(precompiles + loads;Top.top_marker()returns throughMid → Leaf), whileTestOnlyis correctly excluded fromTop's manifest. The old helper, by contrast, leaksTestOnlyin — confirming the fixture genuinely discriminates the two behaviors.Owning-repo test suite:
julia test/runtests.jlpasses on Julia 1.10 and 1.12 (exit 0). Added 3 testsets asserting (1) a dependency's test-only[sources]are excluded while the runtime transitive chain is developed, (2) the root package's own test-only[sources]ARE still developed, (3) no-[sources]→ nothing developed.actionlintis clean on the modifiedtests.yml.Deploy note
This change is in
SciML/.githubreusables, so it requires av1retag to take effect for consumers (Optimization.jl and the rest of the fleet).Fixes SciML/Optimization.jl#1228
Please ignore until reviewed by @ChrisRackauckas.