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.default

and finally I add this backup to git, commit and push it. A manifest file with the ending .toml should never be committed to the git repo of a public package.

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.

I encountered no errors when I ran this on my laptop with Julia 1.12, in a new virtual environment. It’s unclear from your post if you’re created a new virtual environment or you’re working in an existing environment that could already contain other packages with incompatible dependency requirements.

After @ufechner7 suggestion, I deleted Manifest.toml, then I am also able to run in my new virtual environment. However, I get the same error if I try it from my installed Julia environment. I want it to work both ways. Is it possible to do this? I mean how to be careful while developing packages.

MethodOfLines is incompatible with SciCompDSL because it hasn’t been updated to MTK v11 yet.

When will it be added any info Chris?

Not sure right now. It’s the last major one to update in SciML but it is a decently large lift.