Julia is missing the deactivate command

While true I think our documentation is still not as good as it could be. I think the relevant sentence

If no argument is given to activate , then activate the home project. The home project is specified by either the --project command line option to the julia executable, or the JULIA_PROJECT environment variable.

could be confusing for a beginner. What if I neither started Julia with --project nor set the JULIA_PROJECT environment variable and do ] activate? It’s not clear from the docstring what will happen in this case.

Also, note the use of the term “home project”. I reckon the difference between “home project” and “default project” (v1.x) is subtle to a beginner who, again, likely hasn’t specified a “home project”. In this context, let me also mention that the “default project” (v1.x) - which by default is equal to the “home project” - is special in the sense that it is (by another default) also the “global project”. A fact which is also not as clear from the documentation as it could be (you have to read about the LOAD_PATH to understand this, an advanced concept in my opinion).

As has been discussed on Slack at some point (@davidanthoff) I personally think that the “default project” shouldn’t be equal to the “global environment” (the one which automatically is in the LOAD_PATH) to begin with. I’d like extra syntax like ] add --global MyPackage for adding a package to a separate global environment. This way, confusions like this one, which came up just yesterday, could be easily avoided.

In any case, I think that the Pkg documentation in its entirety explains almost all features/mechanisms, but individual sections can be pretty confusing without reading the rest of the docs. I think we can do better and I hope to find the time to make a few PRs soon.

8 Likes