Skip to content

ModelingToolkitBase: allow DomainSets 0.8#4586

Merged
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:claude/domainsets-0.8-mtkbase
Jun 4, 2026
Merged

ModelingToolkitBase: allow DomainSets 0.8#4586
ChrisRackauckas merged 1 commit into
SciML:masterfrom
ChrisRackauckas-Claude:claude/domainsets-0.8-mtkbase

Conversation

@ChrisRackauckas-Claude

@ChrisRackauckas-Claude ChrisRackauckas-Claude commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Please ignore until reviewed by @ChrisRackauckas.

What

Widen the ModelingToolkitBase DomainSets compat bound from 0.6, 0.7 to 0.6, 0.7, 0.8 (and bump the version 1.42.1 -> 1.42.2).

Why

This is required to unblock the DomainSets 0.7 -> 0.8 dependabot bump in MethodOfLines.jl (SciML/MethodOfLines.jl#564). While diagnosing that PR I found that PDEBase was not the only blocker: ModelingToolkitBase also pins DomainSets = "0.6, 0.7", so any package that pulls ModelingToolkit (PDEBase, MethodOfLines, ...) cannot resolve DomainSets 0.8. Forcing DomainSets 0.8 in a MethodOfLines test environment produces:

ERROR: Unsatisfiable requirements detected for package ModelingToolkitBase [7771a370]:
 └─restricted by compatibility requirements with DomainSets [5b8099bc] to versions: uninstalled
   └─DomainSets [5b8099bc] restricted to versions 0.8 by an explicit requirement, leaving only versions: 0.8.0

Symbolics already supports DomainSets 0.8 (DomainSets = "0.6 - 0.8" from Symbolics 7.18.1), so ModelingToolkitBase is the last piece of the core MTK stack still capping it at 0.7.

DomainSets 0.8 breaking changes and why they don't affect ModelingToolkitBase

DomainSets v0.8.0 (JuliaApproximation/DomainSets.jl#178):

  1. Removed an old type piracy so DomainSets.× and LinearAlgebra.× are now distinct functions.
  2. Unexported some internal symbols that now live in FunctionMaps.jl.

ModelingToolkitBase's only DomainSets usage is in lib/ModelingToolkitBase/src/utils.jl (and import DomainSets in the module):

const AnyInterval{T} = DomainSets.Interval{A, B, T} where {A, B}
...
lo, hi = unwrap.(DomainSets.endpoints(domain))
lo, hi = DomainSets.endpoints(domain)

DomainSets.Interval and DomainSets.endpoints are fully qualified and remain exported/defined in DomainSets 0.8 (verified locally below). No bare × and no unexported internals are used, so no source changes are required — only the compat bound.

Local verification

DomainSets 0.8.0 provides every name ModelingToolkitBase uses:

DomainSets version: 0.8.0
endpoints defined: true
endpoints(iv) = (0.0, 2.0)
Interval ctor works: 0.0 .. 2.0
AnyInterval alias ok; iv isa AnyInterval: true

With this ModelingToolkitBase branch + a DomainSets-0.8-compatible PDEBase developed into a MethodOfLines test environment, resolution succeeds and selects DomainSets 0.8.0, ModelingToolkitBase 1.42.2, and the full MTK/OrdinaryDiffEq/NonlinearSolve stack precompiles cleanly. ModelingToolkitBase precompiled successfully against DomainSets 0.8.0 (the pre-existing @nospecialize annotation only supported on the first 32 arguments warning is unrelated to this change). See the MethodOfLines PR for the full passing test output.

🤖 Generated with Claude Code


Part of the DomainSets 0.8 set: SciML/MethodOfLines.jl#565 (consumer), SciML/PDEBase.jl#81 (the other 0.7 pin).

ModelingToolkitBase only uses `DomainSets.Interval` and
`DomainSets.endpoints`, both fully qualified and still exported in
DomainSets 0.8. The breaking changes in DomainSets 0.8 (removal of the
old `×` type piracy and unexporting some internals now living in
FunctionMaps.jl) do not affect this code, so only the compat bound needs
widening to admit 0.8.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
@ChrisRackauckas ChrisRackauckas marked this pull request as ready for review June 4, 2026 10:50
@ChrisRackauckas ChrisRackauckas merged commit edf7aa2 into SciML:master Jun 4, 2026
66 of 85 checks passed
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