Open joa-quim opened 1 year ago
And trying your suggestion
using Xranklin; serve(debug=true)
...
┌ Debug: Loading cache file C:\Users\joaqu\.julia\compiled\v1.9\ImageTransformations\Pfac4_LuoiV.ji for ImageTransformations [02fcd773-0e25-5acc-982a-7f6622650795]
└ @ Base loading.jl:900
ERROR: LoadError: UndefVarError: `@delay` not defined
Stacktrace:
[1] top-level scope
@ :0
[2] eval
@ .\boot.jl:370 [inlined]
[3] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
@ Base .\loading.jl:1522
[4] include_string (repeats 2 times)
@ .\loading.jl:1532 [inlined]
[5] process_utils(gc::Xranklin.GlobalContext{Xranklin.LocalContext}, utils::String)
@ Xranklin C:\Users\joaqu\.julia\packages\Xranklin\aymG1\src\process\config_utils.jl:161
[6] process_utils(gc::Xranklin.GlobalContext{Xranklin.LocalContext})
@ Xranklin C:\Users\joaqu\.julia\packages\Xranklin\aymG1\src\process\config_utils.jl:192
[7] serve(d::String; dir::String, folder::String, clear::Bool, final::Bool, single::Bool, eval::Bool, nocode::Bool, threads::Bool, use_threads::Bool, prepath::String, prefix::String, base_url_prefix::String, debug::Bool, cleanup::Bool, skip::Vector{String}, port::Int64, host::String, launch::Bool)
@ Xranklin C:\Users\joaqu\.julia\packages\Xranklin\aymG1\src\build\serve.jl:132
[8] serve
@ C:\Users\joaqu\.julia\packages\Xranklin\aymG1\src\build\serve.jl:54 [inlined]
[9] top-level scope
@ REPL[10]:1
in expression starting at string:162
in expression starting at string:162
@delay
is deprecated in Xranklin; so try to remove that from utils.jl
.
For your first issue, can I just check that what you did is
] add https://github.com/tlienart/Xranklin.jl
?
the result from st
in your first comment is weird (there's no release of Xranklin so it should not put a 0.10.79
in front of it, that's Franklin's latest release.
Also just in case, you should be working in a dedicated environment with Xranklin (so there shouldn't be both Franklin and Xranklin in your project).
OK, I found the mistake that explains the [713c75ef] Xranklin v0.10.79
line. In the Project.toml
I only replaced Franklin
by Xranklin
but forgot to change the UUID too. But now it complain that Xranklin
is not registered
julia> serve(debug=true)
Activating project at `c:\v\doc_t\GMTjl_doc_X`
Updating registry at `C:\Users\joaqu\.julia\registries\General.toml`
ERROR: expected package `Xranklin [558449b0]` to be registered
Stacktrace:
[1] pkgerror(msg::String)
@ Pkg.Types C:\programs\julia-1.7\share\julia\stdlib\v1.7\Pkg\src\Types.jl:68
[2] check_registered
@ C:\programs\julia-1.7\share\julia\stdlib\v1.7\Pkg\src\Operations.jl:1090 [inlined]
[3] up(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, level::Pkg.Types.UpgradeLevel; skip_writing_project::Bool)
@ Pkg.Operations C:\programs\julia-1.7\share\julia\stdlib\v1.7\Pkg\src\Operations.jl:1263
[4] up(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; level::Pkg.Types.UpgradeLevel, mode::Pkg.Types.PackageMode, update_registry::Bool, skip_writing_project::Bool, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.API C:\programs\julia-1.7\share\julia\stdlib\v1.7\Pkg\src\API.jl:333
[5] #up#55
@ C:\programs\julia-1.7\share\julia\stdlib\v1.7\Pkg\src\API.jl:154 [inlined]
[6] instantiate(ctx::Pkg.Types.Context; manifest::Nothing, update_registry::Bool, verbose::Bool, platform::Base.BinaryPlatforms.Platform, allow_build::Bool, allow_autoprecomp::Bool, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Pkg.API C:\programs\julia-1.7\share\julia\stdlib\v1.7\Pkg\src\API.jl:1443
[7] instantiate
@ C:\programs\julia-1.7\share\julia\stdlib\v1.7\Pkg\src\API.jl:1422 [inlined]
[8] #instantiate#276
@ C:\programs\julia-1.7\share\julia\stdlib\v1.7\Pkg\src\API.jl:1418 [inlined]
[9] instantiate
@ C:\programs\julia-1.7\share\julia\stdlib\v1.7\Pkg\src\API.jl:1418 [inlined]
[10] serve(d::String; dir::String, folder::String, clear::Bool, final::Bool, single::Bool, eval::Bool, nocode::Bool, threads::Bool, use_threads::Bool, prepath::String, prefix::String, base_url_prefix::String, debug::Bool, cleanup::Bool, skip::Vector{String}, port::Int64, host::String, launch::Bool)
@ Xranklin C:\Users\joaqu\.julia\packages\Xranklin\aymG1\src\build\serve.jl:106
[11] top-level scope
@ REPL[4]:1
So I tried a trick: remove Xranklin
from the Project.toml
but Julia in it's best (incomprehensible error/stack trace)
serve(debug=true)
...
┌ Debug: � ... try_form_lxdef > \newcommand
└ @ Xranklin C:\Users\joaqu\.julia\packages\Xranklin\aymG1\src\misc_utils.jl:105
┌ Debug: � ... try_form_lxdef > \newcommand
└ @ Xranklin C:\Users\joaqu\.julia\packages\Xranklin\aymG1\src\misc_utils.jl:105
[ Info: ... [config.md] ✔ (δt = 27ms)
[ Info: � starting the full pass
ERROR: LoadError: syntax: invalid escape sequence
Stacktrace:
[1] top-level scope
@ string:4
[2] eval
@ .\boot.jl:373 [inlined]
[3] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
@ Base .\loading.jl:1196
[4] include_string (repeats 2 times)
@ .\loading.jl:1206 [inlined]
[5] modules_setup(c::Xranklin.LocalContext)
@ Xranklin C:\Users\joaqu\.julia\packages\Xranklin\aymG1\src\context\code\modules.jl:209
[6] Xranklin.LocalContext(glob::Xranklin.GlobalContext{Xranklin.LocalContext}, vars::Dict{Symbol, Any}, defs::Dict{String, Xranklin.LxDef}, headings::OrderedCollections.LittleDict{String, Tuple{Int64, Int64, String}, Vector{String}, Vector{Tuple{Int64, Int64, String}}}, rpath::String, alias::Dict{Symbol, Symbol})
@ Xranklin C:\Users\joaqu\.julia\packages\Xranklin\aymG1\src\context\context.jl:224
[7] #LocalContext#16
@ C:\Users\joaqu\.julia\packages\Xranklin\aymG1\src\context\context.jl:235 [inlined]
[8] DefaultLocalContext(gc::Xranklin.GlobalContext{Xranklin.LocalContext}; rpath::String)
@ Xranklin C:\Users\joaqu\.julia\packages\Xranklin\aymG1\src\context\default_context.jl:202
[9] allocate_children_contexts(gc::Xranklin.GlobalContext{Xranklin.LocalContext}, watched::Dict{Pair{String, String}, Float64})
@ Xranklin C:\Users\joaqu\.julia\packages\Xranklin\aymG1\src\build\full_pass.jl:253
[10] full_pass_markdown(gc::Xranklin.GlobalContext{Xranklin.LocalContext}, watched::Dict{Pair{String, String}, Float64}; skip_files::Vector{Pair{String, String}}, allow_skip::Bool, final::Bool)
@ Xranklin C:\Users\joaqu\.julia\packages\Xranklin\aymG1\src\build\full_pass.jl:330
[11] full_pass(gc::Xranklin.GlobalContext{Xranklin.LocalContext}, watched_files::Dict{Symbol, Dict{Pair{String, String}, Float64}}; skip_files::Vector{Pair{String, String}}, initial_pass::Bool, layout_changed::Bool, config_changed::Bool, utils_changed::Bool, final::Bool)
@ Xranklin C:\Users\joaqu\.julia\packages\Xranklin\aymG1\src\build\full_pass.jl:169
[12] serve(d::String; dir::String, folder::String, clear::Bool, final::Bool, single::Bool, eval::Bool, nocode::Bool, threads::Bool, use_threads::Bool, prepath::String, prefix::String, base_url_prefix::String, debug::Bool, cleanup::Bool, skip::Vector{String}, port::Int64, host::String, launch::Bool)
@ Xranklin C:\Users\joaqu\.julia\packages\Xranklin\aymG1\src\build\serve.jl:152
[13] top-level scope
@ REPL[10]:1
in expression starting at string:4
alright bear with me, could you:
.toml
file you have in the folderadd https://github.com/tlienart/Xranklin.jl
then
using Xranklin
serve(clear=true, debug=true)
your first few attempts likely generated a cache which is corrupt and so it's failing to load it, clear=true
will remove that. There may still be errors of course but at least we'll get a clearer idea of what's going on
PS: I hope you didn't just copy paste your entire folder that you were using with Franklin and just tried with Xranklin? it should mostly work yes, but it'll be easier to fix small wrinkles if you start with one or two pages at first, clear out the repetitive errors, don't pollute the whole thing with executing foreign code yet, and once that's working add the content gradually
PS: I hope you didn't just copy paste your entire folder that you were using with Franklin and just tried with Xranklin? it should mostly work yes, but it'll be easier to fix small wrinkles if you start with one or two pages at first, clear out the repetitive errors, don't pollute the whole thing with executing foreign code yet, and once that's working add the content gradually
Off course I did 😄 But took the care of replacing all references to Franklin by Xranklin.
Unfortunately nope
┌ Debug: � ... try_form_lxdef > \newcommand
└ @ Xranklin C:\Users\joaqu\.julia\packages\Xranklin\aymG1\src\misc_utils.jl:105
[ Info: ... [config.md] ✔ (δt = 16ms)
[ Info: � starting the full pass
ERROR: LoadError: syntax: invalid escape sequence
Stacktrace:
[1] top-level scope
@ string:4
[2] eval
@ .\boot.jl:373 [inlined]
[3] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
@ Base .\loading.jl:1196
[4] include_string (repeats 2 times)
@ .\loading.jl:1206 [inlined]
[5] modules_setup(c::Xranklin.LocalContext)
@ Xranklin C:\Users\joaqu\.julia\packages\Xranklin\aymG1\src\context\code\modules.jl:209
[6] Xranklin.LocalContext(glob::Xranklin.GlobalContext{Xranklin.LocalContext}, vars::Dict{Symbol, Any}, defs::Dict{String, Xranklin.LxDef}, headings::OrderedCollections.LittleDict{String, Tuple{Int64, Int64, String}, Vector{String}, Vector{Tuple{Int64, Int64, String}}}, rpath::String, alias::Dict{Symbol, Symbol})
@ Xranklin C:\Users\joaqu\.julia\packages\Xranklin\aymG1\src\context\context.jl:224
[7] #LocalContext#16
@ C:\Users\joaqu\.julia\packages\Xranklin\aymG1\src\context\context.jl:235 [inlined]
[8] DefaultLocalContext(gc::Xranklin.GlobalContext{Xranklin.LocalContext}; rpath::String)
@ Xranklin C:\Users\joaqu\.julia\packages\Xranklin\aymG1\src\context\default_context.jl:202
[9] allocate_children_contexts(gc::Xranklin.GlobalContext{Xranklin.LocalContext}, watched::Dict{Pair{String, String}, Float64})
@ Xranklin C:\Users\joaqu\.julia\packages\Xranklin\aymG1\src\build\full_pass.jl:253
[10] full_pass_markdown(gc::Xranklin.GlobalContext{Xranklin.LocalContext}, watched::Dict{Pair{String, String}, Float64}; skip_files::Vector{Pair{String, String}}, allow_skip::Bool, final::Bool)
@ Xranklin C:\Users\joaqu\.julia\packages\Xranklin\aymG1\src\build\full_pass.jl:330
[11] full_pass(gc::Xranklin.GlobalContext{Xranklin.LocalContext}, watched_files::Dict{Symbol, Dict{Pair{String, String}, Float64}}; skip_files::Vector{Pair{String, String}}, initial_pass::Bool, layout_changed::Bool, config_changed::Bool, utils_changed::Bool, final::Bool)
@ Xranklin C:\Users\joaqu\.julia\packages\Xranklin\aymG1\src\build\full_pass.jl:169
[12] serve(d::String; dir::String, folder::String, clear::Bool, final::Bool, single::Bool, eval::Bool, nocode::Bool, threads::Bool, use_threads::Bool, prepath::String, prefix::String, base_url_prefix::String, debug::Bool, cleanup::Bool, skip::Vector{String}, port::Int64, host::String, launch::Bool)
@ Xranklin C:\Users\joaqu\.julia\packages\Xranklin\aymG1\src\build\serve.jl:152
[13] top-level scope
@ REPL[7]:1
in expression starting at string:4
Could you paste the content of config.md
here? or better yet, could you put some minimal stuff in a draft repo that we could both work on? (i.e. with maybe only the landing page and one content page). It looks like one of your \newcommand
has something weird in it. Though that's not what's crashing Xranklin but I'd need to have the minimal repo to figure that one out.
First is easier https://github.com/GenericMappingTools/GMTjl_doc/blob/master/config.md
Second demands more time. Note, you still have rights on https://github.com/joa-quim/GMTjl_doc That is not the copy I'm working on but should be very close. Except the Franknlin -> Xranklin replacement.
See https://github.com/tlienart/Franklin.jl/issues/989#issuecomment-1338128088 for initial story
Tried Xranklin but I'm having several errors. Maybe this one summarizes it. (same thing with Julia 1.7)