# Environments inheriting remote dependencies

**URL:** <https://discourse.julialang.org/t/environments-inheriting-remote-dependencies/33752>\
**Category:** New to Julia\
**Created:** [January 24, 2020, 3:50pm UTC](https://discourse.julialang.org/t/environments-inheriting-remote-dependencies/33752 "2020-01-24T15:50:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter\_Adelman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/peter_adelman/32/11907_2.png) [@Peter\_Adelman](https://discourse.julialang.org/u/Peter_Adelman)\
**Post date:** [January 24, 2020, 3:50pm UTC](https://discourse.julialang.org/t/environments-inheriting-remote-dependencies/33752/1 "2020-01-24T15:50:57Z")

</div>

If I `]add` a github version of a package that I am developing (not the gospel from JuliaRegistries) to a local package (MyPkg), it successfully downloads and uses it for that environment, correctly making Manifest.toml.

However, when I `]dev /path/to/MyPkg` in my general Repl (`.julia/environments/v1.3`), it adds the current version from JuliaRegistries. This makes a different entry in Manifest.toml.

Is that intended behavior?

---

<div class="post-metadata">

**Author:** ![00vareladavid](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/00vareladavid/32/23521_2.png) [@00vareladavid](https://discourse.julialang.org/u/00vareladavid)\
**Post date:** [January 24, 2020, 8:22pm UTC](https://discourse.julialang.org/t/environments-inheriting-remote-dependencies/33752/2 "2020-01-24T20:22:40Z")

</div>

They have different entries in the Manifest because `add` and `dev` do different things. If you give a path to `dev`, it will just store that path in the manifest.

---

<div class="post-metadata">

**Author:** ![Peter\_Adelman](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/peter_adelman/32/11907_2.png) [@Peter\_Adelman](https://discourse.julialang.org/u/Peter_Adelman)\
**Post date:** [January 24, 2020, 8:38pm UTC](https://discourse.julialang.org/t/environments-inheriting-remote-dependencies/33752/3 "2020-01-24T20:38:47Z")

</div>

Sorry, I was unclear.

I want to depend on a yet-unreleased version of CmdStan.jl (v6.0.0 from Github) in MyPkg, so I `]activate .` the package and `]add https://github.com/JuliaStan/CmdStan.jl`. This works and CmdStan is correctly added to the Manifest with its URL.

I then return to my base Repl and `]dev /path/to/MyPkg` to add it to my base environment. This executes, but the version of CmdStan it adds to my base environment’s Manifest.toml is v5.6.0 (the most recent version on JuliaRegistries.)

As such, when I `using MyPkg` from the home repo, it uses the wrong version of CmdStan. If I add a [compat] entry for CmdStan in MyPkg forcing it to be \>= 6.0.0, it fails to `]dev MyPkg` because that doesn’t exist in JuliaRegistries. The only way to make it work consistently is to also add CmdStan’s github to my main Repl environment, which seems silly but is conceivably intended to prevent people from unknowingly downloading from unapproved sources.

Notably, I can remove CmdStan’s github and `]resolve` with no ill effects (it will keep v6.0.0 in my main Manifest.toml), so the behavior isn’t symmetric if it is intended.
