tlienart / Franklin.jl

(yet another) static site generator. Simple, customisable, fast, maths with KaTeX, code evaluation, optional pre-rendering, in Julia.
https://franklinjl.org
MIT License
959 stars 113 forks source link

`build-and-deploy` on GitHub leads to AssertionError #815

Open yenson-lau opened 3 years ago

yenson-lau commented 3 years ago

To replicate this, run on Julia 1.6.1

using Franklin
newsite("mysite", template="pure-sm")
serve()

Then simply

cd mysite
git add -A && git commit -m "Initial commit"
git push origin master

The error thrown by GitHub on build-and-deploy is

Run julia -e ' using Pkg; Pkg.activate("."); Pkg.instantiate(); using NodeJS; run(`$(npm_cmd()) install highlight.js`); using Franklin; optimize()'
 Activating environment at `~/work/mysite/mysite/Project.toml`
ERROR: AssertionError: sourcepath !== nothing
Stacktrace:
 [1] is_package_downloaded at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Operations.jl:1670 [inlined]
 [2] #12 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Operations.jl:113 [inlined]
 [3] _all(::Pkg.Operations.var"#12#13"{Pkg.Types.Context}, ::Array{Pkg.Types.PackageSpec,1}, ::Colon) at ./reduce.jl:828
 [4] #all#638 at ./reducedim.jl:735 [inlined]
 [5] all at ./reducedim.jl:735 [inlined]
 [6] is_instantiated at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Pkg/src/Operations.jl:113 [inlined]
 [7] instantiate(::Pkg.Types.Context; manifest::Nothing, update_registry::Bool, verbose::Bool, platform::Pkg.BinaryPlatforms.Linux, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:828
 [8] instantiate(::Pkg.Types.Context) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:795
 [9] #instantiate#169 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:791 [inlined]
 [10] instantiate() at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.5/Pkg/src/API.jl:791
 [11] top-level scope at none:1
Error: Process completed with exit code 1.
yenson-lau commented 3 years ago

The solution seems to be to remove the Manifest.toml since Julia 1.6.1 manifests have been known to cause issues with 1.5. https://github.com/JuliaLang/Pkg.jl/issues/2289

tlienart commented 3 years ago

Thanks for this report, I'll reopen to get something in the docs about it.

bhvieira commented 3 years ago

I'm on Julia 1.5.1 and had to do the same. Previous deploys worked, but I haven't looked too much into it or what changed.