# Incompatible changes in Pkg?

**URL:** <https://discourse.julialang.org/t/incompatible-changes-in-pkg/51326>\
**Category:** General Usage\
**Created:** [December 6, 2020, 12:54am UTC](https://discourse.julialang.org/t/incompatible-changes-in-pkg/51326 "2020-12-06T00:54:34Z")\
**Posts on this page:** 18\
**Page:** 1

<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:** [December 6, 2020, 12:54am UTC](https://discourse.julialang.org/t/incompatible-changes-in-pkg/51326/1 "2020-12-06T00:54:34Z")

</div>

I am getting some new errors. With 1.5.3.

```julia
Current folder: C:\Users\PetrKrysl\Documents\work\FinEtoolsTestAll.jl\tests\FinEtools.jl                                                                                                                
 Activating environment at `C:\Users\PetrKrysl\Documents\work\FinEtoolsTestAll.jl\tests\FinEtools.jl\Project.toml`                                                                                      
 Installing known registries into `C:\Users\PetrKrysl\.julia`                                                                                                                                           
      Added registry `General` to `C:\Users\PetrKrysl\.julia\registries\General`                                                                                                                        
ERROR: LoadError: TypeError: in typeassert, expected VersionNumber, got a value of type Pkg.Types.VersionSpec                                                                                           
Stacktrace:                                                                                                                                                                                             
 [1] load_urls(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Operations.jl:510                                   
 [2] #download_source#54 at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Operations.jl:686 [inlined]                                                                      
 [3] download_source at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Operations.jl:685 [inlined]                                                                          
 [4] instantiate(::Pkg.Types.Context; manifest::Nothing, update_registry::Bool, verbose::Bool, platform::Pkg.BinaryPlatforms.Windows, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:875                                                                                                    
 [5] instantiate(::Pkg.Types.Context) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:795                                                                          
 [6] #instantiate#169 at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:791 [inlined]                                                                                
 [7] instantiate() at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:791                                                                                             
 [8] top-level scope at C:\Users\PetrKrysl\Documents\work\FinEtoolsTestAll.jl\testall.jl:29                                                                                                             
 [9] include(::String) at .\client.jl:457                                                                                                                                                               
 [10] top-level scope at REPL[1]:1                                                                                                                                                                      
in expression starting at C:\Users\PetrKrysl\Documents\work\FinEtoolsTestAll.jl\testall.jl:24       

```

No clue what is going on since this used to work with 1.5.2. I don’t know what to look for an error. Any ideas?

Edit: it looks like it might have something to do with the Manifest.toml update which I carried out for 1.6. It would appear that at least some packages are not backward-compatible from 1.6 to 1.5.x.

Edit 2: It was definitely that. 1.6 will make the Manifest.toml incompatible with 1.5.

---

<div class="post-metadata">

**Author:** ![dilumaluthge](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dilumaluthge/32/29283_2.png) [@dilumaluthge](https://discourse.julialang.org/u/dilumaluthge)\
**Post date:** [December 6, 2020, 1:50am UTC](https://discourse.julialang.org/t/incompatible-changes-in-pkg/51326/2 "2020-12-06T01:50:48Z")

</div>

A `Manifest.toml` file generated by one version of Julia is not guaranteed to be compatible with any other versions of Julia.

---

<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:** [December 6, 2020, 2:32am UTC](https://discourse.julialang.org/t/incompatible-changes-in-pkg/51326/3 "2020-12-06T02:32:25Z")

</div>

Yes, I just found out the hard(er) way. 😉

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [December 6, 2020, 11:14am UTC](https://discourse.julialang.org/t/incompatible-changes-in-pkg/51326/4 "2020-12-06T11:14:46Z")

</div>

What happens is that some packages moved from being normal packages to being stdlibs in 1.6. That wasn’t really expected, so Pkg gets confused now when it sees a manifest with an stdlib that gets run on a version of Julia where that package is no longer an stdlib.

---

<div class="post-metadata">

**Author:** ![ctkelley](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ctkelley/32/10684_2.png) [@ctkelley](https://discourse.julialang.org/u/ctkelley)\
**Post date:** [December 6, 2020, 11:29am UTC](https://discourse.julialang.org/t/incompatible-changes-in-pkg/51326/5 "2020-12-06T11:29:56Z")

</div>

Will this change break applications I made for reproducibility or does it only affect packages?

Is the fix from my end to erase the manifest.toml and start over? That’s ok for packages since one doesn’t put the manifest on the repo anyhow. It is less ok for reproducibility since those applications are supposed to be archival.

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [December 6, 2020, 1:55pm UTC](https://discourse.julialang.org/t/incompatible-changes-in-pkg/51326/6 "2020-12-06T13:55:51Z")

</div>

(Strict) reproducibility assumes you are running with the same Julia version.

---

<div class="post-metadata">

**Author:** ![ctkelley](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ctkelley/32/10684_2.png) [@ctkelley](https://discourse.julialang.org/u/ctkelley)\
**Post date:** [December 6, 2020, 3:56pm UTC](https://discourse.julialang.org/t/incompatible-changes-in-pkg/51326/7 "2020-12-06T15:56:04Z")

</div>

Of course, Duh! So if Project.toml has something like

```julia
[compat]
julia = "1.5"

```

will that fix it up?

---

<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:** [December 6, 2020, 4:06pm UTC](https://discourse.julialang.org/t/incompatible-changes-in-pkg/51326/8 "2020-12-06T16:06:31Z")

</div>

> [@ctkelley](#):
>
> `julia = "1.5"`

That will allow any version in `[1.5, 2)`, which isn’t what you want here. Instead, you probably want `"~1.5"` to limit to versions 1.5.x, per [6. Compatibility · Pkg.jl](https://julialang.github.io/Pkg.jl/v1/compatibility/#Tilde-specifiers)

---

<div class="post-metadata">

**Author:** ![MartaVanin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/martavanin/32/14658_2.png) [@MartaVanin](https://discourse.julialang.org/u/MartaVanin)\
**Post date:** [May 26, 2021, 10:13am UTC](https://discourse.julialang.org/t/incompatible-changes-in-pkg/51326/9 "2021-05-26T10:13:13Z")

</div>

Hello, I hope it is not a problem if I add my question to this (relatively) old post.  
I got the same error in a continuous integration context: I edited the package using Julia 1.6, and the changes also implied a change of the manifest. This then caused CI to fail because ci.yml was still checking on Julia 1.5.  
My question is: is the new version of my package absolutely incompatible with julia versions \< 1.6 ?  
Or can I try to track down which packages/changes caused this and attempt to fix it?

---

<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 26, 2021, 10:24am UTC](https://discourse.julialang.org/t/incompatible-changes-in-pkg/51326/10 "2021-05-26T10:24:26Z")

</div>

If you check the manifest into the repository and want to run CI against v1.5 you have to always generate/update it with Julia v1.5 to ensure backward compatibility. Alternatively, remove the Manifest from the repository and you’ll live much happier 🙂

(To be clear, I recommend deleting the manifest only for _packages_, not “applications” which can be for example an analysis pipeline)

---

<div class="post-metadata">

**Author:** ![MartaVanin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/martavanin/32/14658_2.png) [@MartaVanin](https://discourse.julialang.org/u/MartaVanin)\
**Post date:** [May 26, 2021, 11:32am UTC](https://discourse.julialang.org/t/incompatible-changes-in-pkg/51326/11 "2021-05-26T11:32:54Z")

</div>

Thank you, I will just delete it and “gitignore it” in the future then 🙂 !

---

<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 26, 2021, 2:44pm UTC](https://discourse.julialang.org/t/incompatible-changes-in-pkg/51326/12 "2021-05-26T14:44:05Z")

</div>

However, be aware that you might be giving up on reproducibility: According to the Manual  
**The manifest file is an absolute record of the state of the packages in the environment. It includes exact information about (direct and indirect) dependencies of the project. Given a `Project.toml` + `Manifest.toml` pair, it is possible to instantiate the exact same package environment, which is very useful for reproducibility.**

---

<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 26, 2021, 4:10pm UTC](https://discourse.julialang.org/t/incompatible-changes-in-pkg/51326/13 "2021-05-26T16:10:27Z")

</div>

> [@PetrKryslUCSD](#):
>
> However, be aware that you might be giving up on reproducibility

Which you usually don’t care about when testing a package: you want to test on as a wide range of versions as possible, not just a single fixed one

---

<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 26, 2021, 4:17pm UTC](https://discourse.julialang.org/t/incompatible-changes-in-pkg/51326/14 "2021-05-26T16:17:21Z")

</div>

Indeed. But when someone **uses** a package, they might care about reproducibility a lot.

---

<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 26, 2021, 4:17pm UTC](https://discourse.julialang.org/t/incompatible-changes-in-pkg/51326/15 "2021-05-26T16:17:46Z")

</div>

That’s why I wrote

> [@giordano](#):
>
> (To be clear, I recommend deleting the manifest only for _packages_ , not “applications” which can be for example an analysis pipeline)

---

<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 26, 2021, 4:21pm UTC](https://discourse.julialang.org/t/incompatible-changes-in-pkg/51326/16 "2021-05-26T16:21:31Z")

</div>

But packages are typically constituent parts of applications, and they well may be used as applications on their own.

---

<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 26, 2021, 4:44pm UTC](https://discourse.julialang.org/t/incompatible-changes-in-pkg/51326/17 "2021-05-26T16:44:34Z")

</div>

You use appropriate compat bounds to make sure things don’t break.

---

<div class="post-metadata">

**Author:** ![lrnv](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lrnv/32/19373_2.png) [@lrnv](https://discourse.julialang.org/u/lrnv)\
**Post date:** [July 1, 2021, 8:13pm UTC](https://discourse.julialang.org/t/incompatible-changes-in-pkg/51326/18 "2021-07-01T20:13:44Z")

</div>

So, if I understood correctly, removing the Manifest file and adding it to gitignore for next time **on the package** allows it to be teste by github actions on different Julia versions (and therefore different packages) ?

On the other hand, on the **project** that has this package in its dependencies, the manifest is still there and still contains speciic versions of the dependencies of the package, so If i forward this projet to someone reproducibility is still ensured ?
