Base.whos() no longer works in 1.0

question

#1

We’ve recently upgraded from 0.6 to 1.0 and have found that whos() seems to have gone away. Can someone please verify that this is true? What has replaced it?
Thanks. -David

whos() error
base.whos invalid
whos() ERROR: UndefVarError: whos not defined


#2

When upgrading from 0.6 to 1.0, it’s very useful to try the code in 0.7 first to get deprecation warnings such as this one:

               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: https://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.7.0-rc1.9 (2018-08-01 18:07 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit a83dfeefde (161 days old master)
|__/                   |  x86_64-w64-mingw32

julia> whos()
┌ Warning: `whos()` is deprecated, use `varinfo()` instead.
│   caller = top-level scope at none:0
└ @ Core none:0

#3

You may try Base.varinfo(). There are other useful functions and macros in InteractiveUtils


#4

imho : we can use docker(julia:0.7 image) to print this information

docker run -it --rm julia:0.7 julia -e 'whos()'

# docker run -it --rm julia:0.7 julia -e 'whos()'
WARNING: Base.whos is deprecated: it has been moved to the standard library package `InteractiveUtils`.
Add `using InteractiveUtils` to your imports.
 in module Main
┌ Warning: `whos()` is deprecated, use `varinfo()` instead.
│   caller = top-level scope at none:0
└ @ Core none:0


#5

I wish we could have but 0.7 wasn’t approved at work so it never got installed.
Guess I could have tried it at home, but I try not to bring work home.

Next time we do an upgrade I’ll keep an eye on any versions we skipped over.
Thanks for the tip!

@zgornel: Thank you, that solves our needs.


#6

You can also check the history file. whos is mentioned.