VSCode extension julia terminal not loading/adding `LocalRegistry` and private registries

I had to rebuild my computer OS recently. I run ubuntu 22.04 LTS. I reinstalled julia and vscode, but for some reason I am having trouble with julia registries.

So I use LocalRegistry for tracking development registries as well as the Juliahub registries. In my startup.jl script these registries get installed just fine. I believe that the LocalRegistry package says that the user just has to run the LocalRegistry command one time, and that is it. However, I find that when I load Visual Studio and click Ctrl+Enter to run a line of code inline, that the launched julia environment does not list the additional registries that I added. I am then getting errors in the repl about expecting packages to be registered, etc. But when I run registry status in the pkg prompt, I don’t see the registries that I added in the main julia environment, as I would in the past.

I have my JULIA_DEPOT_PATH variable set to point to the .julia folder that i moved to a different drive. When I try to run something like include("/drives/mydrive/.julia/config/startup.jl") then I still end up getting error messages about packages not being registered, so it seems like the lack of registries corrupts the whole repl. Not sure how to fix this. Do I need to manually add a flag to the launch configuration? Or is there something simple that I am missing?

Note that if I start julia from a VSCode terminal “New Terminal” and then manually start my project environment using julia --project=., then the registries show up. So again it has something to do with the startup.jl file not being loaded when I hit Ctrl+Enter. How would I fix that.

Try install LocalRegistry to the global env instead of the project env.

For what it’s worth this has nothing to do with LocalRegistry but everything to do with the registry functionality of the package manager. Also the registry management is not per environment but global in the depot, so I would suspect that something goes awry with your JULIA_DEPOT_PATH.

Addendum: Calling the internal function Pkg.depots1() might help you diagnose if the depot that Pkg actually uses matches your expectations.

@xgdgsc thank for the comment. I did install LocalRegistry in the global environment. I don’t have LocalRegistry in my project environment right now. Should I add LocalRegistry to my project environment as well? I thought I did not need to do that.