Skip to content

tests.yml: develop in-repo [sources] for monorepo ROOT (project: '.') on the LTS#101

Draft
ChrisRackauckas-Claude wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix-develop-sources-monorepo-root
Draft

tests.yml: develop in-repo [sources] for monorepo ROOT (project: '.') on the LTS#101
ChrisRackauckas-Claude wants to merge 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:fix-develop-sources-monorepo-root

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown

Problem

tests.yml's "Develop in-repo [sources] path deps" step (and the helper checkout before it) is gated with:

if: "${{ inputs.buildpkg && inputs.project != '@.' && inputs.project != '.' }}"

So it runs for lib/* sublibraries (project: lib/<name>) but is skipped for a monorepo ROOT project passed as project: '.' — which is exactly what grouped-tests.yml passes for monorepo roots.

On Julia < 1.11 the [sources] table is not auto-resolved during build/test. A root project whose [deps] are pinned to in-repo siblings via [sources] therefore can't be built on the LTS. Concretely, on SciML/OptimalUncertaintyQuantification.jl (root [deps] = CanonicalMoments / DiscreteMeasures / OUQBase, each { path = "lib/<name>" } in root [sources]), julia-buildpkg on julia lts fails before any test runs:

ERROR: LoadError: expected package `CanonicalMoments [58d2c334]` to be registered

red-flagging tests / Core (julia lts) and tests / QA (julia lts).

Fix

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;
  • it is a safe no-op when '.' declares no [sources], and on Julia >= 1.11 entirely.

No behavior change for @. callers (still skipped) or lib/* callers (still develop).

Local verification (Julia 1.10.11, against OptimalUncertaintyQuantification.jl)

  • Bare Pkg.instantiate() on the repo root reproduces expected package CanonicalMoments ... to be registered.
  • develop_sources(".") + Pkg.instantiate() resolves and precompiles the full stack (ModelingToolkit / Optimization / OUQBase + the three lib/* sources) cleanly — INSTANTIATE OK.

Rollout

After merge, re-tag v1 to the new master so @v1 callers (incl. OptimalUncertaintyQuantification.jl) pick up the fix.

Out of scope (separate root cause)

The Downgrade / Downgrade Sublibraries reds on the same monorepo are a julia-actions/julia-downgrade-compat bug (its create_merged_project leaves path-[sources] deps in the merged base [deps], so the resolver hits unknown package UUID), not a SciML/.github issue — reported separately.

Please ignore until reviewed by @ChrisRackauckas.

… 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 <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

2 participants