Summary
On Julia 1.13.0-rc4, runtests throws before executing a single test item:
caused by: MethodError: no method matching setindex!(::Base.ScopedValues.ScopedValue{Bool}, ::Bool)
[1] _runtests_in_current_env(...)
@ ReTestItems ~/.julia/packages/ReTestItems/1eYMm/src/ReTestItems.jl:434
Test.TESTSET_PRINT_ENABLE changed from Base.RefValue{Bool} to
Base.ScopedValues.ScopedValue{Bool}. Reads ([]) still work; assignments ([] = x) no longer do.
Versions
- ReTestItems v1.35.2 (current release)
- Julia 1.13.0-rc4 — a release candidate, not nightly
Reproducer
julia> using Test
julia> typeof(Test.TESTSET_PRINT_ENABLE)
Base.ScopedValues.ScopedValue{Bool} # 1.13+ ; Base.RefValue{Bool} on 1.12
julia> Test.TESTSET_PRINT_ENABLE[] # reads still fine
true
julia> Test.TESTSET_PRINT_ENABLE[] = false
ERROR: MethodError: no method matching setindex!(::Base.ScopedValues.ScopedValue{Bool}, ::Bool)
Confirmed on 1.14.0-DEV.2072 locally; on 1.12.6 the same assignment succeeds. The rc4 failure is in
this CI run: https://github.com/PingoLee/Nitro.jl/actions/runs/34342130233
Affected sites
Six assignments in src/ReTestItems.jl — lines 434, 499, 510, 536, 613, 627.
(test/runtests.jl:39 reads the flag, which still works.)
This may not be a mechanical fix
The flag is disabled in one function and re-enabled in others (434 turns it off; 499 and 510 turn it
back on so finish prints). That lifetime is not lexically scoped, so
ScopedValues.with(TESTSET_PRINT_ENABLE => false) do ... end is not a drop-in substitute for the
assignments — the enable/disable regions would have to be restructured, or the flag handled behind a
version-conditional shim.
Relation to #234
#234 reported this same MethodError and was closed on the grounds that Julia nightly is often
broken and stabilizes near release. That reasoning is what I would have applied too, but the change
has now reached a release candidate — so unless it is reverted, 1.13.0 ships with
TESTSET_PRINT_ENABLE as a ScopedValue and ReTestItems is unusable there.
Possible CI gap
Project.toml declares julia = "1.8" with no upper bound, so 1.13 is within the supported range,
but the CI matrix is 1.8 / 1.10 / 1.12 — there is no pre-release entry, so nothing surfaces this
before 1.13.0 is out. A ~1.13.0-0 job (the -0 lower bound is what opts semver into
pre-releases) would catch this class of breakage during the RC window.
Workaround we are using
In Nitro.jl we marked the 1.13 suite job continue-on-error
and added a separate blocking smoke-test job that does not depend on ReTestItems, so 1.13 still gets
some coverage. That keeps CI honest but means the real suite has no 1.13 signal.
Investigated and drafted with Claude Code; reviewed and posted by
@PingoLee. The reproducer output above was run, not generated.
Summary
On Julia 1.13.0-rc4,
runteststhrows before executing a single test item:Test.TESTSET_PRINT_ENABLEchanged fromBase.RefValue{Bool}toBase.ScopedValues.ScopedValue{Bool}. Reads ([]) still work; assignments ([] = x) no longer do.Versions
Reproducer
Confirmed on 1.14.0-DEV.2072 locally; on 1.12.6 the same assignment succeeds. The rc4 failure is in
this CI run: https://github.com/PingoLee/Nitro.jl/actions/runs/34342130233
Affected sites
Six assignments in
src/ReTestItems.jl— lines 434, 499, 510, 536, 613, 627.(
test/runtests.jl:39reads the flag, which still works.)This may not be a mechanical fix
The flag is disabled in one function and re-enabled in others (434 turns it off; 499 and 510 turn it
back on so
finishprints). That lifetime is not lexically scoped, soScopedValues.with(TESTSET_PRINT_ENABLE => false) do ... endis not a drop-in substitute for theassignments — the enable/disable regions would have to be restructured, or the flag handled behind a
version-conditional shim.
Relation to #234
#234 reported this same
MethodErrorand was closed on the grounds that Julia nightly is oftenbroken and stabilizes near release. That reasoning is what I would have applied too, but the change
has now reached a release candidate — so unless it is reverted, 1.13.0 ships with
TESTSET_PRINT_ENABLEas aScopedValueand ReTestItems is unusable there.Possible CI gap
Project.tomldeclaresjulia = "1.8"with no upper bound, so 1.13 is within the supported range,but the CI matrix is
1.8 / 1.10 / 1.12— there is no pre-release entry, so nothing surfaces thisbefore 1.13.0 is out. A
~1.13.0-0job (the-0lower bound is what opts semver intopre-releases) would catch this class of breakage during the RC window.
Workaround we are using
In Nitro.jl we marked the 1.13 suite job
continue-on-errorand added a separate blocking smoke-test job that does not depend on ReTestItems, so 1.13 still gets
some coverage. That keeps CI honest but means the real suite has no 1.13 signal.
Investigated and drafted with Claude Code; reviewed and posted by
@PingoLee. The reproducer output above was run, not generated.