From 0631dc4526adcdbe648252e4ec2fcc73954960a5 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Sat, 20 Jun 2026 08:15:22 -0400 Subject: [PATCH] tests.yml: develop in-repo [sources] for monorepo ROOT (project: '.') on the LTS The 'Develop in-repo [sources] path deps' step (and its helper checkout) was gated with `project != '@.' && project != '.'`, so it ran for lib/* sublibraries but NOT for a monorepo ROOT project passed as `project: '.'` (what grouped-tests.yml uses). On Julia < 1.11 the [sources] table is not auto-resolved, so a root project whose [deps] are pinned to in-repo siblings via [sources] (e.g. OptimalUncertaintyQuantification's root deps on CanonicalMoments / DiscreteMeasures / OUQBase under lib/*) fails `julia-buildpkg` on the LTS with: ERROR: expected package `CanonicalMoments [58d2c334]` to be registered which red-flagged `tests / Core (julia lts)` and `tests / QA (julia lts)`. Relax both gates to only exempt the default-environment sentinel '@.' (an ordinary single package, which by definition has no in-repo [sources]); '.' now develops its in-repo [sources] siblings just like a lib/* sublibrary. develop_sources already handles the root correctly: collect_source_paths exempts the root project from the test-only-sources filter, so the root's own runtime [sources] are developed, and it is a no-op when '.' declares no [sources] (and on Julia >= 1.11 entirely). Verified locally on Julia 1.10.11 against SciML/OptimalUncertaintyQuantification.jl: `develop_sources(".")` + `Pkg.instantiate()` on the repo root resolves and precompiles the full stack (ModelingToolkit / Optimization / OUQBase / the three lib/* sources) cleanly; the bare `Pkg.instantiate()` reproduces the "expected package ... to be registered" failure. Co-Authored-By: Chris Rackauckas Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/tests.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f640da7..5f6be4f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -145,7 +145,7 @@ jobs: token: "${{ secrets.GITHUB_TOKEN }}" - name: "Checkout SciML/.github for the develop-sources helper" - if: "${{ inputs.buildpkg && inputs.project != '@.' && inputs.project != '.' }}" + if: "${{ inputs.buildpkg && inputs.project != '@.' }}" uses: actions/checkout@v6 with: repository: SciML/.github @@ -154,12 +154,18 @@ jobs: - name: "Develop in-repo [sources] path deps of ${{ inputs.project }}" # On Julia < 1.11 the [sources] section is not auto-resolved during - # build/test, so develop the in-repo path deps the sub-project (e.g. a - # lib/* sublibrary) declares -- transitively, but skipping a developed - # dependency's *test-only* [sources] so they don't become phantom direct - # deps (SciML/Optimization.jl#1228). No-op on >= 1.11. See - # scripts/develop_sources.jl for the full rationale. - if: "${{ inputs.buildpkg && inputs.project != '@.' && inputs.project != '.' }}" + # build/test, so develop the in-repo path deps the sub-project declares + # -- transitively, but skipping a developed dependency's *test-only* + # [sources] so they don't become phantom direct deps + # (SciML/Optimization.jl#1228). No-op on >= 1.11. This covers both a + # lib/* sublibrary (project: lib/) AND a monorepo *root* project + # (project: '.') whose [sources] pin in-repo siblings (e.g. + # OptimalUncertaintyQuantification's root deps on its lib/* packages): + # without developing them, `julia-buildpkg` on the LTS fails with + # "expected package ... to be registered". Only the default + # environment sentinel '@.' (an ordinary single package with no in-repo + # [sources]) is exempt. See scripts/develop_sources.jl for the rationale. + if: "${{ inputs.buildpkg && inputs.project != '@.' }}" shell: julia --color=yes {0} run: | # `shell: julia {0}` writes this body to a temp file under RUNNER_TEMP and