Definitely still getting lost with Pkg3, but I think I’m getting better at figuring out how to actually get it to work.
I was going to ask for help, but in trying to describe the problem I eventually go things to work. I’ll leave those descriptions here though, to exemplify the difficulty / why I find Pkg3 to not be especially intuitive.
Trying to install an unregistered package that depends on another unregistered package:
(v1.0) pkg> dev https://github.com/BriceonWiley/ConfidenceIntervalComparisons.jl
Updating git-repo `https://github.com/BriceonWiley/ConfidenceIntervalComparisons.jl`
ERROR: expected a `name` entry in project file at /tmp/tmpKDBgq6/Project.toml
(v1.0) pkg> dev /home/chriselrod/.julia/dev/ConfidenceIntervalComparisons.jl
Resolving package versions...
ERROR: Unsatisfiable requirements detected for package AsymptoticPosteriors [5ebe76dc]:
AsymptoticPosteriors [5ebe76dc] log:
├─AsymptoticPosteriors [5ebe76dc] has no known versions!
└─restricted to versions * by ConfidenceIntervalComparisons [904d08c6] — no versions left
└─ConfidenceIntervalComparisons [904d08c6] log:
├─possible versions are: 0.1.0 or uninstalled
└─ConfidenceIntervalComparisons [904d08c6] is fixed to version 0.1.0
This is the Project.toml:
name = "ConfidenceIntervalComparisons"
uuid = "904d08c6-8d09-11e8-1189-87850a518ab4"
authors = ["Briceon Wiley <Briceon_Wiley@baylor.edu>"]
version = "0.1.0"
[deps]
AsymptoticPosteriors = "5ebe76dc-7dd7-11e9-2992-2706ab89a682"
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
Cubature = "667455a9-e2ce-5579-9412-b964f529a492"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
DifferentiableObjects = "e829a12a-7dbf-11e8-18a8-f94f525a9d85"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Optim = "429524aa-4258-5aef-a3af-852621145aeb"
SIMDArrays = "604d08c6-8d09-11e8-1189-87850a518ab4"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
jBLAS = "814864de-88d5-11e8-1c72-cfea32f978d7"
It clearly has a name. Most of those changes are local, but the name also exists on Github here.
When activating ConfidenceIntervalComparisons…
(ConfidenceIntervalComparisons) pkg> st
Project ConfidenceIntervalComparisons v0.1.0
Status `Project.toml`
[5ebe76dc] + AsymptoticPosteriors v0.1.0 [`~/.julia/dev/AsymptoticPosteriors`]
Located at ~/.julia/dev/AsymptoticPosteriors
, I have
name = "AsymptoticPosteriors"
uuid = "5ebe76dc-7dd7-11e9-2992-2706ab89a682"
authors = ["chriselrod <elrodc@gmail.com>"]
version = "0.1.0"
However, I noticed st
from the v1.0 environment lists a different uuid for AsymptoticPosteriors than what it actually has (even though it loads the library correctly!):
(v1.0) pkg> st
Status `~/.julia/environments/v1.0/Project.toml`
[7d9fca2a] Arpack v0.2.3+ [`~/.julia/dev/Arpack`]
[c69eeb19] AsymptoticPosteriors v0.1.0 [`~/.julia/dev/AsymptoticPosteriors`]
My first instinct was to update Julia’s Project.toml to match what the package says. However, that turned out not to be a good idea:
(v1.0) pkg> resolve
Resolving package versions...
ERROR: Unsatisfiable requirements detected for package AsymptoticPosteriors [5ebe76dc]:
AsymptoticPosteriors [5ebe76dc] log:
├─AsymptoticPosteriors [5ebe76dc] has no known versions!
└─restricted to versions * by an explicit requirement — no versions left
So, now I instead reverted that change, and replaced the instances of AsymptoticPosteriors’ uuid in the Manifest.toml and Project.toml of ConfidenceIntervalComparisons with the same uuid from Julia 1.0’s Project.toml. Now, finally, I could install that package:
(v1.0) pkg> dev /home/chriselrod/.julia/dev/ConfidenceIntervalComparisons.jl
Resolving package versions...
Updating `~/.julia/environments/v1.0/Project.toml`
[904d08c6] + ConfidenceIntervalComparisons v0.1.0 [`~/.julia/dev/ConfidenceIntervalComparisons.jl`]
Updating `~/.julia/environments/v1.0/Manifest.toml`
[324d7699] + CategoricalArrays v0.3.13
[944b1d66] + CodecZlib v0.5.0
[904d08c6] + ConfidenceIntervalComparisons v0.1.0 [`~/.julia/dev/ConfidenceIntervalComparisons.jl`]
[667455a9] + Cubature v1.2.2
[a93c6f00] + DataFrames v0.13.1
[9a8bc11e] + DataStreams v0.4.1
[31c24e10] + Distributions v0.16.4
[90014a1f] + PDMats v0.9.5
[1fd47b50] + QuadGK v2.0.2
[189a3867] + Reexport v0.2.0
[4c63d2b9] + StatsFuns v0.7.0
[3bb67fe8] + TranscodingStreams v0.8.1
[ea10d353] + WeakRefStrings v0.5.3
[9fa8497b] + Future
[4607b0f0] + SuiteSparse
Where did that other, “correct”, uuid come from? Can I find it anywhere other than the Project.toml?
For the other libraries I checked, Julia’s Project.toml uuid matched the canonical one specified by the package. Should I update AsymptoticPosteriors’s Project.toml to match Julia v1.0’s, even though things seem to work as is? (Ie, using AsymptoticPosteriors
loads the latest changes I made to that library).
Why did resolve and st after activating ConfidenceIntervalComparisons work with the “wrong”/canonical uuid of AsymptoticPosteriors, but not within Julia 1.0’s repl?