# Ignore Manifest.toml when testing a package

**URL:** <https://discourse.julialang.org/t/ignore-manifest-toml-when-testing-a-package/111003>\
**Category:** New to Julia\
**Tags:** package\
**Created:** [March 1, 2024, 9:13am UTC](https://discourse.julialang.org/t/ignore-manifest-toml-when-testing-a-package/111003 "2024-03-01T09:13:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gitboy16](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gitboy16/32/24906_2.png) [@gitboy16](https://discourse.julialang.org/u/gitboy16)\
**Post date:** [March 1, 2024, 9:13am UTC](https://discourse.julialang.org/t/ignore-manifest-toml-when-testing-a-package/111003/1 "2024-03-01T09:13:20Z")

</div>

Hi,

I am testing a local package with different version of Julia.  
And I always get the message:  
“The active manifest file has dependencies that were resolved with a different julia version. Unexpected behaviour may occur.”

1/ How can I ignore the manifest when running test?  
2/ How can I prevent this file from being create?

This manifest is created everytime I run a test.  
Thank you

---

<div class="post-metadata">

**Author:** ![abraemer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/abraemer/32/51403_2.png) [@abraemer](https://discourse.julialang.org/u/abraemer)\
**Post date:** [March 1, 2024, 9:55am UTC](https://discourse.julialang.org/t/ignore-manifest-toml-when-testing-a-package/111003/2 "2024-03-01T09:55:19Z")

</div>

Manifest.toml contains the exact versions of the packages used for running the code.  
These may differ between Julia versions due to compatibility settings of the packages.

Your questions are a bit misguided in the sense that Manifest.toml is absolutely central to how Pkg.jl works. However what you should do is recreate Manifest.toml if you change Julia version. Either by deleting it (then Pkg.jl recreates it automatically) or be activating the environment and calling `Pkg.resolve()` which recreates it.

Alternatively if your package is a git repository (which it should be) you could just clone the repository to a different location for testing. Note that package repositories should not contain Manifest.toml (only Project.toml).

---

<div class="post-metadata">

**Author:** ![fp4code](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fp4code/32/3083_2.png) [@fp4code](https://discourse.julialang.org/u/fp4code)\
**Post date:** [May 24, 2024, 3:03pm UTC](https://discourse.julialang.org/t/ignore-manifest-toml-when-testing-a-package/111003/3 "2024-05-24T15:03:07Z")

</div>

Instead of the command

```
julia-1.10 --project="." -e 'using Pkg; Pkg.test()'
```

prepare the `Project.toml` and `Manifest.toml` files using the commands

```
julia-1.9 --project=env-1.9 -e 'using Pkg; Pkg.develop(path=".")'
julia-1.10 --project=env-1.10 -e 'using Pkg; Pkg.develop(path=".")'
```

Then you can use for each tests

```
julia-1.9 --project=env-1.9 -e 'using Pkg; Pkg.test("MyPackage")'
julia-1.10 --project=env-1.10 -e 'using Pkg; Pkg.test("MyPackage")'
```

The directories env-\* have to be added to `.gitignore`. You can also prepare the environments from an arbitrary directory and adjust `Pkg.develop(path="path_to/MyPackage")`.

---

<div class="post-metadata">

**Author:** ![j-fu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/j-fu/32/11373_2.png) [@j-fu](https://discourse.julialang.org/u/j-fu)\
**Post date:** [May 24, 2024, 4:04pm UTC](https://discourse.julialang.org/t/ignore-manifest-toml-when-testing-a-package/111003/4 "2024-05-24T16:04:30Z")

</div>

Julia 1.11 will have the possibility to have different manifests for different Julia versions: [julia/NEWS.md at v1.11.0-alpha2 · JuliaLang/julia · GitHub](https://github.com/JuliaLang/julia/blob/v1.11.0-alpha2/NEWS.md#new-language-features) .
