Environments inheriting remote dependencies

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?

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.

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.