Understanding an "Unsatisfiable requirements" problems

I think I painted myself into a corner somehow with package requirements. The error message for trying to test TransformVariables#master is

pkg> test TransformVariables
   Testing TransformVariables
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package LogDensityProblems [6fdf6af0]:
 LogDensityProblems [6fdf6af0] log:
 ├─possible versions are: [0.2.0, 0.3.0, 0.4.0-0.4.1, 0.5.0-0.5.1, 0.6.0, 0.8.0-0.8.1] or uninstalled
 ├─restricted to versions * by an explicit requirement, leaving only versions [0.2.0, 0.3.0, 0.4.0-0.4.1, 0.5.0-0.5.1, 0.6.0, 0.8.0-0.8.1]
 └─restricted by compatibility requirements with TransformVariables [84d833dd] to versions: uninstalled — no versions left
   └─TransformVariables [84d833dd] log:
     ├─possible versions are: 0.3.0 or uninstalled
     └─TransformVariables [84d833dd] is fixed to version 0.3.0

This can be replicated by

pkg> add TransformVariables#master
pkg> test TransformVariables

In the Project.toml for LogDensityProblems, I have

[compat]
TransformVariables = "^0.2, ^0.3"

and no compat requirement in TransformVariables.

I don’t understand the error message and how to resolve it. Replicated on 1.2-pre0 and 1.1.

LogDensityTransforms are according to the registry compatible only with 0.2 of TransformVariables (https://github.com/JuliaRegistries/General/blob/master/L/LogDensityProblems/Compat.toml#L22). What you have in your Project file doesn’t matter unless the package is either devved or tracking a branch. add LogDensityProblems#master will likely make it work since then it is using your Project file. Releasing a new version of LogDensityProblems with that Project file should also do it.

Thanks, but the latest version was registered with that project file, so shouldn’t that compat spec be taken into account and reflected by the registry?

Alright, the reason is that the maximum version of TransformVariables in the Registry is 0.2 and the current script does some upper bounding based on the highest registered version. We are discussing how to resolve this right now.

3 Likes

I’m having similar issues here Package manager: what are "explicit requirements"?
and I can’t for my life figure out how to get around it :confused:

I am hoping that as soon as the new version is registered, my issue will be resolved in this specific case as the bounds in registry will be updated.

Unfortunately I don’t think this will be the case, because in https://github.com/JuliaRegistries/General/pull/228 we don’t update the bounds for LogDensityProblems. The fact that LogDensityProblems work with TransformVariables@0.3 was also “forgotten” in the compression algorithm in this PR: https://github.com/JuliaRegistries/General/pull/214

1 Like

To workaround this while it is being worked on, register TransformVariables version 0.3 and then after register LogDensityProblems and it should work.

1 Like

This fixed it, thanks.

1 Like