Open spinkney opened 3 years ago
Oops, the macro is incompatible with Pluto 0.16, it expands the macros so it warns repeated definition of the NiLangCore._typeof
function.
@fonsp Do you know any good fix?
I am definitely missing the context here, but defining multiple for the same function is allowed in pluto since https://github.com/fonsp/Pluto.jl/pull/538 , as long as their types are different. How is the function being defined? Can you post a @macroexpand
result?
If you want to hide something from Pluto's analysis: eval(:( #= original code =# ))
The macroexpand result is
julia> @macroexpand @i function f1(x, y) end
quote
begin
$(Expr(:meta, :doc))
function $(Expr(:where, :(f1(x, y))))
#= REPL[6]:1 =#
#= REPL[6]:1 =#
(x, y)
end
end
if (NiLangCore)._typeof(f1) != (NiLangCore._typeof)(~f1)
function $(Expr(:where, :((var"##~f1#272"::(NiLangCore._typeof)(~f1))(x, y))))
#= REPL[6]:1 =#
#= REPL[6]:1 =#
(x, y)
end
end
end
I think the function name is not analysed correctly, it should be (var"##~f1#272"::(NiLangCore._typeof)(~f1))
, rather than NiLangCore._typeof
.
I see, can you post just this last bit as a github issue on pluto? Make sure to give a MWE that does not depend on (being familiar with) NiLang.jl
I have posted an issue in Pluto's repo. About the first issue, I think it is probably because I used TikzPictures
(https://github.com/JuliaTeX/TikzPictures.jl). It requires a latex installation. @spinkney Or I can generate a pdf file in the notebook folder, so that you do not need a latex to show the images, which works better for you?
@GiggleLiu, either way though it will be easier for people to just run as-is with the pdf files.
Some of the latex is not rendering
g
Errors resulting when defining functions for all nilang functions
julia 1.6.2 NiLang v0.9.1 Pluto v0.16.1