Issue adding Julia package from GitHub: Unsatisfiable requirements (SymbolicUtils / SciCompDSL / ModelingToolkit)

Unsatisfiable requirements when adding package from GitHub (SymbolicUtils / SciCompDSL / MTK)

Hi everyone,

I’m developing a Julia package for acausal hydropower system modeling based on
ModelingToolkit.jl and ModelingToolkitStandardLibrary.jl.

The package works correctly in my local development environment, but when I try to
add it from GitHub into a fresh Julia environment, I consistently hit an
unsatisfiable requirements error.


Package

GitHub repository:


How I add the package

using Pkg
Pkg.add(url = "https://github.com/pandeysudan1/VannKraft.jl")

Error summary

The resolver reports conflicts involving the following packages:

  • SymbolicUtils
  • SciCompDSL
  • ModelingToolkitStandardLibrary
  • MethodOfLines

From the resolver output, it appears that:

  • SciCompDSL restricts SymbolicUtils to 4.x
  • VannKraft.jl currently pins SciCompDSL = 1
  • MethodOfLines compatibility constraints leave no valid versions once everything
    is combined

The full resolver error is attached as an image.


Current test setup

Full resolver error

(@v1.12) pkg> add https://github.com/pandeysudan1/VannKraft.jl
    Updating git-repo `https://github.com/pandeysudan1/VannKraft.jl`
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package SymbolicUtils [d1185830]:
 SymbolicUtils [d1185830] log:
 ├─possible versions are: 0.1.0 - 4.15.0 or uninstalled
 ├─restricted by compatibility requirements with SciCompDSL [91a8cdf1] to versions: 4.0.0 - 4.15.0
 │ └─SciCompDSL [91a8cdf1] log:
 │   ├─possible versions are: 1.0.0 or uninstalled
 │   └─restricted to versions 1 by VannKraft [9821a89c], leaving only versions: 1.0.0
 │     └─VannKraft [9821a89c] log:
 │       ├─possible versions are: 1.0.0 or uninstalled
 │       └─VannKraft [9821a89c] is fixed to version 1.0.0-DEV
 └─restricted by compatibility requirements with MethodOfLines [94925ecb] to versions: [0.19.0 - 0.19.11, 1.0.0 - 3.32.0] — no versions left
   └─MethodOfLines [94925ecb] log:
     ├─possible versions are: 0.1.0 - 0.11.9 or uninstalled
     └─restricted to versions * by project [0bb83022], leaving only versions: 0.1.0 - 0.11.9
       └─project [0bb83022] log:
         ├─possible versions are: 0.0.0 or uninstalled
         └─project [0bb83022] is fixed to version 0.0.0

Question

  • What is the recommended way to resolve this kind of dependency conflict
    in [compat]?

I’m happy to restructure dependencies or open a PR once the right direction is clear.

Thanks a lot for your help.

Can you delete Manifest.toml from your package’s repo and see if that helps?

If I have a working package, I usually do first:

mv Manifest.toml Manifest-v1.12.toml 

assuming I am using Julia 1.12.

Then I create a backup

cp Manifest-v1.12.toml Manifest-v1.12.toml.toml

and finally I add this backup to git, commit and push it.

If updating the packages should now result in breaking my package, I can restore the last working set of packages, find out which of my dependencies is causing a problem and then either pin the last working version in Package.toml, and/or report a bug.