Maybe pkg> instantiate? Perhaps you never downloaded the General registry?
Also, PkgTemplates.jl is highly recommended for anything you intend to share with others. It sets up all the CI/documentation skeleton/etc for you, and is part of what contributes to that impression I’ve heard from many Python programmers, “wow, Julia packages are so consistent in their structure!”
would pkg> update download everything, or must it be pkg> instantiate?
Ok, clearly from the documentation, instantiate does the downloading (I didn’t do that). Must I do that in the “root” environment, or just ignore the root environment and only work on sub-environment/package things?
Unless you are planning to develop Julia itself, you are taking a hard path. Just download the binary from the Julia site or install juliaup and install Julia with it, and things will probably work. (and the use PkgTemplates)
There must be something unusual going on here. The expected result of doing those operations in an empty depot (pointing JULIA_DEPOT_PATH to an empty directory is effectively equivalent to deleting .julia) is:
$ cd /tmp
$ mkdir testdepot
$ JULIA_DEPOT_PATH=/tmp/testdepot julia
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.9.0 (2023-05-07)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
(@v1.9) pkg> generate Stuff
Generating project Stuff:
(@v1.9) pkg> activate Stuff
Activating project at `/tmp/Stuff`
(Stuff) pkg> status
Installing known registries into `/tmp/testdepot`
Project Stuff v0.1.0
Status `/tmp/Stuff/Project.toml` (empty project)
(Stuff) pkg> add FFTW
Updating registry at `/tmp/testdepot/registries/General.toml`
Resolving package versions...
Installed Preferences ───── v1.4.0
Did you do something else before these operations?
What you wrote is essentially what I did, but I remember it erroring out. I have some spare time to try it again fresh from the clone. I’ll make distclean in the git repo and delete ~/.julia again and post back.
# previously (i.e. yesterday)
# git clone https://github.com/JuliaLang/julia.git
# git checkout v1.9.0
rm -rf ~/.julia
And from the Julia session
and it worked without complaint!
Conclusion: yesterday was cursed somehow.
Note: I did not refresh my clone from yesterday, so any changes made remotely would not be the issue either.