Compat of a child package ignored

I have a couple private packages I’m developing, let’s call them Pkg A and B (which is a dependency of A). For Pkg B, I have a dependency of TerminalLoggers.jl, which I’ve just set the compat section to

[compat]
TerminalLoggers = "= 0.1.0"

I pushed the update, and then ran pkg"update" in Pkg A which successfully updated Pkg B to the new version. But, the Manifest for Pkg A shows TerminalLoggers at version 0.1.5. My understanding is that Pkg B should be enforcing the compat rule, and TerminalLoggers should be forced to version 0.1.0.

Do I need to run another command to get the Manifest sorted?

I’m having a similar issue with CairoMakie. I have this package in my general environment (@1.8). Makie has a compat of

[compat]
FreeTypeAbstraction = "0.8, 0.9"

Somehow I keep getting FreeTypeAbstraction v0.10.0 in my Pkg A manifest and therefore when I try to load CairoMakie it errors. How can I ask Julia to respect the compat section of CairoMakie in my general environment? I don’t want to add CairoMakie to Pkg A for either the deps or extras section because I only want to use it in special cases, which is why I have it in my general environment.

I feel like I must be missing some call to Pkg to get the Manifest sorted before I attempt to load a package so the compat sections are respected.

Finally, one additional point, I also experience this issue when running a test of Pkg A. When running Pkg.test(), a clean Manifest is generated, right? I’m stumped as to why in the world I’m still getting TerminalLoggers v0.1.5 loading, when Pkg B has a compat that specifies v0.1.0 explicitly.

Here is my real world test output…

      Testing CatView
       Status `C:\Users\CarmanBr\AppData\Local\Temp\jl_0ZZT5i\Project.toml`
   [f03e0fa6] AM2App v0.6.8
   [43e84be3] CatView v0.5.5 `C:\Programs\azure\_work\9\s`
   [31115a61] CatapultData v0.2.4
   [86aefda3] CatapultFunctions v0.6.2
   [35d6a980] ColorSchemes v3.19.0
   [3da002f7] ColorTypes v0.11.4
   [a98d9a8b] Interpolations v0.14.4
   [46d4f523] Structures v0.2.6
   [f2d4222d] SystemData v0.5.4
   [ade2ca70] Dates `@stdlib/Dates`
   [9e88b42a] Serialization `@stdlib/Serialization`
   [8dfed614] Test `@stdlib/Test`
       Status `C:\Users\CarmanBr\AppData\Local\Temp\jl_0ZZT5i\Manifest.toml`
   [f03e0fa6] AM2App v0.6.8  #.................................................. Pkg B (dep of A)
...
   [43e84be3] CatView v0.5.5 `C:\Programs\azure\_work\9\s`  #................... Pkg A
...
   [f788264d] CatapultModel v0.6.3 #............................................ Pkg C (dep of B)
...
   [961ee093] ModelingToolkit v8.19.0
   [c7ce1f42] ModelingToolkitComponents v0.13.9 #............................... Pkg D (dep of C) [compat] TerminalLoggers = "= 0.1.0"
...
   [5d786b92] TerminalLoggers v0.1.5  #......................................... (dep of D) WHY IS THIS NOT 0.1.0 !!!!!!!!!

Additionally I’m getting different results on different computers, both running the same version of Julia on Windows 10. I’m assuming Pkg.test() generates a clean environment, but clearly something on the PC’s is influencing the versions installed. Is there something about the general environment that maybe causes Pkg.test() to load different verions?

OK, for anyone reading in the future, I’ve sorted this out.

  1. I simply had an error in my child [compat] section :man_facepalming:
  2. I missed an important point from Pkg.test documentation: “If a manifest file exists and the allow_reresolve keyword argument is set to false , the versions in the manifest file are used. Otherwise a feasible set of packages is resolved and installed.”

So I found myself with a working version on one computer because the project Manifest had the correct versions in it, but on my test computer the project is installed clean with no Manifest, therefore the test run started with the latest versions (and since my [compat] was wrong, I didn’t get the versions I was expecting)

1 Like