Skip to content

Julia 1.13: runtests fails immediately — Test.TESTSET_PRINT_ENABLE is now a ScopedValue, not a Ref #243

Description

@PingoLee

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions