Skip to content

Commit 5348063

Browse files
CI: fix Julia 1.10 lts dev step (registry refresh + active project skip)
Two distinct bugs that together cause every `(<group>, lts)` SublibraryCI or CI.yml job to fail at the develop step before tests even start: ## 1. Develop step runs before registry refresh `CI.yml` performs a `Pkg.develop(specs)` of every local `[sources]` entry in the top-level `Project.toml`. That develop's resolver checks every transitively required *registered* dep against the depot's General registry copy. The pkg-server's General copy is often 24-72h stale and does not yet include current SciMLBase v3 / CoverageTools / etc., so the resolve aborts with `expected package <X> to be registered` and the job is red before any test runs. Examples: - `test (Integrators_I, lts)` — `expected package SciMLBase [0bca4576] to be registered` - `test (InterfaceIII, lts)` — `expected package CoverageTools [c36e975a] to be registered` `CI.yml` already had a "Refresh General registry directly from git" step that reclones the registry, but it was running *after* the develop step, so develop hit the stale copy. Reorder so registry refresh runs first. `SublibraryCI.yml` had no registry refresh step at all and hit the same class of failure on lts. Add the same registry refresh step before its develop step. The Julia 1.11+ matrix cells are unaffected: `[sources]` is supported natively there and the develop step is a no-op (the script's `VERSION < v"1.11.0-DEV.0"` guard). ## 2. Transitive [sources] walk in test/runtests.jl tries to develop the active project `test/runtests.jl`, when it activates a sublibrary (`Pkg.activate(joinpath(lib_dir, base_group))`), walks `[sources]` recursively to develop every transitive local path dep — needed because nested sublibraries reference each other. Several sublibrary `Project.toml`s have `[sources]` cycles back to the active sublibrary (e.g. `lib/DiffEqDevTools/Project.toml` lists `OrdinaryDiffEqCore = {path = "../OrdinaryDiffEqCore"}`). When testing `lib/OrdinaryDiffEqCore`, the walk reaches DiffEqDevTools and queues `../OrdinaryDiffEqCore` for develop, which Pkg refuses with: package `OrdinaryDiffEqCore [bbf590c4]` has the same name or UUID as the active project Pre-seed the `developed` set with the active project's path so the walk skips it. These are pre-existing master CI infrastructure bugs, unrelated to any specific in-flight PR. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
1 parent 3fb56d2 commit 5348063

3 files changed

Lines changed: 37 additions & 10 deletions

File tree

.github/workflows/CI.yml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,21 @@ jobs:
9898
key: julia-cache;workflow=${{ github.workflow }};job=${{ github.job }};os=${{ runner.os }};group=${{ matrix.group }};version=${{ matrix.version }};run_id=${{ github.run_id }};run_attempt=${{ github.run_attempt }}
9999
restore-keys: |
100100
julia-cache;workflow=${{ github.workflow }};job=${{ github.job }};os=${{ runner.os }};group=${{ matrix.group }};version=${{ matrix.version }};
101+
- name: Refresh General registry directly from git
102+
shell: julia --color=yes --project=. {0}
103+
run: |
104+
using Pkg
105+
# Force a fresh git clone of General to dodge pkg server lag.
106+
# Must run BEFORE the Pkg.develop step below: that step's resolve
107+
# needs current versions of registered deps (e.g. SciMLBase v3,
108+
# CoverageTools), and the cached pkg-server registry is often
109+
# several days stale, so develop's resolve fails with "expected
110+
# package <X> to be registered".
111+
try
112+
Pkg.Registry.rm("General")
113+
catch
114+
end
115+
Pkg.Registry.add(Pkg.RegistrySpec(url = "https://github.com/JuliaRegistries/General.git"))
101116
- name: Develop local path deps (Julia < 1.11)
102117
shell: julia --color=yes --project=. {0}
103118
run: |
@@ -119,16 +134,6 @@ jobs:
119134
isempty(specs) || Pkg.develop(specs)
120135
end
121136
end
122-
- name: Refresh General registry directly from git
123-
shell: julia --color=yes --project=. {0}
124-
run: |
125-
using Pkg
126-
# Force a fresh git clone of General to dodge pkg server lag.
127-
try
128-
Pkg.Registry.rm("General")
129-
catch
130-
end
131-
Pkg.Registry.add(Pkg.RegistrySpec(url = "https://github.com/JuliaRegistries/General.git"))
132137
- uses: julia-actions/julia-buildpkg@v1
133138
- uses: julia-actions/julia-runtest@v1
134139
with:

.github/workflows/SublibraryCI.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,21 @@ jobs:
8282
continue-on-error: true
8383
with:
8484
cache-compiled: 'false'
85+
- name: Refresh General registry directly from git
86+
shell: julia --color=yes --project=. {0}
87+
run: |
88+
using Pkg
89+
# Force a fresh git clone of General to dodge pkg server lag.
90+
# Must run BEFORE the Pkg.develop step below: that step's resolve
91+
# needs current versions of registered deps (e.g. SciMLBase v3),
92+
# and the cached pkg-server registry is often several days stale,
93+
# so develop's resolve fails with "expected package <X> to be
94+
# registered".
95+
try
96+
Pkg.Registry.rm("General")
97+
catch
98+
end
99+
Pkg.Registry.add(Pkg.RegistrySpec(url = "https://github.com/JuliaRegistries/General.git"))
85100
- name: Develop local path deps (Julia < 1.11)
86101
shell: julia --color=yes --project=. {0}
87102
run: |

test/runtests.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ end
6161
# a higher-level sublibrary like OrdinaryDiffEqDefault.
6262
if VERSION < v"1.11.0-DEV.0"
6363
developed = Set{String}()
64+
# Never develop the active project: when sublibraries cyclically
65+
# reference each other via [sources] (e.g. DiffEqDevTools points
66+
# back at OrdinaryDiffEqCore), the transitive walk below would
67+
# otherwise try to `Pkg.develop` the active project itself, which
68+
# Pkg refuses with "package <X> has the same name or UUID as the
69+
# active project".
70+
push!(developed, normpath(joinpath(lib_dir, base_group)))
6471
specs = Pkg.PackageSpec[]
6572
queue = [joinpath(lib_dir, base_group)]
6673
while !isempty(queue)

0 commit comments

Comments
 (0)