In a fresh Julia depot:
julia> import Example
│ Attempted to find missing packages in package registries but no registries are installed.
└ Use package mode to install a registry. `pkg> registry add` will install the default registries.
ERROR: ArgumentError: Package Example not found in current path.
- Run `import Pkg; Pkg.add("Example")` to install the Example package.
Stacktrace:
Contrast that with the behavior if you already have the General registry, which I think is a nicer experience:
julia> import Example
│ Package Example not found, but a package named Example is available from a registry.
│ Install package?
│ (@v1.14) pkg> add Example
└ (y/n/o) [y]:
In the first case, if the General registry is not found locally, could we display a (y/n) [y] prompt to the user, and if they enter y (or press Enter), then we automatically run ] registry add for them? I think that would be a nicer user experience?