Copying Project.toml doesn't install pakages (and throws error)

#1

I have a Project.toml file that I copy to new machine’s environment/v1.1 folder and run Pkg.resolve() to install all packages and dependencies. Is this the right way in Julia v1.1?

In case it’s the right way, it break randomly with error:

ERROR: Unsatisfiable requirements detected for package Redis [0cf705f9]:
 Redis [0cf705f9] log:
 ├─possible versions are: [0.0.1-0.0.2, 0.1.0-0.1.1] or uninstalled
 ├─restricted to versions * by an explicit requirement, leaving only versions [0.0.1-0.0.2, 0.1.0-0.1.1]
 └─restricted by julia compatibility requirements to versions: uninstalled — no versions left

To circumvent the problem , I used the old way of creating REQUIRE file and creating a startup file like below.

using Pkg

function Pkg_update()
    pkgs = readlines(joinpath(homedir(), ".julia", "REQUIRE"))
    Pkg.add(pkgs)
    Pkg.update(pkgs)
end

Pkg_update()
Pkg.add(PackageSpec(name="Redis", rev="master"))

based on Does 0.7 support REQUIRE?

Strangely, the second process works and end up generating the exactly the same Project.toml file in environment/v1.1 as the one I copied (but didn’t work)

Can someone please tell me what’s the right way of using Project.toml?

0 Likes

#2

It just seems that Redis doesn’t support julia versions over 0.7.

0 Likes

#3

It apparently does now, but hasn’t been tagged yet (it hasn’t seen a tag since 2016!). Once that’s done this should work without the above script.

0 Likes

#4

But master version of Redis repo does work with Julia v1.1

0 Likes