# Would it be possible to add temporary dependency graph?

**URL:** <https://discourse.julialang.org/t/would-it-be-possible-to-add-temporary-dependency-graph/119592>\
**Category:** Internals & Design\
**Created:** [September 19, 2024, 9:55am UTC](https://discourse.julialang.org/t/would-it-be-possible-to-add-temporary-dependency-graph/119592 "2024-09-19T09:55:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Post date:** [September 19, 2024, 9:55am UTC](https://discourse.julialang.org/t/would-it-be-possible-to-add-temporary-dependency-graph/119592/1 "2024-09-19T09:55:09Z")

</div>

For Julia packages dependency graphs are saved in Project/Manifest files.

Would it be possible to have a way to add to the dependency graph branches that are session-specific?  
My user case is a MainPackage that call function `foo!(a_dic)` of packages that are defined in a settings file (could be name, url, version…).  
If I programmatically `Pkg.add` these packages, I would change the Project/Manifest, while I would like this changes to live only in memory for the current session.

Any though?

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [September 19, 2024, 10:02am UTC](https://discourse.julialang.org/t/would-it-be-possible-to-add-temporary-dependency-graph/119592/2 "2024-09-19T10:02:41Z")

</div>

Just activate a temporary environment and start adding.

Be prepared that switching environments during a session can be brittle since package versions in different environments may differ and the first loaded version will be used, which may or may not lead to compatibility problems.

---

<div class="post-metadata">

**Author:** ![sylvaticus](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sylvaticus/32/203883_2.png) [@sylvaticus](https://discourse.julialang.org/u/sylvaticus)\
**Post date:** [September 19, 2024, 10:24am UTC](https://discourse.julialang.org/t/would-it-be-possible-to-add-temporary-dependency-graph/119592/3 "2024-09-19T10:24:39Z")

</div>

Ok, I’ll try with adding a separate temp environment, altought I think it is nicer to have one environment, where some components are just not permanent

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [September 19, 2024, 11:54am UTC](https://discourse.julialang.org/t/would-it-be-possible-to-add-temporary-dependency-graph/119592/4 "2024-09-19T11:54:16Z")

</div>

If you initialize the temporary environment with your current Project and Manifest files, the effect should be rather similar to what you’re asking for?
