Skip to content

instantiate does not update registry sometimes? #1212

@nickrobinson251

Description

@nickrobinson251

I think instantiate does not update registries correctly?

I cloned a package Bar.jl with a dependency on a package Foo, but Foo.jl was only registered since I last updated, and when I ran instantiate Foo did not get installed. It require me specifically running update:

(Bar) pkg> instantiate
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
  Updating registry at `~/.julia/registries/Company`
  Updating git-repo `git@gitlab.company.ca:company/PrivateRegistry.git`

julia> using Foo
ERROR: ArgumentError: Package Foo [f7bf1965-0170-51b9-8c5f-a992d46b9575] is required but does not seem to be installed:
 - Run `Pkg.instantiate()` to install all recorded dependencies.

(Bar) pkg> up
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
  Updating registry at `~/.julia/registries/Company`
  Updating git-repo `git@gitlab.company.ca:company/PrivateRegistry.git`
 Resolving package versions...
 Installed Foo ────── v0.1.1
  Updating `~/Documents/code/Bar.jl/Project.toml`
  [f7bf1965] + Foo v0.1.1

(Bar) pkg> instantiate
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
  Updating registry at `~/.julia/registries/Company`
  Updating git-repo `git@gitlab.company.ca:company/PrivateRegistry.git`

julia> using Foo
[ Info: Precompiling Foo [f7bf1965-0170-51b9-8c5f-a992d46b9575]```

Julia v1.1.1

Perhaps this is realted to starting Julia with the Bar env instantiated - I ran julia --project=@., and there was only a Project.toml (no Manifest.toml) - maybe that does not update the registries, and then instantiate is a no-op (that claims to be updating the registries?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions