Closed greimel closed 2 years ago
I assume that's @Pangoraw 's business :-)
This is because you cannot use a macro in the same expression where you define it because the macro expansion happens before the expression is evaluated. The same is true in the REPL:
julia> begin
using DrWatson
@quickactivate
end
ERROR: LoadError: UndefVarError: @quickactivate not defined
in expression starting at REPL[1]:3
In version 0.16.1
the execution model would pre-run all usings statements so that's why it was possible. This was removed because it caused other unexpected behaviors like #1511. This is likely to stay that way now, because Pluto notebooks can also be run as plain julia scripts.
https://user-images.githubusercontent.com/6280307/138504368-8e936962-0962-421a-8b07-ccaacacf353d.mov