# Pkg 0.7.0 replacement for Pkg.status()

**URL:** <https://discourse.julialang.org/t/pkg-0-7-0-replacement-for-pkg-status/11712>\
**Category:** General Usage\
**Created:** [June 16, 2018, 1:01am UTC](https://discourse.julialang.org/t/pkg-0-7-0-replacement-for-pkg-status/11712 "2018-06-16T01:01:26Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![iwelch](https://avatars.discourse-cdn.com/v4/letter/i/8c91f0/32.png) [@iwelch](https://discourse.julialang.org/u/iwelch)\
**Post date:** [June 16, 2018, 1:01am UTC](https://discourse.julialang.org/t/pkg-0-7-0-replacement-for-pkg-status/11712/1 "2018-06-16T01:01:26Z")

</div>

Is there a map from the old Pkg.\* functions to the new Pkg manager in 0.7.0? For example, how do I find out which Missings package I have installed?

advice appreciated.

/iaw

---

<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:** [June 16, 2018, 1:13am UTC](https://discourse.julialang.org/t/pkg-0-7-0-replacement-for-pkg-status/11712/2 "2018-06-16T01:13:34Z")

</div>

`]st`

---

<div class="post-metadata">

**Author:** ![iwelch](https://avatars.discourse-cdn.com/v4/letter/i/8c91f0/32.png) [@iwelch](https://discourse.julialang.org/u/iwelch)\
**Post date:** [June 16, 2018, 2:42am UTC](https://discourse.julialang.org/t/pkg-0-7-0-replacement-for-pkg-status/11712/4 "2018-06-16T02:42:34Z")

</div>

ok, for the rest of us: on the REPL, “]” goes into the pkg browser, and “st” is short for “status.”

but how does my program check programmatically what, if any, version of, say, `Missings` is installed?

---

<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:** [June 16, 2018, 10:08am UTC](https://discourse.julialang.org/t/pkg-0-7-0-replacement-for-pkg-status/11712/5 "2018-06-16T10:08:28Z")

</div>

What “being installed” means is not completely straightforward to answer. If you want to conditionally execute code based on the presence of a package, look at Revise.

But there will be some programmatic interface to `status` it just hasn’t been a top priority yet.

---

<div class="post-metadata">

**Author:** ![iwelch](https://avatars.discourse-cdn.com/v4/letter/i/8c91f0/32.png) [@iwelch](https://discourse.julialang.org/u/iwelch)\
**Post date:** [June 16, 2018, 4:26pm UTC](https://discourse.julialang.org/t/pkg-0-7-0-replacement-for-pkg-status/11712/6 "2018-06-16T16:26:14Z")

</div>

thanks, k. this is painful.

---

<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:** [June 16, 2018, 8:29pm UTC](https://discourse.julialang.org/t/pkg-0-7-0-replacement-for-pkg-status/11712/7 "2018-06-16T20:29:31Z")

</div>

What is your usecase? Why does the package want to know if Missings is included?

---

<div class="post-metadata">

**Author:** ![iwelch](https://avatars.discourse-cdn.com/v4/letter/i/8c91f0/32.png) [@iwelch](https://discourse.julialang.org/u/iwelch)\
**Post date:** [June 16, 2018, 11:00pm UTC](https://discourse.julialang.org/t/pkg-0-7-0-replacement-for-pkg-status/11712/8 "2018-06-16T23:00:37Z")

</div>

use case: make sure that my code–which was extensively tested with some package that someone else wrote–has not suffered a regression because of an update somewhere else. and/or be alerted to watch out for potential incompatibilities due to a package change when it happens.

---

<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:** [June 17, 2018, 6:04am UTC](https://discourse.julialang.org/t/pkg-0-7-0-replacement-for-pkg-status/11712/9 "2018-06-17T06:04:12Z")

</div>

If you rely on something, shouldn’t you just specify it explicitly in the project file?

---

<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:** [June 17, 2018, 7:13am UTC](https://discourse.julialang.org/t/pkg-0-7-0-replacement-for-pkg-status/11712/10 "2018-06-17T07:13:19Z")

</div>

That doesn’t answer why you have to test if Missings is installed at runtime.

---

<div class="post-metadata">

**Author:** ![tobias.knopp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tobias.knopp/32/7551_2.png) [@tobias.knopp](https://discourse.julialang.org/u/tobias.knopp)\
**Post date:** [June 17, 2018, 7:50am UTC](https://discourse.julialang.org/t/pkg-0-7-0-replacement-for-pkg-status/11712/11 "2018-06-17T07:50:26Z")

</div>

@kristoffer.carlsson:

I currently have code like this

```julia
if !isdir(Pkg.dir("Redpitaya"))
  println("Installing Redpitaya...")
  Pkg.clone("https://github.com/tknopp/Redpitaya.jl.git")
end

```

in order to install packages that are not in METADATA. For instance private packages do not work. The term `!isdir(Pkg.dir("Redpitaya"))` basically means what the OP asked for. Will I need this trick on 0.7, or can I directly specify dependencies in the new Manifest files (which are not(!) in a registry)

One other thing: The [ is a pretty bad choice for mac users. Here is my keyboard layout:  
[https://www.google.com/search?q=german+keyboard+mac&client=safari&rls=en&tbm=isch&source=iu&ictx=1&fir=9qRekpY1vPGD8M%253A%252CZnXjfJ5DODsicM%252C\_&usg=\_\_NPzM-E2PohzaLNL6\_XoaiwLLwP8%3D&sa=X&ved=0ahUKEwjll\_SimtrbAhUDCZoKHcQMCesQ9QEINTAE#imgrc=3MLg0QnteeVNGM:](https://www.google.com/search?q=german+keyboard+mac&client=safari&rls=en&tbm=isch&source=iu&ictx=1&fir=9qRekpY1vPGD8M%253A%252CZnXjfJ5DODsicM%252C_&usg=__NPzM-E2PohzaLNL6_XoaiwLLwP8%3D&sa=X&ved=0ahUKEwjll_SimtrbAhUDCZoKHcQMCesQ9QEINTAE#imgrc=3MLg0QnteeVNGM:)

We have ; for shell mode, ? for help mode, both can be invoked using shift. Would be great if also the package mode could be invoked by shift. For instance : could work.

---

<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:** [June 17, 2018, 8:07am UTC](https://discourse.julialang.org/t/pkg-0-7-0-replacement-for-pkg-status/11712/12 "2018-06-17T08:07:30Z")

</div>

> [@tobias.knopp](#):
>
> Will I need this trick on 0.7, or can I directly specify dependencies in the new Manifest files (which are not(!) in a registry)

You won’t need it, as you can [add unregistered packages](https://julialang.org/Pkg.jl/latest/#Adding-unregistered-packages-1).

> [@tobias.knopp](#):
>
> [ is a pretty bad choice for mac users

First, it is `]`, not `[`. This is important since you don’t begin a line with `]` in the REPL for valid expression.

Second, `:` may not be a good choice, since many valid expressions start with it.

Finally, the layouts you link seem to be the (more or less) [standard German layout](https://en.wikipedia.org/wiki/German_keyboard_layout), which is not Apple-specific AFAIK. If you are using a layout other than something like [QWERTY](https://en.wikipedia.org/wiki/QWERTY) on a standard-size keyboard, you inevitable trade some symbols used in programming for the extra letters, it is hard to get around this.

---

<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:** [June 17, 2018, 8:30am UTC](https://discourse.julialang.org/t/pkg-0-7-0-replacement-for-pkg-status/11712/13 "2018-06-17T08:30:24Z")

</div>

> [@tobias.knopp](#):
>
> One other thing: The [ is a pretty bad choice for mac users. Here is my keyboard layout:  
> [https://www.google.com/search?q=german+keyboard+mac&client=safari&rls=en&tbm=isch&source=iu&ictx=1&fir=9qRekpY1vPGD8M%3A%2CZnXjfJ5DODsicM%2C\_&usg=\_\_NPzM-E2PohzaLNL6\_XoaiwLLwP8%3D&sa=X&ved=0ahUKEwjll\_SimtrbAhUDCZoKHcQMCesQ9QEINTAE#imgrc=3MLg0QnteeVNGM:](https://www.google.com/search?q=german+keyboard+mac&client=safari&rls=en&tbm=isch&source=iu&ictx=1&fir=9qRekpY1vPGD8M%253A%252CZnXjfJ5DODsicM%252C_&usg=__NPzM-E2PohzaLNL6_XoaiwLLwP8%3D&sa=X&ved=0ahUKEwjll_SimtrbAhUDCZoKHcQMCesQ9QEINTAE#imgrc=3MLg0QnteeVNGM:)
> 
> We have ; for shell mode, ? for help mode, both can be invoked using shift. Would be great if also the package mode could be invoked by shift. For instance : could work.

There are many points of pain when programming with an international keyboard but the single key press to enter a REPL mode is barely noticeable compared to the finger gymnastics of writing indexing-heavy code or complicated types. I’m not at all concerned about having to type `Alt Gr + 9` to enter Pkg mode on my Swedish keyboard.

---

<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:** [June 17, 2018, 8:31am UTC](https://discourse.julialang.org/t/pkg-0-7-0-replacement-for-pkg-status/11712/14 "2018-06-17T08:31:51Z")

</div>

> [@tobias.knopp](#):
>
> One other thing: The [ is a pretty bad choice for mac users. Here is my keyboard layout:

I mean, you have to use `]` all the time when doing normal programming so I don’t see how it can be that bad.

---

<div class="post-metadata">

**Author:** ![tobias.knopp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tobias.knopp/32/7551_2.png) [@tobias.knopp](https://discourse.julialang.org/u/tobias.knopp)\
**Post date:** [June 17, 2018, 1:25pm UTC](https://discourse.julialang.org/t/pkg-0-7-0-replacement-for-pkg-status/11712/15 "2018-06-17T13:25:47Z")

</div>

Yes and this a constant headache when switching between a Mac and a “regular” keyboard. The point is that they are different on german Mac and a regular german keyboard. On a Mac its `Alt Gr + 6`.

When I look at the american layout it gets clear why you have chosen so.

---

<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:** [June 17, 2018, 1:36pm UTC](https://discourse.julialang.org/t/pkg-0-7-0-replacement-for-pkg-status/11712/16 "2018-06-17T13:36:35Z")

</div>

> [@tobias.knopp](#):
>
> When I look at the american layout it gets clear why you have chosen so.

FWIW, the choice was made by someone (probably) with an American keyboard (aka not me). I have a swedish mac (åäö) so ] is Right Alt + 9 for me.

---

<div class="post-metadata">

**Author:** ![tobias.knopp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tobias.knopp/32/7551_2.png) [@tobias.knopp](https://discourse.julialang.org/u/tobias.knopp)\
**Post date:** [June 17, 2018, 1:45pm UTC](https://discourse.julialang.org/t/pkg-0-7-0-replacement-for-pkg-status/11712/17 "2018-06-17T13:45:47Z")

</div>

Then your keyboard layout seems to not differ between mac and pc (at least for (){} ) which of course makes it hard to see the issue. ) for package mode might be an alternative, which at least anybody has on its keyboard.

---

<div class="post-metadata">

**Author:** ![iwelch](https://avatars.discourse-cdn.com/v4/letter/i/8c91f0/32.png) [@iwelch](https://discourse.julialang.org/u/iwelch)\
**Post date:** [June 17, 2018, 2:43pm UTC](https://discourse.julialang.org/t/pkg-0-7-0-replacement-for-pkg-status/11712/18 "2018-06-17T14:43:15Z")

</div>

> [@Tamas\_Papp](#):
>
> If you rely on something, shouldn’t you just specify it explicitly in the project file?

what project file? I don’t write projects. I write code. I even do my unit tests at the end of each of my code.jl file.

maybe I will switch to projects in the future, but I don’t do it now. how to projects determine numbered dependencies? I mean both “==” and “\>=”?

and `Missings` was just an example. it’s more general. Packages change, and it is not always the case that packages changes are not externally visible.

---

<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:** [June 17, 2018, 3:03pm UTC](https://discourse.julialang.org/t/pkg-0-7-0-replacement-for-pkg-status/11712/19 "2018-06-17T15:03:06Z")

</div>

> [@iwelch](#):
>
> what project file? […] how to projects determine numbered dependencies? I mean both “==” and “\>=”?

Reading the [documentation](https://julialang.org/Pkg.jl/latest/) (which is WIP, but very informative already) may help at this point.

> [@iwelch](#):
>
> I even do my unit tests at the end of each of my code.jl file.

Julia has a lot of facilities for organizing your code, tests (with CI), and dependencies (`Pkg`). These are so easy to set up (after you do the first one) that they are worth using even for small and/or internal projects. Of course you are welcome not to take advantage of them, but then you are missing a lot of benefits. Also, doing the same thing in some ad-hoc manner may be just more difficult, as I am sure you have noticed in this topic.

---

<div class="post-metadata">

**Author:** ![iwelch](https://avatars.discourse-cdn.com/v4/letter/i/8c91f0/32.png) [@iwelch](https://discourse.julialang.org/u/iwelch)\
**Post date:** [August 18, 2018, 10:00pm UTC](https://discourse.julialang.org/t/pkg-0-7-0-replacement-for-pkg-status/11712/20 "2018-08-18T22:00:40Z")

</div>

has this stabilized yet? is it now possible to code

```julia
@assert( Pkg.versionof("DataFrames") > v0.11.7 , "please update DataFrames")

```

PS: Thomas—I just searched via google for CI, and found another page you wrote. So, I Pkg.add(“PkgDev”), but PkgDev does not yet seem to work under 1.0.
