# Make it simpler to contribute to packages (Pkg 3)

**URL:** <https://discourse.julialang.org/t/make-it-simpler-to-contribute-to-packages-pkg-3/12195>\
**Category:** General Usage\
**Created:** [July 5, 2018, 8:41pm UTC](https://discourse.julialang.org/t/make-it-simpler-to-contribute-to-packages-pkg-3/12195 "2018-07-05T20:41:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Post date:** [July 5, 2018, 8:41pm UTC](https://discourse.julialang.org/t/make-it-simpler-to-contribute-to-packages-pkg-3/12195/1 "2018-07-05T20:41:28Z")

</div>

I stumbled over the following situation:

1. I develop an app – so I’m in the app’s folder/environment (I used `pkg> init` to set it up; wondering if I should use `pkg> generate` since the documentation does not say… but it seems that `pkg> generate` should be used for developing a new package, not for developing an app)
2. I add a package and then do `using ThePackage`
3. the package has a dependency, `ThePackageDep`, which throws warnings / errors

Now say you want to fix these.

You can’t do `pkg> dev ThePackageDep` in the app’s env – you actually have to do `pkg> dev ThePackage` in the app’s environment. Then you have to go into `ThePackage` and there do `pkg> dev ThePackageDep`. I can imagine that it can be even more interesting if the problem is in a dependency of a dependency.

Also, for warnings, you can’t really tell where it’s coming from. Because there’s no call stack, so you don’t know whose dependency is throwing the warnings.

So maybe:  
a. we can have something like  
`pkg> dev ThePackage > ThePackageDep` which would do a nested `dev`  
b. add a stack trace to warnings too

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [July 6, 2018, 8:09am UTC](https://discourse.julialang.org/t/make-it-simpler-to-contribute-to-packages-pkg-3/12195/2 "2018-07-06T08:09:46Z")

</div>

> [@essenciary](#):
>
> You can’t do `pkg> dev ThePackageDep` in the app’s env – you actually have to do `pkg> dev ThePackage` in the app’s environment

Hm, there should be no need to `dev ThePackage`. It should be enough to just do `dev ThePackageDep` and then `using ThePackage` should use the potentially modified `ThePackageDep`

---

<div class="post-metadata">

**Author:** ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Post date:** [July 6, 2018, 8:30am UTC](https://discourse.julialang.org/t/make-it-simpler-to-contribute-to-packages-pkg-3/12195/3 "2018-07-06T08:30:08Z")

</div>

Thanks - I’m pretty sure I tried that, but `ThePackage` kept using the non-dev dependency. However, let me try it again. I’ll follow up.

---

<div class="post-metadata">

**Author:** ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Post date:** [July 6, 2018, 8:34am UTC](https://discourse.julialang.org/t/make-it-simpler-to-contribute-to-packages-pkg-3/12195/4 "2018-07-06T08:34:49Z")

</div>

Also, as a personal curiosity. I thought that each package / app has its own env if it has a `Project.toml` file – so they manage their own versions of dependencies.

Thus, doing `pkg> dev ThePackageDep` in the app, shouldn’t switch just the app’s version of the dependency to the dev one? While leaving all the other apps and packages still using the original/published one?

Or doing `dev` on a package, makes all the existing packages use the dev version on the local Julia instance?

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [July 6, 2018, 8:51am UTC](https://discourse.julialang.org/t/make-it-simpler-to-contribute-to-packages-pkg-3/12195/5 "2018-07-06T08:51:55Z")

</div>

Only the “active project” (the one that shows when you do `pkg> st`) decides what dependencies are loaded (by looking in the Manifest.toml of the active project. The manifest for other projects/packages/apps is not used.

---

<div class="post-metadata">

**Author:** ![essenciary](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/essenciary/32/210469_2.png) [@essenciary](https://discourse.julialang.org/u/essenciary)\
**Post date:** [July 7, 2018, 10:53am UTC](https://discourse.julialang.org/t/make-it-simpler-to-contribute-to-packages-pkg-3/12195/6 "2018-07-07T10:53:17Z")

</div>

@kristoffer.carlsson Yes, that works correctly. Sorry, false alarm. I’m not sure why I saw the warnings referencing the non-dev package. Must’ve messed up something - redone from scratch and worked fine…

```julia
julia> using SearchLight
WARNING: Base.STDOUT is deprecated, use stdout instead.
  likely near /Users/adrian/.julia/dev/SearchLight/src/Logger.jl:6
in #LumberMill#12 at /Users/adrian/.julia/packages/Lumberjack/xug2/src/lumbermill.jl

(v0.7) pkg> develop Lumberjack
   Cloning git-repo `https://github.com/WestleyArgentum/Lumberjack.jl.git`
  Updating git-repo `https://github.com/WestleyArgentum/Lumberjack.jl.git`
┌ Warning: packages will need to have a [Julia]Project.toml file in the future
└ @ Pkg.Types Types.jl:578
 Resolving package versions...
  Updating `~/.julia/environments/v0.7/Project.toml`
  [ff7a09a4] + Lumberjack v2.1.1+ [`~/.julia/dev/Lumberjack`]
  Updating `~/.julia/environments/v0.7/Manifest.toml`
  [ff7a09a4] ↑ Lumberjack v2.1.1 ⇒ v2.1.1+ [`~/.julia/dev/Lumberjack`]

julia> using SearchLight
WARNING: importing deprecated binding Base.STDOUT into Lumberjack.
WARNING: Base.STDOUT is deprecated, use stdout instead.
  likely near /Users/adrian/.julia/dev/SearchLight/src/Logger.jl:6
in #LumberMill#12 at /Users/adrian/.julia/dev/Lumberjack/src/lumbermill.jl

```
