Interpreting Pkg add errors

I’m guessing from the following error that the version of RCall I’m attempting to install (in Julia 1.2) needs a different version of StatsModel than I’m using. But I can’t tell which version(s) it wants. Am I missing something?

I’ve found quite a few posts about interpreting these errors, but they generally result in a specific solution. I’m trying to understand what the error output means. See also https://github.com/JuliaLang/Pkg.jl/issues/819.

Background: I set up this environment a few months ago under Julia 1.1.1, including dev versions of StatsModels and GLM. GLM was to get the development code, and this in turn required a different version of StatsModels than the current package, as I recall. I think I manually edited some of the version info.

So it’s not surprising there are issues. But I can’t tell specifically what version of StatsModels RCall is expecting. I’ve interpolated some questions in the output.

(MyFirst) pkg> add RCall
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package StatsModels [3eaba693]:
 StatsModels [3eaba693] log:
 ├─possible versions are: 0.6.0 or uninstalled
  ## unclear whether this means RCall wants StatsModel 0.6.0
  ## or my environment only provides StatsModel 0.6.0.
  ## I presume the latter, since 0.6.0 is what I've got.
 ├─restricted to versions 0.6.0-0.6 by GLM [38e38edf], leaving only versions 0.6.0
 │ └─GLM [38e38edf] log:
 │   ├─possible versions are: 1.1.2 or uninstalled
 │   └─GLM [38e38edf] is fixed to version 1.1.2
 ├─StatsModels [3eaba693] is fixed to version 0.6.0
 └─found to have no compatible versions left with RCall [6f49c342]
   └─RCall [6f49c342] log:
     ├─possible versions are: [0.0.1-0.0.3, 0.1.0-0.1.2, 0.2.0-0.2.1, 0.3.0-0.3.2, 0.4.0-0.4.1, 0.5.0-0.5.2,0.6.0-0.6.4, 0.7.0-0.7.5, 0.8.0-0.8.1, 0.9.0, 0.10.0-0.10.6, 0.11.0, 0.12.0-0.12.1, 0.13.0-0.13.4] or uninstalled
      ## guessing these are versions of RCall, not of the StatsModel it wants.
      ## for one thing, 0.6.0 is on the OK list.
     ├─restricted to versions * by an explicit requirement, leaving only versions [0.0.1-0.0.3, 0.1.0-0.1.2,
0.2.0-0.2.1, 0.3.0-0.3.2, 0.4.0-0.4.1, 0.5.0-0.5.2, 0.6.0-0.6.4, 0.7.0-0.7.5, 0.8.0-0.8.1, 0.9.0, 0.10.0-0.10.6, 0.11.0, 0.12.0-0.12.1, 0.13.0-0.13.4]
     ├─restricted by julia compatibility requirements to versions: [0.12.0-0.12.1, 0.13.0-0.13.4] or uninstalled, leaving only versions: [0.12.0-0.12.1, 0.13.0-0.13.4]
     ## guessing this means because I'm using Julia 1.2 only the indicated versions of
     ## RCall are appropriate.
     └─restricted by compatibility requirements with DataFrames [a93c6f00] to versions: [0.9.0, 0.10.0-0.10.6, 0.11.0, 0.12.0-0.12.1, 0.13.0-0.13.3] or uninstalled, leaving only versions: [0.12.0-0.12.1, 0.13.0-0.13.3]
     ## Why are we talking about DataFrames? 0.18.3 is my installed version
       └─DataFrames [a93c6f00] log:
         ├─possible versions are: [0.1.0, 0.2.0-0.2.5, 0.3.0-0.3.16, 0.4.0-0.4.3, 0.5.0-0.5.12, 0.6.0-0.6.11, 0.7.0-0.7.8, 0.8.0-0.8.5, 0.9.0-0.9.1, 0.10.0-0.10.1, 0.11.0-0.11.7, 0.12.0, 0.13.0-0.13.1, 0.14.0-0.14.1, 0.15.0-0.15.2, 0.16.0, 0.17.0-0.17.1, 0.18.0-0.18.4, 0.19.0-0.19.4] or uninstalled
         └─restricted to versions 0.18.3 by an explicit requirement, leaving only versions 0.18.3

(MyFirst) pkg>

I found the dependencies, I think, by locating the registry (] registry status) and looking at the General\R\RCall\Compat.toml file which appears to have sections labelled with releases of RCall and required versions for the dependencies. In particular, it has

["0.13.4-0"]
DataFrames = "0.19.0-*"
StatsModels = "0.6"

for the lastest version. Earlier than that the StatsModel dependency specified for

["0.10.6-0.13.3"]
StatsModels = "0.2.4-0.5"

applies. So the only version consistent with my StatsModels is the most recent one.
However, my DataFrames were from the past:: 0.18.3, and thus not compatible with the latest RCall which requires 0.19 or higher… So no version of RCall was consistent with both installed versions.

I did a package update, bringing my DataFrames to 0.19.4, among other changes. I also did a git update for my dev’d StatsModels, taking it from 0.6.0 to 0.6.5.

After these steps ] add RCall succeeded.

Granted that the compatibility problems I encountered may be a bit tricky to summarize–though how about

Your environment’s StatsModels v0.18.3 requires RCall v0.13.4, but your environment’s DataFrames v 0.18.3 requires RCall v0.13.3. Impossible to satisfy.

–but the messages printed could be clearer, and ideally more helpful.

Even more generally, there doesn’t seem to be a way of discovering the dependency and versioning info except looking in the files. Given that each version of a a project may have a distinct set of dependencies things get complicated quickly.