ModelingToolkit.jl icon indicating copy to clipboard operation
ModelingToolkit.jl copied to clipboard

Backport #2719 to MTK v8

Open devmotion opened this issue 1 year ago • 1 comments

The PR backports #2719 to a MTK v8 on a new backport_8 branch. I can't use MTK v9 yet due to the incompatibility with Catalyst, so #2719 is not sufficient for my project.

devmotion avatar May 18 '24 21:05 devmotion

Format so tests run

ChrisRackauckas avatar May 19 '24 16:05 ChrisRackauckas

I reformatted the code (which blows up the diff). It seems only a subset of CI is run on PRs that do not target the master branch - one problem with the existing version bounds for MTK v8 are the breaking changes in SymbolicUtils 1.6.0 (see e.g. https://github.com/SciML/ModelingToolkit.jl/actions/runs/9150353436/job/25155026031#step:6:1243) and the ADTypes changes (and some incorrect version bounds in NonlinearSolve it seems: https://github.com/SciML/ModelingToolkit.jl/actions/runs/9150353436/job/25155025675?pr=2726#step:6:1903). In my package that's not too problematic since I pin these packages anyway but generally that's annoying for users.

devmotion avatar May 19 '24 21:05 devmotion

@thazhemadam do you know how to make this run?

ChrisRackauckas avatar May 20 '24 02:05 ChrisRackauckas

Can we just bound SymbolicUtils?

ChrisRackauckas avatar May 20 '24 12:05 ChrisRackauckas

Limit SymbolicIndexingInterface as well?

ChrisRackauckas avatar May 20 '24 22:05 ChrisRackauckas

Why? Most (all?) problems seem to be caused by ADTypes e.g. https://github.com/SciML/ModelingToolkit.jl/actions/runs/9159389647/job/25179664915?pr=2726#step:6:1826

devmotion avatar May 21 '24 20:05 devmotion

The problem here is indeed a package that claimed ADTypes v1 support without ensuring it, namely OptimizationBase. This bug was introduced in OptimizationBase v0.0.6 and only fixed in OptimizationBase v1.0.1, so if we want to amend the general registry we should remove ADTypes v1 compat in OptimizationBase v0.0.6, v0.0.7 and v1.0.0

Cross-ref:

  • https://github.com/SciML/OptimizationBase.jl/pull/37 (introduced bug)
  • https://github.com/SciML/OptimizationBase.jl/issues/44 (noticed bug)
  • https://github.com/SciML/OptimizationBase.jl/pull/46 (fixed bug)

Ping @Vaibhavdixit02

gdalle avatar May 22 '24 10:05 gdalle

Yeah we can do that, I am not sure how it can be changed in the registry though. Can it just be bounded to v1.0.1 here?

Vaibhavdixit02 avatar May 22 '24 10:05 Vaibhavdixit02

One option is to yank those versions, aka get rid of them completely. That's what I did in https://github.com/JuliaRegistries/General/pull/107391

https://github.com/JuliaRegistries/General?tab=readme-ov-file#when-is-yanking-a-release-appropriate

But I'm not sure it is necessary if you tag a v0.0.8 patch release removing the faulty compat entry?

gdalle avatar May 22 '24 11:05 gdalle

Let's discuss on the General PR https://github.com/JuliaRegistries/General/pull/107391

gdalle avatar May 22 '24 11:05 gdalle

@gdalle Tests still fail due to ADTypes it seems.

devmotion avatar May 23 '24 20:05 devmotion

It's installing OptimizationBase v0.0.7, which I thought I had yanked?

gdalle avatar May 23 '24 21:05 gdalle

The package servers can take awhile to get the updated registries.

ChrisRackauckas avatar May 23 '24 22:05 ChrisRackauckas

r

ChrisRackauckas avatar May 25 '24 16:05 ChrisRackauckas