Pkg 0.7.0 replacement for Pkg.status()

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.


1 Like



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?

1 Like

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.

thanks, k. this is painful.

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

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.

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

1 Like

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


I currently have code like this

if !isdir(Pkg.dir("Redpitaya"))
  println("Installing Redpitaya...")

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:

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.

You won’t need it, as you can add unregistered packages.

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, which is not Apple-specific AFAIK. If you are using a layout other than something like 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.

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.

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


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.

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.

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.

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.

Reading the documentation (which is WIP, but very informative already) may help at this point.

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.


has this stabilized yet? is it now possible to code

@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.