Problems with ] develop --local AbstractAlgebra

Sorry for asking the same question twice, but I didn’t manage to find a solution.

I want to check out a copy of AbstractAlgebra.jl to cut it down to a minimal example for a bug report for julia-1.2.0rc2.

Here are the steps I am undertaking:

  1. cd ~/.julia/environments/v1.2/dev
  2. rm -rf AbstractAlgebra
  3. cd ~/julia-1.2.0rc2/bin
  4. ./julia
  5. ] add AbstractAlgebra
  6. ] develop --local AbstractAlgebra
  7. Confirm that it has created the directory ~/.julia/environments/v1.2/dev/AbstractAlgebra
  8. using Pkg
  9. Pkg.test(“AbstractAlgebra”)

Here is the output of step 5:

(v1.2) pkg> add AbstractAlgebra
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
 Resolving package versions...
  Updating `~/.julia/environments/v1.2/Project.toml`
  [c3fe647b] ↓ AbstractAlgebra v0.5.2+ [`dev/AbstractAlgebra`] ⇒ v0.5.2
  Updating `~/.julia/environments/v1.2/Manifest.toml`
  [c3fe647b] ↓ AbstractAlgebra v0.5.2+ [`dev/AbstractAlgebra`] ⇒ v0.5.2

Here is the output of step 6:

(v1.2) pkg> develop --local AbstractAlgebra
  Updating git-repo `https://github.com/Nemocas/AbstractAlgebra.jl.git`
 Resolving package versions...
  Updating `~/.julia/environments/v1.2/Project.toml`
  [c3fe647b] ↑ AbstractAlgebra v0.5.2 ⇒ v0.5.2+ [`dev/AbstractAlgebra`]
  Updating `~/.julia/environments/v1.2/Manifest.toml`
  [c3fe647b] ↑ AbstractAlgebra v0.5.2 ⇒ v0.5.2+ [`dev/AbstractAlgebra`]

Here is the output of step 9:

julia> Pkg.test("AbstractAlgebra")
   Testing AbstractAlgebra
 Resolving package versions...
    Status `/tmp/jl_kl9fyn/Manifest.toml`
  [c3fe647b] AbstractAlgebra v0.5.2+ [`~/.julia/environments/v1.2/dev/AbstractAlgebra`]
  [2a0f44e3] Base64  [`@stdlib/Base64`]
  [8ba89e20] Distributed  [`@stdlib/Distributed`]
  [b77e0a4c] InteractiveUtils  [`@stdlib/InteractiveUtils`]
  [8f399da3] Libdl  [`@stdlib/Libdl`]
  [37e2e46d] LinearAlgebra  [`@stdlib/LinearAlgebra`]
  [56ddb016] Logging  [`@stdlib/Logging`]
  [d6f4376e] Markdown  [`@stdlib/Markdown`]
  [9a3f8284] Random  [`@stdlib/Random`]
  [9e88b42a] Serialization  [`@stdlib/Serialization`]
  [6462fe0b] Sockets  [`@stdlib/Sockets`]
  [2f01184e] SparseArrays  [`@stdlib/SparseArrays`]
  [8dfed614] Test  [`@stdlib/Test`]

Welcome to AbstractAlgebra version 0.1.2-dev

AbstractAlgebra comes with absolutely no warranty whatsoever

Note that this is the wrong version of AbstractAlgebra. We are up to 0.5.2, we don’t print banners any more, and I can confirm 100% that the tests are not the tests for 0.5.2. For example all the Module tests are missing.

What am I doing wrong?

How can I debug this?

To my knowledge I do not have AbstractAlgebra 0.1.2 installed anywhere.

I cannot just nuke my .julia directory. I am developing many packages and I cannot risk my only remaining working development environment being wrecked as I need it to do my job, not to mention that I am in the middle of working on many projects.

I have read the package documentation many times, but when I execute the commands there, I do not get the results that is suggests I should get, and I am totally confused about how the whole package system should work. (My fault entirely, I am sure it works for everyone else just fine and that I’m missing some prerequisite knowledge. But I have never used a similar system, so I am a total noob. I’m just explaining that this is a problem that neither I nor my colleagues have been able to solve and I really require some help after trying to sort it out ourselves.)

Did you also confirm that the content of this directory is what you expect? E.g. the content of the master branch?

It is possible that you are running into https://github.com/JuliaLang/Pkg.jl/issues/465, so instead of

you can try to rm -rf ~/.julia/clones/.

Thanks for the suggestion. Can I ask what nuking clones will do? I don’t want to mess up other projects I am working on.

The clones folder is just Pkg’s private caching of repositories, it will just be downloaded again if not found.

Thanks. Regarding whether it checked out the master branch, yes, the git repository has the master branch checked out. But that is not the master branch for AbstractAlgebra. It’s a really old copy of the master branch. I checked on GitHub to make sure someone didn’t screw up our master branch. It all looks ok on GitHub [1].

I’m sure this is a clue. But I can’t imagine what has gone wrong.

[1] https://github.com/Nemocas/AbstractAlgebra.jl

Sounds exactly like https://github.com/JuliaLang/Pkg.jl/issues/465 then.

Nuking clones seems to have made it check out the correct master.

(Now the test suite doesn’t hang… I guess our master has some workarounds for various type inference bugs we were hitting. I should be able to sort this by just checking out the released branch in the actual git repo. I have to change the pushurl anyway, as I don’t want to nuke our main repo after cutting it down to a minimal example. Isn’t it a little odd that the documentation says that if you encounter a bug to just do develop --local MyPkg, but that actually doesn’t check out a copy of the branch you had a problem with? Perhaps a clarification in the docs could be helpful here?)

But anyhow, this seems to have solved the main issue that was stopping me making any progress. So thanks very much!

Are you sure its #465? I don’t think our package satisfies any of Tim Holy’s 1., 2. or 3. Though I don’t completely understand the context, so I could be wrong.

Yeah, pretty sure it is #465. It is kinda silly how long we have left that one be open…

There’s only so much developer effort available I guess. And some things always seem more urgent. And any sufficiently complex projects have bottlenecks. I completely understand. Just glad I was able to get it sorted.

1 Like