# Questions about dependencies between packages

**URL:** <https://discourse.julialang.org/t/questions-about-dependencies-between-packages/119633>\
**Category:** General Usage\
**Tags:** question, package\
**Created:** [September 20, 2024, 5:49am UTC](https://discourse.julialang.org/t/questions-about-dependencies-between-packages/119633 "2024-09-20T05:49:40Z")\
**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:** [September 20, 2024, 5:49am UTC](https://discourse.julialang.org/t/questions-about-dependencies-between-packages/119633/1 "2024-09-20T05:49:40Z")

</div>

Suppose we have installed the latest version of a package named `PkgB v0.1.0` in our project environment. It has `PkgA v0.1.0` as one of its dependencies. Now we find that `PkgA v0.1.0` has a new commit on GitHub without releasing a new version. Of course, if we update `PkgB` at this point, nothing will happen. But we do want the `PkgB` we are using to depend on the newest commit of `PkgA`. Then what should we do?

Thanks!

---

<div class="post-metadata">

**Author:** ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Post date:** [September 20, 2024, 6:19am UTC](https://discourse.julialang.org/t/questions-about-dependencies-between-packages/119633/2 "2024-09-20T06:19:21Z")

</div>

If PkgB doesn’t have an upper bound in its compatibility declarations with PkgA, you can add the version of PkgA on a github branch to your own environment and it should be picked up by PkgB too.

---

<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:** [September 20, 2024, 6:24am UTC](https://discourse.julialang.org/t/questions-about-dependencies-between-packages/119633/3 "2024-09-20T06:24:34Z")

</div>

Thanks for your response! 🤝🤝

Do you mean, that suppose the new commit of `PkgA` is at the `main` branch on GitHub, then I just need to additionally `add PkgA#main` in my environment, and do nothing with the already installed package `PkgB`?

---

<div class="post-metadata">

**Author:** ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Post date:** [September 20, 2024, 6:25am UTC](https://discourse.julialang.org/t/questions-about-dependencies-between-packages/119633/4 "2024-09-20T06:25:06Z")

</div>

Yes. This should result in PkgB using the explicitly installed version of PkgA in that environment, as long as the compatibility declarations work out.

---

<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:** [September 20, 2024, 6:25am UTC](https://discourse.julialang.org/t/questions-about-dependencies-between-packages/119633/5 "2024-09-20T06:25:15Z")

</div>

Thanks!

---

<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:** [September 20, 2024, 6:26am UTC](https://discourse.julialang.org/t/questions-about-dependencies-between-packages/119633/6 "2024-09-20T06:26:34Z")

</div>

I see. Thank you very much!

---

<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:** [September 20, 2024, 6:37am UTC](https://discourse.julialang.org/t/questions-about-dependencies-between-packages/119633/7 "2024-09-20T06:37:02Z")

</div>

Sorry. Now I have another question. If some day `PkgA` releases a new version `PkgA v0.1.1` while `PkgB` still keeps `PkgB v0.1.0`, what should I do, given that the `[compat]` declaration of `PkgB v0.1.0` reads `PkgA = "0.1.0"`? And how about `PkgA = "0.1"`?

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [September 20, 2024, 9:14am UTC](https://discourse.julialang.org/t/questions-about-dependencies-between-packages/119633/8 "2024-09-20T09:14:29Z")

</div>

[https://pkgdocs.julialang.org/v1/compatibility/](https://pkgdocs.julialang.org/v1/compatibility/)

---

<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:** [September 20, 2024, 9:15am UTC](https://discourse.julialang.org/t/questions-about-dependencies-between-packages/119633/9 "2024-09-20T09:15:55Z")

</div>

Thanks. I will read that carefully.
