I think this is meant:
julia> using Compat
julia> @compat 1
1
julia> Compat.@compat 1
1
julia> @everywhere Compat.@compat 1
julia> @everywhere @compat 1
ERROR: On worker 2:
UndefVarError: @compat not defined
eval at ./boot.jl:235
eval_ew_expr at ./distributed/macros.jl:116
#106 at ./distributed/process_messages.jl:268 [inlined]
run_work_thunk at ./distributed/process_messages.jl:56
macro expansion at ./distributed/process_messages.jl:268 [inlined]
#105 at ./event.jl:73
#remotecall_fetch#141(::Array{Any,1}, ::Function, ::Function, ::Base.Distributed.Worker, ::Expr, ::Vararg{Expr,N} where N) at ./distributed/remotecall.jl:354
remotecall_fetch(::Function, ::Base.Distributed.Worker, ::Expr, ::Vararg{Expr,N} where N) at ./distributed/remotecall.jl:346
#remotecall_fetch#144(::Array{Any,1}, ::Function, ::Function, ::Int64, ::Expr, ::Vararg{Expr,N} where N) at ./distributed/remotecall.jl:367
remotecall_fetch(::Function, ::Int64, ::Expr, ::Vararg{Expr,N} where N) at ./distributed/remotecall.jl:367
(::##7#9)() at ./distributed/macros.jl:102
...and 1 more exception(s).
Stacktrace:
[1] sync_end() at ./task.jl:287
[2] macro expansion at ./distributed/macros.jl:112 [inlined]
[3] anonymous at ./<missing>:?
i.e. using Compat
also executes import Compat
on all nodes, but not using Compat
. Whether this is good is disputed: https://github.com/JuliaLang/julia/issues/9245