Skip to content

ModelingToolkitBase discrete-system tests use SciMLBase without importing it #4937

Description

@ChrisRackauckas-Claude

Summary

The InterfaceII test group errors twice in ModelingToolkitBase/test/discrete_system.jl because the test file calls SciMLBase.successful_retcode without importing the SciMLBase module.

This reproduces in the OrdinaryDiffEq master IntegrationTest job on Julia 1.10.11:

https://github.com/SciML/OrdinaryDiffEq.jl/actions/runs/31478955487/job/93739213883

The final result is:

Test Summary:                                      | Pass  Error  Broken  Total      Time
InterfaceII                                        | 1036      2       7   1045  24m13.3s
  InterfaceII                                      | 1036      2       7   1045  24m13.3s
    Discrete System                                |   23      2             25     57.8s
ERROR: LoadError: Some tests did not pass: 1036 passed, 0 failed, 2 errored, 7 broken.

The two errors are:

Passing `nothing` to `u0`: Error During Test at .../ModelingToolkitBase/Bhj3l/test/discrete_system.jl:289
  Expression: SciMLBase.successful_retcode(sol)
  UndefVarError: `SciMLBase` not defined

initial conditionsare totermed appropriately: Error During Test at .../ModelingToolkitBase/Bhj3l/test/discrete_system.jl:336
  Expression: SciMLBase.successful_retcode(sol)
  UndefVarError: `SciMLBase` not defined

Reproduction

The failing job checked out:

  • OrdinaryDiffEq 9b5ea0b3b4a16b7417b2857efd5a94927c7de193
  • ModelingToolkit 92c27bb9fdcaa024ff190feb3d665452e33f9bd8
  • Julia 1.10.11
  • ModelingToolkit 11.39.0
  • ModelingToolkitBase 1.63.0

From the OrdinaryDiffEq checkout, with the ModelingToolkit checkout at downstream:

GROUP=InterfaceII julia +1.10 --project=downstream -e '
using Pkg
Pkg.develop(PackageSpec(path="."))
Pkg.develop(map(path -> Pkg.PackageSpec(; path = joinpath("lib", path)), readdir("lib")))
Pkg.update()
Pkg.test(coverage=true)
'

That is the command and environment used by the linked failing job.

Source boundary and fix direction

The relevant ModelingToolkitBase split commit retained these qualified SciMLBase.successful_retcode references in lib/ModelingToolkitBase/test/discrete_system.jl, but the file has no direct import SciMLBase:

fb2450e

The focused fix should import the owning module in that test file, for example:

import SciMLBase

I applied that one-line change in an isolated checkout, but did not complete a full patched GROUP=InterfaceII Pkg.test run. A standalone include attempt stopped earlier because its environment lacked the Pkg test extra OrdinaryDiffEqFunctionMap; therefore this report does not claim a passing-after result for the patch.

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