How to solve problem with TOML.jl?


#1

I just saw nice dependency graph from @kristoffer.carlsson

Code starts with:

cd("/Users/kristoffer/julia/stdlib")
import TOML

So I tried it and get:

ERROR: ArgumentError: Module TOML not found in current path.
Run `Pkg.add("TOML")` to install the TOML package.

So far so good everything was expected.
Problem is that Pkg.add("TOML") install https://github.com/pygy/TOML.jl which is obsolete.

By digging at https://github.com/JuliaLang/Pkg3.jl I see that there is https://github.com/JuliaLang/Pkg3.jl/tree/master/ext/TOML which is “borrowed” from https://github.com/wildart/TOML.jl .

But https://github.com/JuliaLang/Pkg3.jl/blob/master/ext/TOML/README.md says: "Installation: julia> Pkg.clone(“https://github.com/wildart/TOML.jl.git”) "

So now I am not sure if it is good idea to install TOML.jl in this time.

But probably Pkg.add behaviour for this package could be changed? (at least not to install package which is incompatible with Julia version)

What is best way to fix this?


#2

Since the package is not registered, you can just do Pkg.clone like you thought.


#3

Is it not a problem that obsolete package with same name is registered?


#4

Now Pkg3/Pkg is the default package handler for 1.0, and Pkg depends on TOML, isn’t it odd that it’s unregistered and we have to install it separately if we want to use TOML ourselves?


#5

Yes, sorting this out is future work. The priority was on getting something working.


#6

Fair enough - is this because it’ll be tricky to upgrade a Pkg dependency using Pkg if TOML needs changing? Or just a pure time issue?


#7

Time and effort. @wildart did an early prototype using his own TOML parser implementation, which is the one bundled with Pkg3. The registered TOML parser didn’t handle some of the formats that we needed and it wasn’t worth spending time on TOML parsing with so much other work to do. At no point since then has it been a top priority to unbundle the TOML parser and finalize its API.