How to use develop --local MyPkg

I am having a problem with the test suite of AbstractAlgebra hanging on Julia 1.2.0-rc2 before any tests run (it’s fine on earlier versions of Julia; at least the latest version of the repository is fine, but we have a pull request that can trigger a similar hang in earlier versions of Julia too).

In order to debug it and try to construct a minimal example, I tried to use

] develop --local AbstractAlgebra

as described here:

https://docs.julialang.org/en/v1/stdlib/Pkg/index.html

But instead of checking out AbstractAlgebra-0.5.2 which is the version that hangs, it checks out a really old version of AbstractAlgebra (0.1.2 in fact).

Can someone explain how develop --local MyPkg is supposed to work, or maybe someone has an idea what I might be doing wrong.

I’m generally very confused about the difference between an environment, project and package.

I used to do:

] dev AbstractAlgebra

and I thought that checked out the current version into .julia/dev/AbstractAlgebra. But this doesn’t seem to work the same way any more.

It’s especially problematic if I want to create a new package. If I generate it and activate it then dev it, it complains about package and project having the same name if I try to activate the package, or something else goes wrong, depending on what commands I issue.

I’m having real trouble understanding from the documentation what I am doing wrong when trying to develop an existing or new package with recent Julia versions.

Works as expected for me. Maybe you already had AbstractAlgebra at that location? If so Pkg just uses whats there.

When I do Pkg.test(“AbstractAlgebra”) the manifest that is printed says:

AbstractAlgebra v0.5.2+ [~/.julia/environments/v1.2/dev/AbstractAlgebra]

So this shows it it using a directory for julia v1.2 (which I’ve only just installed yesterday). It also shows the AbstractAlgebra version as v0.5.2+, which is correct.

But when the tests run, it says:

Welcome to AbstractAlgebra version 0.1.2-dev

But we have removed the banner that is printed, in recent versions of AbstractAlgebra, and it doesn’t run all the tests that I would expect to see in AbstractAlgebra 0.5.2.

So even if there was something in the directory previously, I would not expect it to tell me it is using 0.5.2 and then use 0.1.2.

So either way, something is broken.

By the way, can I just delete that directory from the shell and try it again? Or do I need to issue a julia command to remove it?

there’s nothing mysterious going on, if you delete manually, Project and Manifest files will have inconsistent entries, that’s it. You can of course just nuke the whole .julia folder if you really want.

I’d prefer to not nuke my whole .julia folder. I am developing many projects simultaneously using previous versions of julia (including Julia LTS).

What is the correct way to remove the dev version without getting the manifest and project out of sync.

I really don’t want to set up .julia again because currently everything works with Julia LTS, and that is the only version of Julia that is currently working (except that I cannot figure out how to generate new projects/packages, or whatever they are called).