Makie.jl
Makie.jl copied to clipboard
@recipe requires a backend to work
Hi!
I was trying to use the @recipe
macro using only MakieCore
but I found the following error (everything works fine when loading a backend):
(jl_knZW9b) pkg> st
Status `/tmp/jl_knZW9b/Project.toml`
[e9467ef8] GLMakie v0.6.10
[20f20a25] MakieCore v0.3.5
julia> using MakieCore
julia> @recipe(StockChart) do scene
Attributes()
end
ERROR: LoadError: UndefVarError: @recipe not defined
in expression starting at REPL[5]:1
julia> MakieCore.@recipe(StockChart) do scene
Attributes()
end
ERROR: syntax: invalid syntax "MakieCore.@recipe # REPL[6], line 1 StockChart do scene
# REPL[6], line 2
Attributes()
end" around REPL[6]:1
Stacktrace:
[1] top-level scope
@ REPL[6]:1
julia> using GLMakie
julia> @recipe(StockChart) do scene
Attributes()
end
Cheers,
Does @MakieCore.recipe
work? I vaguely remember seeing this before.
Oh! Yes! That's strange, isn't it?
julia> @MakieCore.recipe(StockChart) do scene
Attributes()
end
wait hold up I thought
@A.a
and
A.@a
are exactly equivalent
I have no idea 🤷
Ok, I guess we are used to working with exported macros, but @recipe
is not exported. I think that's the difference.
This is a Julia bug and should be fixed in 1.8 (ref).