# How to verify the compatibility under different Julia versions for a package that is in development?

**URL:** <https://discourse.julialang.org/t/how-to-verify-the-compatibility-under-different-julia-versions-for-a-package-that-is-in-development/114096>\
**Category:** General Usage\
**Tags:** question, package, versions, compatibility\
**Created:** [May 10, 2024, 10:50am UTC](https://discourse.julialang.org/t/how-to-verify-the-compatibility-under-different-julia-versions-for-a-package-that-is-in-development/114096 "2024-05-10T10:50:16Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![WuSiren](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wusiren/32/42529_2.png) [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Post date:** [May 10, 2024, 10:50am UTC](https://discourse.julialang.org/t/how-to-verify-the-compatibility-under-different-julia-versions-for-a-package-that-is-in-development/114096/1 "2024-05-10T10:50:16Z")

</div>

When developing a package, one has responsibility to check its compatibility under different Julia versions ([6. Compatibility · Pkg.jl (julialang.org)](https://pkgdocs.julialang.org/v1/compatibility/)). But how to implement this?

Specifically, `MyPackage.jl` was created and developed under Julia v1.9.0, now I want to check if it works well under the newly released Julia version v1.10.3. I have installed Julia v1.10.3 (portable) without uninstall the older Julia v1.9.0. How can I test whether `MyPackage.jl` works well or not under the new version?

---

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [May 10, 2024, 10:56am UTC](https://discourse.julialang.org/t/how-to-verify-the-compatibility-under-different-julia-versions-for-a-package-that-is-in-development/114096/2 "2024-05-10T10:56:44Z")

</div>

Launch the Julia version you want, and run the package tests:

```julia-repl
julia> ] activate --temp

(jl_bz8NbD) pkg> dev MyPackage

(jl_bz8NbD) pkg> test MyPackage

```

That’s made particularly easy if you install Julia with `juliaup`, in which case launching different versions of Julia involves just choosing the version with `julia +1.9.2`, for example.

In parallel, the standard is to run CI workflows on github on some Julia versions you intend to support (usually the lowest supported version and perhaps the latest stable or nighly version of Julia as well).

---

<div class="post-metadata">

**Author:** ![WuSiren](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wusiren/32/42529_2.png) [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Post date:** [May 10, 2024, 3:42pm UTC](https://discourse.julialang.org/t/how-to-verify-the-compatibility-under-different-julia-versions-for-a-package-that-is-in-development/114096/3 "2024-05-10T15:42:25Z")

</div>

Thank you professor for your response! I would also like to inquire, is it possible to develop a package using different versions of Julia? What I mean is, if I upgrade Julia during the development process (and remove the old version of Julia), can I continue developing the package with the new version of Julia? If it is necessary to develop a Julia package using the same version, then it would inevitably require installing multiple versions of Julia. I believe Julia is designed to allow the coexistence of multiple different versions, as it creates separate directories for different versions under the `~/.julia/environments/` directory. Since very early days, you and many other experienced seniors here have strongly recommended that I use `juliaup` to switch between different versions, but I have been hesitant to try it (maybe I’ll use it after a while) because I adhere to the “Occam’s razor principle”, in other words, unless necessary, I am curious about how to switch between multiple versions of Julia without relying on `juliaup`, even if it may be more cumbersome (Because I think it helps me understand how Julia works).

To sum up, my questions are mainly:

1. Is it possible to develop a package using different versions of Julia? If I upgrade Julia during the development process (and remove the old version of Julia), can I continue developing the package with the new version of Julia?
2. How to manage multiple versions of Julia in the most primitive way (with VS Code) without using `juliaup`?

Thanks!

---

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [May 10, 2024, 3:56pm UTC](https://discourse.julialang.org/t/how-to-verify-the-compatibility-under-different-julia-versions-for-a-package-that-is-in-development/114096/4 "2024-05-10T15:56:35Z")

</div>

1. yes, everybody does that all the time.

2. why? why? why? Just use juliaup! It now [_the officially recommended_](https://julialang.org/downloads/) way to do it.

---

<div class="post-metadata">

**Author:** ![WuSiren](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wusiren/32/42529_2.png) [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Post date:** [May 10, 2024, 4:10pm UTC](https://discourse.julialang.org/t/how-to-verify-the-compatibility-under-different-julia-versions-for-a-package-that-is-in-development/114096/5 "2024-05-10T16:10:59Z")

</div>

OK! thank you. I’ll follow your instruction!

---

<div class="post-metadata">

**Author:** ![WuSiren](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wusiren/32/42529_2.png) [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Post date:** [May 10, 2024, 4:24pm UTC](https://discourse.julialang.org/t/how-to-verify-the-compatibility-under-different-julia-versions-for-a-package-that-is-in-development/114096/6 "2024-05-10T16:24:00Z")

</div>

But I still wonder if there is some way without the use of `juliaup`. I see in VS Code I can select a julia environment (click the `Julia env` button on the status bar), and there are multiple versions can be selected. If I select the new version `v1.10`, the status bar will dispaly `Julia env: v1.10`, but it doesn’t seem to really change. Can I switch versions in this way and how?

---

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [May 10, 2024, 4:36pm UTC](https://discourse.julialang.org/t/how-to-verify-the-compatibility-under-different-julia-versions-for-a-package-that-is-in-development/114096/7 "2024-05-10T16:36:50Z")

</div>

That I don’t know. I don’t switch Julia versions that often. When need to, I set, outside VSCode:

```julia
juliaup default 1.9.2 

```

or the version I want, and then launch VSCode, which will use the default version I chose.

---

<div class="post-metadata">

**Author:** ![WuSiren](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/wusiren/32/42529_2.png) [@WuSiren](https://discourse.julialang.org/u/WuSiren)\
**Post date:** [May 10, 2024, 5:18pm UTC](https://discourse.julialang.org/t/how-to-verify-the-compatibility-under-different-julia-versions-for-a-package-that-is-in-development/114096/8 "2024-05-10T17:18:03Z")

</div>

> [@lmiq](#):
>
> yes, everybody does that all the time.

I open with Julia v1.10.3 a package that is developed with Julia v1.9.0, it reports:

```julia
julia> ┌ Warning: The active manifest file has dependencies that were resolved with a different julia version (1.9.0). Unexpected behavior may occur.

```

Does this mean that it is unsafe to develop a package with different Julia versions? And how to upgrade the package developed with v1.9.0 to the current v1.10.3?

---

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [May 10, 2024, 5:27pm UTC](https://discourse.julialang.org/t/how-to-verify-the-compatibility-under-different-julia-versions-for-a-package-that-is-in-development/114096/9 "2024-05-10T17:27:22Z")

</div>

No, but update things with: `julia> ] up` before, to get the packages updated as well. In Julia 1.11 I think you’ll be able to have different Manifest files for each Julia version.
