# Is Manifest.toml "write only"?

**URL:** <https://discourse.julialang.org/t/is-manifest-toml-write-only/34368>\
**Category:** New to Julia\
**Created:** [February 9, 2020, 3:48am UTC](https://discourse.julialang.org/t/is-manifest-toml-write-only/34368 "2020-02-09T03:48:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaynick](https://avatars.discourse-cdn.com/v4/letter/j/71c47a/32.png) [@jaynick](https://discourse.julialang.org/u/jaynick)\
**Post date:** [February 9, 2020, 3:48am UTC](https://discourse.julialang.org/t/is-manifest-toml-write-only/34368/1 "2020-02-09T03:48:48Z")

</div>

Starting from .toml files mentioned in a bug post,  
I did a `Pkg.activate(".")` and `Pkg.instantiate()`.  
It added the packages mentioned in `Project.toml`

**but not the ones in** `Manifest.toml`.

Further (this surprised me), when I munually add a package listed in the manifest,  
it did not respect the version listed there but instead downloaded the newest version  
(and updated the manifest, thereyb destroying the “correct” version).

Is this the correct behaviour? Is there a way to cause all the packages  
in the manifest to be added (other than doing it manually)?

---

<div class="post-metadata">

**Author:** ![Elrod](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/elrod/32/22461_2.png) [@Elrod](https://discourse.julialang.org/u/Elrod)\
**Post date:** [February 9, 2020, 3:59am UTC](https://discourse.julialang.org/t/is-manifest-toml-write-only/34368/2 "2020-02-09T03:59:32Z")

</div>

Whenever you add a package, all the dependencies will be installed, but you can’t `using` them unless/until you explicitly add them.  
For example, [BenchmarkTools.jl](https://github.com/JuliaCI/BenchmarkTools.jl/blob/master/Project.toml)’s Project.toml:

```nohighlight
[deps]
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

```

If you install BenchmarkTools, you’ll be able to use it.  
JSON and Printf will not show up in `st` even though the package manager will download them, and `using JSON` and `using Printf` will fail.  
But BenchmarkTools will work.

If a future version of BenchmarkTools no longer depends on these, they can be removed.  
For that reason at least, the above makes sense: if you depend on JSON or Printf, you should explicitly add them to your project, so that they show up in your Project.toml.

---

<div class="post-metadata">

**Author:** ![jishnub](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jishnub/32/33620_2.png) [@jishnub](https://discourse.julialang.org/u/jishnub)\
**Post date:** [February 9, 2020, 12:57pm UTC](https://discourse.julialang.org/t/is-manifest-toml-write-only/34368/3 "2020-02-09T12:57:18Z")

</div>

One way to check the dependencies of BenchmarkTools for example is

```
(v1.2) pkg> st -m BenchmarkTools
    Status `~/.julia/environments/v1.2/Manifest.toml`
  [6e4b80f9] BenchmarkTools v0.4.3
  [682c06a0] JSON v0.21.0
  [de0858da] Printf 
  [10745b16] Statistics

```

This lists the environment of BenchmarkTools, and not the default one that you’re installing packages into. The latter can be checked using `pks> st`.

When you install new packages, julia checks the the compatibilities across other packages that you have in the active environment. If all the packages have their `[compat]` listed correctly, you’ll not be able to upgrade to a broken state. Upgrades will get the newest versions of all packages such that you end up with a consistent setup.
