# What happens when I upgrade a package during a Revise session?

**URL:** <https://discourse.julialang.org/t/what-happens-when-i-upgrade-a-package-during-a-revise-session/61606>\
**Category:** VS Code\
**Tags:** revise\
**Created:** [May 21, 2021, 9:31pm UTC](https://discourse.julialang.org/t/what-happens-when-i-upgrade-a-package-during-a-revise-session/61606 "2021-05-21T21:31:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jzr](https://avatars.discourse-cdn.com/v4/letter/j/eb9ed0/32.png) [@jzr](https://discourse.julialang.org/u/jzr)\
**Post date:** [May 21, 2021, 9:31pm UTC](https://discourse.julialang.org/t/what-happens-when-i-upgrade-a-package-during-a-revise-session/61606/1 "2021-05-21T21:31:35Z")

</div>

I’m using VSCode. I have a session running, and I have a bunch of `using` statements. Then I upgrade a package to the next version. What happens to the functions and types in scope: are they the new versions or the old versions? What about objects created with those old structs – are they upgraded?

---

<div class="post-metadata">

**Author:** ![heliosdrm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heliosdrm/32/3851_2.png) [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)\
**Post date:** [May 21, 2021, 10:15pm UTC](https://discourse.julialang.org/t/what-happens-when-i-upgrade-a-package-during-a-revise-session/61606/2 "2021-05-21T22:15:38Z")

</div>

Once you have loaded a package, upgrading it has no effect. Revise only affects `dev`’ed packages, which cannot be upgraded, only edited. But edits to type definitions won’t be accepted, and Revise will stop tracking the package if you do such changes.

---

<div class="post-metadata">

**Author:** ![ericphanson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ericphanson/32/215186_2.png) [@ericphanson](https://discourse.julialang.org/u/ericphanson)\
**Post date:** [May 22, 2021, 7:47pm UTC](https://discourse.julialang.org/t/what-happens-when-i-upgrade-a-package-during-a-revise-session/61606/3 "2021-05-22T19:47:35Z")

</div>

Are you sure? I think I’ve updated packages and then had errors from Revise not being able to track the changed type definitions in the dependencies that updated.

Edit: [Home · Revise.jl](https://timholy.github.io/Revise.jl/stable/#Other-key-features-of-Revise-1) seems to say this as well

---

<div class="post-metadata">

**Author:** ![heliosdrm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/heliosdrm/32/3851_2.png) [@heliosdrm](https://discourse.julialang.org/u/heliosdrm)\
**Post date:** [May 22, 2021, 8:41pm UTC](https://discourse.julialang.org/t/what-happens-when-i-upgrade-a-package-during-a-revise-session/61606/4 "2021-05-22T20:41:31Z")

</div>

What I meant is for `add`-ed packages (which is the most common use case), upgrading it during a session does not change anything if you have already loaded it. I think this is true --and actually I have just tested it–.

The page you cite comments on switching between `dev` and released versions of a package, which is a different situation. There Revise enters into action indeed.
