# More informative Project.toml or partial Manifest.toml

**URL:** <https://discourse.julialang.org/t/more-informative-project-toml-or-partial-manifest-toml/92804>\
**Category:** General Usage\
**Tags:** package-manager, dependencies\
**Created:** [January 11, 2023, 12:26pm UTC](https://discourse.julialang.org/t/more-informative-project-toml-or-partial-manifest-toml/92804 "2023-01-11T12:26:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![filchristou](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/filchristou/32/26760_2.png) [@filchristou](https://discourse.julialang.org/u/filchristou)\
**Post date:** [January 11, 2023, 12:26pm UTC](https://discourse.julialang.org/t/more-informative-project-toml-or-partial-manifest-toml/92804/1 "2023-01-11T12:26:32Z")

</div>

In the realm of unregisted and local packages, it’s quite common to always carry around the `Manifest.toml` file. That is because it’s the only way to inform julia about the whereabouts of a package that is not in the public registry.

However I find this solution extreme. `Manifest.toml` contains a complete list for the instantiation of all involved packages and their dependencies.  
But I don’t want to “freeze” all packages in the exact versions since the time I generated the `Manifest.toml`.

Instead I would like to cherry-pick which packages should be “frozen” and the rest be flexible.  
That brings me to what I called in the title a “partial `Manifest.toml`” where only some packages are specified how they should be instantiated.  
The same solution could be brought with a more “informative `Project.toml`”, that simply highlights the location for only specific packages.

## Example

Let’s say my package environment is as follows:

```julia-auto
Status `~/.julia/dev/MyPackage/Project.toml`
  [ffbed154] DocStringExtensions v0.9.3
  [8f5d6c58] EzXML v1.1.0
  [aa1b3936] GraphIO v0.6.0 
  [86223c79] Graphs v1.7.4
  [626554b9] MetaGraphs v0.7.1 `https://github.com/filchristou/MetaGraphs.jl#fixIssue29`

```

The versions and location of the packages are all inside the `Manifest.toml`  
and the `Project.toml` contains the minimum information:

```julia-auto
[deps]
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
EzXML = "8f5d6c58-4d21-5cfd-889c-e3ad7ee6a615"
GraphIO = "aa1b3936-2fda-51b9-ab35-c553d3a640a2"
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
MetaGraphs = "626554b9-1ddb-594c-aa3c-2596fe9399a5"

```

I don’t want to supply a 3rd party with just the `Project.toml` because `MyPackage` will malfunction.  
And neither I want to supply a 3rd party with the `Manifest.toml` because all exact versions are not needed.

**Is there a middle ground ?**  
I would like the user to see this before `instantiate`-ing `MyPackage` :

```julia-auto
(MyPackage) pkg> st
Project MyPackage v0.1.0
Status `~/.julia/dev/MyPackage/Project.toml`
  [ffbed154] DocStringExtensions
  [8f5d6c58] EzXML
  [aa1b3936] GraphIO
  [86223c79] Graphs
  [626554b9] MetaGraphs `https://github.com/filchristou/MetaGraphs.jl#fixIssue29`

```

This identifies the location I want, and will directly download the latest versions.

There is a way to restrict package versions in `Project.toml` but not to restrict packages location (local or unregistered repo). I have the impression an addition like that would make sense (?)

_PS: I know `Manifest.toml` doesn’t really “freeze” the packages instantiation, and they can be e.g. updated with an extra step with_ `]update`.

---

<div class="post-metadata">

**Author:** ![rfourquet](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rfourquet/32/3610_2.png) [@rfourquet](https://discourse.julialang.org/u/rfourquet)\
**Post date:** [January 13, 2023, 8:24pm UTC](https://discourse.julialang.org/t/more-informative-project-toml-or-partial-manifest-toml/92804/2 "2023-01-13T20:24:20Z")

</div>

There is an open issue related to that problem: [Store some location info for deps in Project.toml](https://github.com/JuliaLang/Pkg.jl/issues/492), as well as a PR: [Support [sources] section in Project.toml](https://github.com/JuliaLang/Pkg.jl/pull/3263).

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [January 13, 2023, 9:14pm UTC](https://discourse.julialang.org/t/more-informative-project-toml-or-partial-manifest-toml/92804/3 "2023-01-13T21:14:33Z")

</div>

> [@filchristou](#):
>
> That is because it’s the only way to inform julia about the whereabouts of a package that is not in the public registry.

One of two ways, the other being having it in another registry, e.g. one you create yourself. You can do so with my package [GitHub - GunnarFarneback/LocalRegistry.jl: Create and maintain local registries for Julia packages.](https://github.com/GunnarFarneback/LocalRegistry.jl)

---

<div class="post-metadata">

**Author:** ![filchristou](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/filchristou/32/26760_2.png) [@filchristou](https://discourse.julialang.org/u/filchristou)\
**Post date:** [January 14, 2023, 7:55am UTC](https://discourse.julialang.org/t/more-informative-project-toml-or-partial-manifest-toml/92804/4 "2023-01-14T07:55:20Z")

</div>

how does this work with reproducibility across different parties ? I assume other people receiving the package will have to go through a set up stage to create a local registry or get access to my local registry. Or Is this automatized with some information that can be git-checked-in ?  
The `Manifest.toml`, just needs a `Pkg.update()` to get another person running the package.

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [January 14, 2023, 9:08am UTC](https://discourse.julialang.org/t/more-informative-project-toml-or-partial-manifest-toml/92804/5 "2023-01-14T09:08:44Z")

</div>

The setup stage is

```julia
using Pkg
Pkg.Registry.add("https://github.com/filchristou/FilRegistry")

```

or whatever URL you decide to use for your registry.
