# Pkg3 plan and status

**URL:** <https://discourse.julialang.org/t/pkg3-plan-and-status/9763>\
**Category:** Internals & Design\
**Created:** [March 16, 2018, 8:27pm UTC](https://discourse.julialang.org/t/pkg3-plan-and-status/9763 "2018-03-16T20:27:01Z")\
**Posts on this page:** 13\
**Page:** 4

<div class="post-metadata">

**Author:** ![ScottPJones](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/scottpjones/32/146_2.png) [@ScottPJones](https://discourse.julialang.org/u/ScottPJones)\
**Post date:** [June 4, 2018, 1:03am UTC](https://discourse.julialang.org/t/pkg3-plan-and-status/9763/61 "2018-06-04T01:03:06Z")

</div>

> [@kristoffer.carlsson](#):
>
> One waits for [https://github.com/JuliaLang/Pkg.jl/pull/234](https://github.com/JuliaLang/Pkg.jl/pull/234) to be merged and put in the next nightly / alpha.

While it’s nice to know that a fix is coming (thanks!), is there 1) any workaround in the meantime and 2) any idea when that might get merged?

---

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [June 4, 2018, 2:11am UTC](https://discourse.julialang.org/t/pkg3-plan-and-status/9763/62 "2018-06-04T02:11:12Z")

</div>

This isn’t a fix, it’s a feature. The package manager works fine without it. All registered packages have their requirements correctly recorded and respected when you install them.

---

<div class="post-metadata">

**Author:** ![ScottPJones](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/scottpjones/32/146_2.png) [@ScottPJones](https://discourse.julialang.org/u/ScottPJones)\
**Post date:** [June 4, 2018, 2:20am UTC](https://discourse.julialang.org/t/pkg3-plan-and-status/9763/63 "2018-06-04T02:20:19Z")

</div>

> [@StefanKarpinski](#):
>
> This isn’t a fix, it’s a feature. The package manager works fine without it. All registered packages have their requirements correctly recorded and respected when you install them.

Not all packages are registered, and supposedly, things are moving away from having the big central registry,  
so it’s rather important when people are dealing with their own set of packages (such as at a company not making their Julia code open source).

What is the recommended way of handling a large number of private packages, with their own set of dependencies and version requirements?

This isn’t a criticism, it already looks like Pkg3 may be able to handle this much better than Pkg2, I’d just like to understand the best practice for this use case.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [August 1, 2018, 1:31pm UTC](https://discourse.julialang.org/t/pkg3-plan-and-status/9763/64 "2018-08-01T13:31:59Z")

</div>

Question: after some recent changes, it seems that even `Test` needs to be specified as a dependency if I want to use it in `pkg"test"`, is this correct?

---

<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:** [August 1, 2018, 3:31pm UTC](https://discourse.julialang.org/t/pkg3-plan-and-status/9763/65 "2018-08-01T15:31:37Z")

</div>

Yes. Standard libraries need to be declared as dependencies when using them in a package, they also need now need to be declared as test dependencies if they are used when testing. The reason it worked before was due to a flaw and it means that e.g. moving stdlibs out of the julia repo was breaking.

---

<div class="post-metadata">

**Author:** ![jlapeyre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jlapeyre/32/4514_2.png) [@jlapeyre](https://discourse.julialang.org/u/jlapeyre)\
**Post date:** [August 1, 2018, 9:07pm UTC](https://discourse.julialang.org/t/pkg3-plan-and-status/9763/66 "2018-08-01T21:07:09Z")

</div>

> [@Tamas\_Papp](#):
>
> even `Test` needs to be specified as a dependency

Note that [https://julialang.org/Pkg.jl/latest/](https://julialang.org/Pkg.jl/latest/) says to put something like the following in your Project.toml

```julia
[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]

```

---

<div class="post-metadata">

**Author:** ![grero](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/grero/32/109_2.png) [@grero](https://discourse.julialang.org/u/grero)\
**Post date:** [August 2, 2018, 5:42am UTC](https://discourse.julialang.org/t/pkg3-plan-and-status/9763/67 "2018-08-02T05:42:51Z")

</div>

Just to clarify, if I have more than one dependency in my tests, I should add them all under [extras] and then include them as a list of dependencies for the test target, e.g.

```julia
[extras]
Test = <uuid>
Dep1 = <uuid>

[targets]
test = ["Test","Dep1"]

```

When I tried this I got an error

```julia
ERROR: MethodError: no method matching haskey(::Array{String,1}, ::String)
Closest candidates are:
  haskey(::Base.Iterators.Pairs, ::Any) at iterators.jl:246
  haskey(::Dict, ::Any) at dict.jl:546
  haskey(::Base.ImmutableDict, ::Any) at dict.jl:731

```

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [August 2, 2018, 6:45am UTC](https://discourse.julialang.org/t/pkg3-plan-and-status/9763/68 "2018-08-02T06:45:00Z")

</div>

This is correct. The error is (likely) because your Julia version is too old.

---

<div class="post-metadata">

**Author:** ![grero](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/grero/32/109_2.png) [@grero](https://discourse.julialang.org/u/grero)\
**Post date:** [August 2, 2018, 9:12am UTC](https://discourse.julialang.org/t/pkg3-plan-and-status/9763/69 "2018-08-02T09:12:45Z")

</div>

Ok, this was on

```julia
julia> versioninfo()
Julia Version 0.7.0-beta2.0
Commit b145832402* (2018-07-13 19:54 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin14.5.0)
  CPU: Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.0 (ORCJIT, broadwell)

```

I will wait for an updated version before trying again. Thanks everyone for the great work!

---

<div class="post-metadata">

**Author:** ![chakravala](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chakravala/32/6832_2.png) [@chakravala](https://discourse.julialang.org/u/chakravala)\
**Post date:** [August 2, 2018, 3:04pm UTC](https://discourse.julialang.org/t/pkg3-plan-and-status/9763/70 "2018-08-02T15:04:35Z")

</div>

Could someone explain why it is necessary to declare the `Test` extra dependencies in 2 stages? Is there some kind of point or advantage to separating out the `[extras]` and `[targets]` instead of having `[test]` only?

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [August 2, 2018, 3:15pm UTC](https://discourse.julialang.org/t/pkg3-plan-and-status/9763/71 "2018-08-02T15:15:49Z")

</div>

See [https://github.com/JuliaLang/Pkg.jl/pull/531#issuecomment-408032655](https://github.com/JuliaLang/Pkg.jl/pull/531#issuecomment-408032655) and [https://github.com/JuliaLang/Pkg.jl/pull/531#issuecomment-408183823](https://github.com/JuliaLang/Pkg.jl/pull/531#issuecomment-408183823)

---

<div class="post-metadata">

**Author:** ![grero](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/grero/32/109_2.png) [@grero](https://discourse.julialang.org/u/grero)\
**Post date:** [August 6, 2018, 5:47am UTC](https://discourse.julialang.org/t/pkg3-plan-and-status/9763/72 "2018-08-06T05:47:51Z")

</div>

Just wanted to add that this now works on

```julia
julia> versioninfo()
Julia Version 0.7.0-rc2.0
Commit 78540cba4c (2018-08-02 19:14 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin14.5.0)
  CPU: Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.0 (ORCJIT, broadwell)

```

Thanks again!

---

<div class="post-metadata">

**Author:** ![svaksha](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/svaksha/32/881_2.png) [@svaksha](https://discourse.julialang.org/u/svaksha)\
**Post date:** [August 14, 2018, 9:18am UTC](https://discourse.julialang.org/t/pkg3-plan-and-status/9763/73 "2018-08-14T09:18:21Z")

</div>

In 1.0, can someone explain (or link the docs) how to handle Pkg3 automatically installing deprecated packages from Metadata?

Ex. Requests.jl isnt maintained anymore, hence deprecated, but if the user is unaware they are able to install it. One realises this later while trying to fix it as the program isnt working as before.

Ofcourse, you can `rm` deprecated or unmaintained packages but it would be nicer if the PM were able to distinguish or tag packages for the specific julia version it (package) supports.

If this feature exists in Pkg3, then please link the docs (or a video/ blog). Thanks.

[Previous page](https://discourse.julialang.org/t/pkg3-plan-and-status/9763.md?page=3)
