How to solve problem with TOML.jl?

In my application, that is not required yet, but I agree that it should be backported once that is fixed.

I updated TOML.jl to support Julia v1.0.

You can install it from package manager REPL as follows:

(v1.0) pkg> add https://github.com/wildart/TOML.jl.git#v0.4.0
7 Likes

Awesome, thanks so much! Could you also register the package such that we can use it in our REQUIRE files? That would be great.

There is another TOML.jl package occupying that spot in METADATA so it either needs to change name or wait until we swap over to the other registry which can handle multiple packages with the same name.

1 Like

That package seems to be abandoned since its REQUIRE contains julia 0.3. Maybe its author is fine with replacing the it with the more recent, just ported package. But probably one should first think about moving the wildart package to JuliaIO if @wildart is fine with that. Then its kind of clear that that will be the home for the one an only future TOML package.

3 Likes

Does it also have the same modifications as the one in Pkg has?

@kristoffer.carlsson: This now gets really tricky. I want to use the wildart TOML and did:

 pkg> add https://github.com/wildart/TOML.jl.git#v0.4.0

Then within my Project I had to add TOML into the REQUIRE file since it is a dependency. When I then clone my project it will not use the wildart one but the one that is in METADATA:

julia> using MPIUI
[ Info: Precompiling MPIUI [2d18b7e9-d7cf-55e5-b337-253b287f28b1]
\u250c Warning: Deprecated syntax `type` at /home/knopp/.julia/packages/TOML/FjcHF/src/TOML.jl:18.
\u2502 Use `mutable struct` instead.
\u2514 @ ~/.julia/packages/TOML/FjcHF/src/TOML.jl:18
ERROR: LoadError: syntax: invalid escape sequence

How can this be resolved?

Packages cannot depend on unregistered packages (at least not in the sense that they can just be pkg added), right now.

If you have an “application” (a package that you are setting as your active environment, and will not be depended on by other packages) then you can store whatever you want in there since everything is stored in the Manifest.

Yes but the advice in another thread was to put the depending package into the REQUIRE file. Here the particular issue now is that there is a package in METADATA that is old and deprecated. Without that, it would work, if a clone the unregistered packages upfront.

A hack is to remove TOML from

~/.julia/registries/General/Registry.toml

but this really is a hack.

Yes, the problem with REQUIRE files is that they cannot differentiate between two packages with the same name. With project files, these packages would have different UUIDs so we would know what “TOML” we are talking about.

Hm, we need a workaround for this because it makes depending on the TOML package impossible. Is there really no way that we switch the url in METADATA? I thought this has happened in the past when a package moved.

The Community encourages an admin to replace the METADATA that attaches very old and very unsupported and very unresponsive current claimant to TOML.jl with wildart’s.

@JeffreySarnoff: Thanks, I supposed that thats the way how this works. Do you know who is the one to be pinged here. As I have said above: Potentially it would be better to first move TOML.jl to JuliaIO which gives it the blessing that this will be the one and only TOML package in the future. That would (kindof) also justify dropping the old TOML (that does not work and Julia 0.6+).

1 Like

@StefanKarpinski is the shot-caller on this.

We’ll deal with it once we’ve switched over to the new General registry.

Thats ok, but this means that TOML.jl is currently not usable. Is the timeline days/weeks or are we talking about months? I will fork TOML.jl as TOML2.jl if this takes some time to get my package working on 0.7/1.0.

Sure, that seems like a reasonable interim solution. You could also ask @wildart to rename and register his package and maybe upstream the changes from the copy in stdlib.

No, it’s not impossible. You can manually clone the package and add it to the manifest, or you can use the Pkg.TOML module that is already provided in stdlib.

This works perfectly fine for me, although it’s not an ideal situation.

No that does not work since Pkg.TOML is broken and cannot read Arrays of floats.