# METADATA vs Registry

**URL:** <https://discourse.julialang.org/t/metadata-vs-registry/21688>\
**Category:** Internals & Design\
**Tags:** pkg, metadata\
**Created:** [March 10, 2019, 12:14am UTC](https://discourse.julialang.org/t/metadata-vs-registry/21688 "2019-03-10T00:14:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![OliverEvans96](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oliverevans96/32/4177_2.png) [@OliverEvans96](https://discourse.julialang.org/u/OliverEvans96)\
**Post date:** [March 10, 2019, 12:14am UTC](https://discourse.julialang.org/t/metadata-vs-registry/21688/1 "2019-03-10T00:14:47Z")

</div>

Hi all,

In the v0.6 documentation, there’s a [section](https://docs.julialang.org/en/v0.6/manual/packages/#Custom-METADATA-Repository-1) about maintaining a custom metadata repository. That section seems to have disappeared in the v1.0, and the `Pkg.init` command is not present in `Pkg3`. In the v1.1, this seems to be replaced by the concept of federated [registries](https://julialang.github.io/Pkg.jl/v1/registries/).

However, both [Metadata.jl](https://github.com/JuliaLang/METADATA.jl) and the [General Registry](https://github.com/JuliaRegistries/General) appear to be actively updated (and @StefanKarpinski seems to be working on syncing them [right now](https://github.com/JuliaRegistries/General/commit/9230caadca71504edeb583db3e6e4388f5fcfc99)).

So, what’s the relationship between the two concepts and what’s the current best practice for locally overriding official package dependencies?

Thanks!  
Oliver

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [March 10, 2019, 6:56am UTC](https://discourse.julialang.org/t/metadata-vs-registry/21688/2 "2019-03-10T06:56:45Z")

</div>

> [@OliverEvans96](#):
>
> So, what’s the relationship between the two concepts

AFAIK at the moment the general registry is automatically synced from METADATA.jl.

> [@OliverEvans96](#):
>
> what’s the current best practice for locally overriding official package dependencies?

It is not clear what you mean by this. If a package has certain explicit dependencies, it is very likely that changing them would break the package. You can

```julia
pkg> dev ThatPackage

```

and experiment though.

---

<div class="post-metadata">

**Author:** ![OliverEvans96](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oliverevans96/32/4177_2.png) [@OliverEvans96](https://discourse.julialang.org/u/OliverEvans96)\
**Post date:** [March 10, 2019, 3:27pm UTC](https://discourse.julialang.org/t/metadata-vs-registry/21688/3 "2019-03-10T15:27:42Z")

</div>

Thanks! Sorry for being vague - let me be more specific. It seems that Polyhedra.jl is compatible only with JuMP up to v0.18 based on the following error I’m getting.

```julia
(v1.1) pkg> st
    Status `~/.julia/environments/v1.1/Project.toml`
  [3391f64e] CDDLib v0.4.1
  [336ed68f] CSV v0.4.3
  [9961bab8] Cbc v0.6.0
  [861a8166] Combinatorics v0.7.0
  [a93c6f00] DataFrames v0.17.1
  [60bf3e95] GLPK v0.9.1
  [3c7084bd] GLPKMathProgInterface v0.4.4
  [4076af6c] JuMP v0.19.0+ [`~/.julia/dev/JuMP`]
  [b8f27783] MathOptInterface v0.8.3
  [fdba3010] MathProgBase v0.7.7
  [67491407] Polyhedra v0.4.5
  [295af30f] Revise v1.1.0

(v1.1) pkg> dev Polyhedra
[ Info: Path `/home/oliver/.julia/dev/Polyhedra` exists and looks like the correct package, using existing path
 Resolving package versions...
ERROR: Unsatisfiable requirements detected for package JuMP [4076af6c]:
 JuMP [4076af6c] log:
 ├─possible versions are: 0.19.0 or uninstalled
 ├─JuMP [4076af6c] is fixed to version 0.19.0+
 └─restricted to versions 0.16.0-0.18 by Polyhedra [67491407] — no versions left
   └─Polyhedra [67491407] log:
     ├─possible versions are: 0.4.5 or uninstalled
     └─Polyhedra [67491407] is fixed to version 0.4.5+

```

However, the `REQUIRE` file in Polyhedra.jl is

```julia
julia 0.7
StaticArrays 0.5
MathProgBase 0.5.10 0.8
JuMP 0.16 0.19
GeometryTypes 0.4
RecipesBase 0.2

```

The Polyhedra entry in the General registry seems to allow JuMP up to 0.19 as well:

```julia
oliver@oliver-acer:~/.julia/registries/General/P/Polyhedra (master=) % git remote -v
origin	https://github.com/JuliaRegistries/General.git (fetch)
origin	https://github.com/JuliaRegistries/General.git (push)
oliver@oliver-acer:~/.julia/registries/General/P/Polyhedra (master=) % git fetch
oliver@oliver-acer:~/.julia/registries/General/P/Polyhedra (master=) % cat Compat.toml
["0.0"]
GLAbstraction = "0.0-0.6"
GLVisualize = "0.0-0.7"
julia = "0.4-0.7"

["0.0-0.1"]
DataStructures = "0.2-0.15"
FixedSizeArrays = "0.0-0.2"
GeometryTypes = "0.0-0.7"

["0.1"]
julia = "0.5-0.7"

["0.1.0-0.1.2"]
MathProgBase = "0.1-0.7"

["0.1.2-0.1.3"]
JuMP = "0.1-0.19"

["0.1.3"]
MathProgBase = "0.5.10"

["0.1.4-0.2.2"]
MathProgBase = "0.5.10-0.6"

["0.1.4-0.4"]
JuMP = "0.16-0.19"

["0.2-0.3"]
julia = "0.6-0.7"

["0.2-0.4"]
GeometryTypes = "0.4-0.7"
RecipesBase = "0.2-0.6"
StaticArrays = "0.5-0.10"

["0.2.3-0.4"]
MathProgBase = "0.5.10-0.7"

["0.3"]
MultivariatePolynomials = "0.1.1-0.2"

["0.4"]
julia = "0.7-1.2"

```

So I’m wondering why `Pkg3` thinks that Polyhedra is only compatible with JuMP \<= v0.18, and how I can go about overriding that. Much of Polyhedra.jl is already compatible with JuMP v0.19, and I’m currently updating one part that’s still using the old API.

I hope that’s not too much detail 🙂

Thanks!  
Oliver

---

<div class="post-metadata">

**Author:** ![rdeits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdeits/32/286_2.png) [@rdeits](https://discourse.julialang.org/u/rdeits)\
**Post date:** [March 10, 2019, 8:50pm UTC](https://discourse.julialang.org/t/metadata-vs-registry/21688/4 "2019-03-10T20:50:50Z")

</div>

Those version ranges are _inclusive_ of the lower bound but _exclusive_ for the upper bound. That is, the statement in `REQUIRE` that reads:

```julia
JuMP 0.16 0.19

```

means that JuMP versions in `[0.16, 0.19)` are compatible. That doesn’t include 0.19.

You can find documentation for the `REQUIRE` syntax here: [Packages · The Julia Language](https://docs.julialang.org/en/v0.6/manual/packages/#Requirements-Specification-1) The asymmetrical ranges are a bit odd, but it’s really the only practical choice. If `JuMP 0.16 0.19` included version 0.19, then how would you specify compatibility with any 0.18.x version but not 0.19 (since there is no way to know how many 0.18.x versions will eventually exist)? You could write `0.16 0.18.9999999` but that’s not guaranteed to work. With the specified understood to mean `[0.16, 0.19)` it’s easy to specify the kind of compatibility requirements you’re likely to need.

As for the `0.1-0.19` syntax in the `Project.toml` file, I’m not entirely sure what that does. I assume it’s the same as the REQUIRE syntax, but it’s not documented in the allowed version specifiers: [6. Compatibility · Pkg.jl](https://julialang.github.io/Pkg.jl/v1/compatibility/)

---

<div class="post-metadata">

**Author:** ![OliverEvans96](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oliverevans96/32/4177_2.png) [@OliverEvans96](https://discourse.julialang.org/u/OliverEvans96)\
**Post date:** [March 11, 2019, 12:28am UTC](https://discourse.julialang.org/t/metadata-vs-registry/21688/5 "2019-03-11T00:28:36Z")

</div>

Thank you! That answers my question!
