# Using a DrWatson project in a new Julia version

**URL:** https://discourse.julialang.org/t/using-a-drwatson-project-in-a-new-julia-version/102459
**Category:** General Usage
**Tags:** question, drwatson
**Created:** [August 3, 2023, 7:05pm UTC](https://discourse.julialang.org/t/using-a-drwatson-project-in-a-new-julia-version/102459 "2023-08-03T19:05:31Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![roi.holtzman](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@roi.holtzman](https://discourse.julialang.org/u/roi.holtzman)
#### Post date: [August 3, 2023, 7:05pm UTC](https://discourse.julialang.org/t/using-a-drwatson-project-in-a-new-julia-version/102459/1 "2023-08-03T19:05:31Z")

</div>

This is probably not a smart question. But I am not knowledgable about the inner workings of versions of projects and Julia etc.

I have a DrWatson project on Julia 1.7, and I am now thinking about upgrading to Julia 1.9.

The question is, will I be able to use my project for both versions?  
I see that the version of julia is specified in the Project.toml and Manifest.toml.

What should I do in case I want to keep the project for the Julia 1.7 untouched? Should I keep two separate copies of the project?

---

<div class="post-metadata">

### Author: ![stillyslalom](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stillyslalom/32/45687_2.png) [@stillyslalom](https://discourse.julialang.org/u/stillyslalom)
#### Post date: [August 3, 2023, 8:37pm UTC](https://discourse.julialang.org/t/using-a-drwatson-project-in-a-new-julia-version/102459/2 "2023-08-03T20:37:51Z")

</div>

I would recommend making a v1.7-specific Git branch, committing your v1.7 manifest/project state to that branch, then switching back to your main branch and running `Pkg.instantiate()` with v1.9 to update the manifest & dependencies.

---

<div class="post-metadata">

### Author: ![roi.holtzman](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@roi.holtzman](https://discourse.julialang.org/u/roi.holtzman)
#### Post date: [August 3, 2023, 9:14pm UTC](https://discourse.julialang.org/t/using-a-drwatson-project-in-a-new-julia-version/102459/3 "2023-08-03T21:14:46Z")

</div>

That’s a good and simple idea. Thanks!

The only thing is that it is a bit hard to work in parallel on the two versions.

---

<div class="post-metadata">

### Author: ![roi.holtzman](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@roi.holtzman](https://discourse.julialang.org/u/roi.holtzman)
#### Post date: [August 3, 2023, 10:03pm UTC](https://discourse.julialang.org/t/using-a-drwatson-project-in-a-new-julia-version/102459/4 "2023-08-03T22:03:43Z")

</div>

I was wondering what is the proper way of upgrading the DrWatson project to the new Julia version.

According to what you wrote, I should just `instantiate` the project, and all packages would be updated to the new version?  
Is that all I need to do?

---

<div class="post-metadata">

### Author: ![stillyslalom](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stillyslalom/32/45687_2.png) [@stillyslalom](https://discourse.julialang.org/u/stillyslalom)
#### Post date: [August 3, 2023, 10:05pm UTC](https://discourse.julialang.org/t/using-a-drwatson-project-in-a-new-julia-version/102459/5 "2023-08-03T22:05:02Z")

</div>

Sorry, slip of the tongue - `instantiate` will install the package versions recorded in the manifest, `update` will update to the latest versions.

---

<div class="post-metadata">

### Author: ![roi.holtzman](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@roi.holtzman](https://discourse.julialang.org/u/roi.holtzman)
#### Post date: [August 3, 2023, 10:09pm UTC](https://discourse.julialang.org/t/using-a-drwatson-project-in-a-new-julia-version/102459/6 "2023-08-03T22:09:28Z")

</div>

So `update` will rewrite the `Manifest.toml` and `Project.toml` files to the last version of the packages?

What happens if `update` the project in the current Julia version? It does the same? Namely rewrites the `Manifest.toml` and `Project.toml` files to the last version of the packages?

---

<div class="post-metadata">

### Author: ![stillyslalom](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stillyslalom/32/45687_2.png) [@stillyslalom](https://discourse.julialang.org/u/stillyslalom)
#### Post date: [August 3, 2023, 10:13pm UTC](https://discourse.julialang.org/t/using-a-drwatson-project-in-a-new-julia-version/102459/7 "2023-08-03T22:13:14Z")

</div>

Yes to both points, with the caveat that `update` will not get the latest versions of each package, but rather the latest versions satisfying every dependency’s compatibility requirements. If one of your dependencies doesn’t work with the latest version of another dependency, that’ll be constrained to the _latest compatible_ version.

---

<div class="post-metadata">

### Author: ![roi.holtzman](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@roi.holtzman](https://discourse.julialang.org/u/roi.holtzman)
#### Post date: [August 3, 2023, 10:14pm UTC](https://discourse.julialang.org/t/using-a-drwatson-project-in-a-new-julia-version/102459/8 "2023-08-03T22:14:43Z")

</div>

So I guess it is a good idea to `update` every once in a while.

Is there a way to check what will be updated before it is actually updated?

---

<div class="post-metadata">

### Author: ![stillyslalom](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stillyslalom/32/45687_2.png) [@stillyslalom](https://discourse.julialang.org/u/stillyslalom)
#### Post date: [August 3, 2023, 10:22pm UTC](https://discourse.julialang.org/t/using-a-drwatson-project-in-a-new-julia-version/102459/9 "2023-08-03T22:22:51Z")

</div>

Yes, since new releases often contain bug fixes, but if you’re trying to make some simulation or analysis reproducible, you may want to wait until finishing your work before updating, since you don’t want package behavior to potentially change in breaking ways when you’re in the middle of something.

If you do `Pkg.status()` (or `status` in the Pkg REPL), you’ll see little flags next to each package for which an update is available. It’s possible that not every package will be fully updated due to the compatibility considerations previously mentioned, but that can’t be previewed ahead of the update. If you’re unhappy with the results of an update, you can do `Pkg.undo()` to revert to the previous state.

---

<div class="post-metadata">

### Author: ![roi.holtzman](https://avatars.discourse-cdn.com/v4/letter/r/f05b48/32.png) [@roi.holtzman](https://discourse.julialang.org/u/roi.holtzman)
#### Post date: [August 3, 2023, 10:25pm UTC](https://discourse.julialang.org/t/using-a-drwatson-project-in-a-new-julia-version/102459/10 "2023-08-03T22:25:53Z")

</div>

Thanks so much! That is very helpful!
