# Manifest.toml for reproducible code: is it even useful cross-platform?

**URL:** https://discourse.julialang.org/t/manifest-toml-for-reproducible-code-is-it-even-useful-cross-platform/61293
**Category:** General Usage
**Tags:** pkg
**Created:** [May 17, 2021, 10:55am UTC](https://discourse.julialang.org/t/manifest-toml-for-reproducible-code-is-it-even-useful-cross-platform/61293 "2021-05-17T10:55:37Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)
#### Post date: [May 17, 2021, 10:55am UTC](https://discourse.julialang.org/t/manifest-toml-for-reproducible-code-is-it-even-useful-cross-platform/61293/1 "2021-05-17T10:55:38Z")

</div>

The `Manifest.toml` records the state of all installed packages of a “project” (I’m interested in “projects” here not “packages”). I’m collaborating on a project with someone on Windows, I’m on Linux. In general, instantiating the project does not work on Linux with the manifest from Windows, I think that is due to platform specific packages, such as [GitHub - JuliaBinaryWrappers/Wayland\_jll.jl](https://github.com/JuliaBinaryWrappers/Wayland_jll.jl).

Questions:

- is there a point of version-controlling the Manifest.toml? (this related [discussion](https://discourse.julialang.org/t/does-manifest-toml-belong-in-the-repository) seems to say, “yes” for projects) If so, how do I prevent problems of the Manifest not working with `instantiate`?
- if no Manifest.toml, what are the ways to keep things as reproducible as possible? This specific case is for code doing data-processing for a research-publication, which I’d like to submit with the publication.

---

<div class="post-metadata">

### Author: ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)
#### Post date: [May 17, 2021, 11:01am UTC](https://discourse.julialang.org/t/manifest-toml-for-reproducible-code-is-it-even-useful-cross-platform/61293/2 "2021-05-17T11:01:26Z")

</div>

> [@mauro3](#):
>
> In general, instantiating the project does not work on Linux with the manifest from Windows, I think that is due to platform specific packages, such as [GitHub - JuliaBinaryWrappers/Wayland\_jll.jl](https://github.com/JuliaBinaryWrappers/Wayland_jll.jl).

What’s the problem exactly? Package resolution isn’t platform-dependent, as far as I know.

One thing to always keep in mind is that generally speaking a manifest generated with Julia vX.N may not be instantiated with Julia vX.M, with M \< N (this is due to the fact standard libraries may change between minor versions of Julia and Pkg doesn’t know how to resolve standard libraries which don’t exist in the current version of Julia). So for example if you’re trying to instantiate with Julia v1.5 a manifest generated with Julia v1.6 you’re likely going to have troubles (dozens of standard libraries have been introduced in v1.6), regardless of the platforms involved.

---

<div class="post-metadata">

### Author: ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)
#### Post date: [May 17, 2021, 11:55am UTC](https://discourse.julialang.org/t/manifest-toml-for-reproducible-code-is-it-even-useful-cross-platform/61293/3 "2021-05-17T11:55:36Z")

</div>

> [@mauro3](#):
>
> I’m collaborating on a project with someone on Windows, I’m on Linux.

The `Manifest.toml` only guarantees that, provided the given dependencies are available for a given platform, you’ll get the same versions of those packages. In particular, `Manifest.toml` does _not_ give you a portability guarantee across operating systems in case some of those dependencies are OS specific.

> [@mauro3](#):
>
> is there a point of version-controlling the Manifest.toml?

Yes, if you want to provide the exact versions of packages you used in your development experience. This does not mean that they will necessarily be reproducible on every platform out there (e.g. if some dependencies are only available on Linux, but not Windows. In those cases you’d usually try to avoid those dependencies, if you want to keep them portable).

> [@mauro3](#):
>
> if no Manifest.toml, what are the ways to keep things as reproducible as possible? This specific case is for code doing data-processing for a research-publication, which I’d like to submit with the publication.

That depends on your specific situation - for one, I’m questioning why data-procesing requires a hard dependency on a very linux specific window layouting server?

---

<div class="post-metadata">

### Author: ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)
#### Post date: [May 17, 2021, 2:53pm UTC](https://discourse.julialang.org/t/manifest-toml-for-reproducible-code-is-it-even-useful-cross-platform/61293/4 "2021-05-17T14:53:31Z")

</div>

Thanks! Yes, I think the error I did see this time around, was due to using the “wrong” Julia version. If I recall correctly, there are plans to include the Julia version within the Manifest.toml and/or Project.toml, right?

> The `Manifest.toml` only guarantees that, provided the given dependencies are available for a given platform, you’ll get the same versions of those packages. In particular, `Manifest.toml` does _not_ give you a portability guarantee across operating systems in case some of those dependencies are OS specific.

What happens if that is the case (say Linux Manifest trying to be installed on Windows)? Will an error be thrown or will the necessary deps be installed (and the incompatible ones be ignored)? Or how could they be installed, without upgrading everything?

> That depends on your specific situation - for one, I’m questioning why data-procesing requires a hard dependency on a very linux specific window layouting server?

I suspect from the plotting packages. It’s good to have the scripts which produce the paper’s figures within the code.

---

<div class="post-metadata">

### Author: ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)
#### Post date: [May 17, 2021, 3:02pm UTC](https://discourse.julialang.org/t/manifest-toml-for-reproducible-code-is-it-even-useful-cross-platform/61293/5 "2021-05-17T15:02:30Z")

</div>

I think the Julia version is already part of the deps in Project.toml?

---

<div class="post-metadata">

### Author: ![tbeason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tbeason/32/15898_2.png) [@tbeason](https://discourse.julialang.org/u/tbeason)
#### Post date: [May 17, 2021, 3:04pm UTC](https://discourse.julialang.org/t/manifest-toml-for-reproducible-code-is-it-even-useful-cross-platform/61293/6 "2021-05-17T15:04:41Z")

</div>

The Julia version is only in Project.toml files for packages. If you just `activate .` in a folder to make a new project it will not put the Julia version in the file.

---

<div class="post-metadata">

### Author: ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)
#### Post date: [May 17, 2021, 3:17pm UTC](https://discourse.julialang.org/t/manifest-toml-for-reproducible-code-is-it-even-useful-cross-platform/61293/7 "2021-05-17T15:17:11Z")

</div>

Sorry, I meant compat.

---

<div class="post-metadata">

### Author: ![tbeason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tbeason/32/15898_2.png) [@tbeason](https://discourse.julialang.org/u/tbeason)
#### Post date: [May 17, 2021, 3:27pm UTC](https://discourse.julialang.org/t/manifest-toml-for-reproducible-code-is-it-even-useful-cross-platform/61293/8 "2021-05-17T15:27:45Z")

</div>

Yea I knew what you meant, still not there. That is only for packages.

I activated a new project in a folder that didn’t have one existing, and I added DataFrames.jl:

```julia
(@v1.6) pkg> activate .
  Activating new environment at `/hdd/Data/TradingAlgos/Project.toml`

(TradingAlgos) pkg> add DataFrames
    Updating registry at `~/.julia/registries/General`

```

This is the complete Project.toml file:

```julia
tyler@pop-os:/hdd/Data/TradingAlgos$ cat Project.toml 
[deps]
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"

```

---

<div class="post-metadata">

### Author: ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)
#### Post date: [May 17, 2021, 3:29pm UTC](https://discourse.julialang.org/t/manifest-toml-for-reproducible-code-is-it-even-useful-cross-platform/61293/9 "2021-05-17T15:29:07Z")

</div>

> [@mauro3](#):
>
> What happens if that is the case (say Linux Manifest trying to be installed on Windows)? Will an error be thrown or will the necessary deps be installed (and the incompatible ones be ignored)?

Again, the package resolver is platform-independent, so I’m not entirely sure what you’re talking about. If you refer to the JLL packages, if there are no artifacts for a specific platform (like Wayland on Windows), nothing happens, no error is thrown, and the corresponding JLL package (e.g. `Wayland_jll`) is almost no-op.

---

<div class="post-metadata">

### Author: ![mauro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mauro3/32/292_2.png) [@mauro3](https://discourse.julialang.org/u/mauro3)
#### Post date: [May 17, 2021, 3:36pm UTC](https://discourse.julialang.org/t/manifest-toml-for-reproducible-code-is-it-even-useful-cross-platform/61293/10 "2021-05-17T15:36:48Z")

</div>

> [@giordano](#):
>
> If you refer to the JLL packages, if there are no artifacts for a specific platform (like Wayland on Windows), nothing happens, no error is thrown, and the corresponding JLL package (e.g. `Wayland_jll` ) is almost no-op.

Ok, then I think I was assuming that errors from using wrong Julia versions were due to Linux-Windows incompatibilities. My bad. Thanks for clearing this up.

---

<div class="post-metadata">

### Author: ![PetrKryslUCSD](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/petrkryslucsd/32/215825_2.png) [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)
#### Post date: [May 17, 2021, 3:37pm UTC](https://discourse.julialang.org/t/manifest-toml-for-reproducible-code-is-it-even-useful-cross-platform/61293/11 "2021-05-17T15:37:54Z")

</div>

I didn’t mean that the julia executable would appear there by magic. I meant that I added it by hand.

Edit: That julia version is specified in the project compat, but it appears to be ignored. I just checked.

---

<div class="post-metadata">

### Author: ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)
#### Post date: [May 17, 2021, 4:31pm UTC](https://discourse.julialang.org/t/manifest-toml-for-reproducible-code-is-it-even-useful-cross-platform/61293/12 "2021-05-17T16:31:41Z")

</div>

> [@PetrKryslUCSD](#):
>
> That julia version is specified in the project compat, but it appears to be ignored. I just checked.

That sounds like a bug…
