JuliaDocs / DocumentationGenerator.jl

MIT License
21 stars 7 forks source link

DemoCards.jl broken builds #187

Open AP6YC opened 1 year ago

AP6YC commented 1 year ago

I am here because the JuliaHub documentation generation says that it is done by this package, and the "contact support" button does not appear to work for me.

In projects using DemoCards.jl, the docs builds on JuliaHub appear to fail due to a bad writing permission (which is necessary for creating the demo cards during the build process). I have two projects depending on it, and it appears that the DemoCards.jl docs fail for the same reason. The logs for these projects are:

Other packages that I see that depend on it, such as the great Plots.jl package, appear to circumvent the problem by redirecting the "read on JuliaHub" button to their own hosted docs, which I cannot for the life of me figure out where the setting for this is.

Regardless, the logs for each project share the write permission error within the docs directory with a similar error:

image

The line in question is 471: "SystemError: opening file "/juliateam/.julia/packages/ClusterValidityIndices/UT9rS/docs/src/examples/basic-examples/cvi-example.jl": Permission denied"

Is the write permission and subsequent error on the side of DocumentationGenerator.jl or a setting in JuliaHub? If it is on the JuliaHub side, is there documentation to show how to change some permissions setting, or is it out of our hands? Thanks for your time.

pfitzseb commented 1 year ago

Strictly speaking, this isn't really JuliaHub specific. You can repro the issue with just pkg> add DemoCards instead of dev'ing it (see below for REPL session).

I'm happy to just make the whole package dir writable, but arguably your package should handle that case on its own.

``` (@v1.8) pkg> activate --temp Activating new project at `/tmp/jl_vdlyFW` (jl_vdlyFW) pkg> add DemoCards <...> shell> cd /home/pfitzseb/.julia/packages/DemoCards/tfzL5/docs/ /home/pfitzseb/.julia/packages/DemoCards/tfzL5/docs shell> chmod +x Project.toml (jl_vdlyFW) pkg> activate . Activating project at `~/.julia/packages/DemoCards/tfzL5/docs` (docs) pkg> dev .. <...> (docs) pkg> instantiate Precompiling project... 14 dependencies successfully precompiled in 29 seconds. 149 already precompiled. julia> include("make.jl") [ Info: SetupDemoCardsDirectory: setting up "quickstart" directory. ┌ Error: Errors when building demo dir │ pwd = "/home/pfitzseb/.julia/packages/DemoCards/tfzL5/docs" │ source = "quickstart" │ root = "/home/pfitzseb/.julia/packages/DemoCards/tfzL5/docs" │ src = "src" └ @ DemoCards ~/.julia/packages/DemoCards/tfzL5/src/generate.jl:237 ERROR: LoadError: SystemError: opening file "/home/pfitzseb/.julia/packages/DemoCards/tfzL5/docs/src/quickstart/usage_example/basics/hidden_card.jl": Permission denied Stacktrace: [1] systemerror(p::String, errno::Int32; extrainfo::Nothing) @ Base ./error.jl:176 [2] #systemerror#80 @ ./error.jl:175 [inlined] [3] systemerror @ ./error.jl:175 [inlined] [4] open(fname::String; lock::Bool, read::Nothing, write::Nothing, create::Nothing, truncate::Bool, append::Nothing) @ Base ./iostream.jl:293 [5] open(fname::String, mode::String; lock::Bool) @ Base ./iostream.jl:356 [6] open(fname::String, mode::String) @ Base ./iostream.jl:355 [7] open(::Base.var"#383#384"{String, Tuple{String}}, ::String, ::Vararg{String}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}) @ Base ./io.jl:382 [8] open @ ./io.jl:381 [inlined] [9] write @ ./io.jl:448 [inlined] [10] save_democards(card_dir::String, card::DemoCards.JuliaDemoCard; credit::Bool, nbviewer_root_url::String, project_dir::String, src::String, throw_error::Bool, properties::Dict{String, Any}, kwargs::Base.Pairs{Symbol, String, Tuple{Symbol}, NamedTuple{(:project_root,), Tuple{String}}}) @ DemoCards ~/.julia/packages/DemoCards/tfzL5/src/types/julia.jl:219 [11] (::Base.Broadcast.var"#41#42"{Base.Pairs{Symbol, Any, NTuple{6, Symbol}, NamedTuple{(:properties, :project_root, :src, :credit, :nbviewer_root_url, :throw_error), Tuple{Dict{String, Any}, String, String, Bool, String, Bool}}}, typeof(DemoCards.save_democards)})(::String, ::Vararg{Any}) @ Base.Broadcast ./broadcast.jl:1284 [12] _broadcast_getindex_evalf @ ./broadcast.jl:670 [inlined] [13] _broadcast_getindex @ ./broadcast.jl:643 [inlined] [14] getindex @ ./broadcast.jl:597 [inlined] [15] copyto_nonleaf!(dest::Vector{Int64}, bc::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Tuple{Base.OneTo{Int64}}, Base.Broadcast.var"#41#42"{Base.Pairs{Symbol, Any, NTuple{6, Symbol}, NamedTuple{(:properties, :project_root, :src, :credit, :nbviewer_root_url, :throw_error), Tuple{Dict{String, Any}, String, String, Bool, String, Bool}}}, typeof(DemoCards.save_democards)}, Tuple{Base.RefValue{String}, Base.Broadcast.Extruded{Vector{DemoCards.AbstractDemoCard}, Tuple{Bool}, Tuple{Int64}}}}, iter::Base.OneTo{Int64}, state::Int64, count::Int64) @ Base.Broadcast ./broadcast.jl:1055 [16] copy @ ./broadcast.jl:907 [inlined] [17] materialize(bc::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, Base.Broadcast.var"#41#42"{Base.Pairs{Symbol, Any, NTuple{6, Symbol}, NamedTuple{(:properties, :project_root, :src, :credit, :nbviewer_root_url, :throw_error), Tuple{Dict{String, Any}, String, String, Bool, String, Bool}}}, typeof(DemoCards.save_democards)}, Tuple{Base.RefValue{String}, Vector{DemoCards.AbstractDemoCard}}}) @ Base.Broadcast ./broadcast.jl:860 [18] save_democards(root::String, sec::DemoCards.DemoSection; properties::Dict{String, Any}, kwargs::Base.Pairs{Symbol, Any, NTuple{5, Symbol}, NamedTuple{(:project_root, :src, :credit, :nbviewer_root_url, :throw_error), Tuple{String, String, Bool, String, Bool}}}) @ DemoCards ~/.julia/packages/DemoCards/tfzL5/src/generate.jl:396 [19] #41 @ ./broadcast.jl:1284 [inlined] [20] _broadcast_getindex_evalf @ ./broadcast.jl:670 [inlined] [21] _broadcast_getindex @ ./broadcast.jl:643 [inlined] [22] getindex @ ./broadcast.jl:597 [inlined] [23] copy @ ./broadcast.jl:899 [inlined] [24] materialize(bc::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, Base.Broadcast.var"#41#42"{Base.Pairs{Symbol, Any, NTuple{6, Symbol}, NamedTuple{(:properties, :project_root, :src, :credit, :nbviewer_root_url, :throw_error), Tuple{Dict{String, Any}, String, String, Bool, String, Bool}}}, typeof(DemoCards.save_democards)}, Tuple{Base.RefValue{String}, Vector{DemoCards.DemoSection}}}) @ Base.Broadcast ./broadcast.jl:860 [25] save_democards(root::String, sec::DemoCards.DemoSection; properties::Dict{String, Any}, kwargs::Base.Pairs{Symbol, Any, NTuple{5, Symbol}, NamedTuple{(:project_root, :src, :credit, :nbviewer_root_url, :throw_error), Tuple{String, String, Bool, String, Bool}}}) @ DemoCards ~/.julia/packages/DemoCards/tfzL5/src/generate.jl:394 [26] #41 @ ./broadcast.jl:1284 [inlined] [27] _broadcast_getindex_evalf @ ./broadcast.jl:670 [inlined] [28] _broadcast_getindex @ ./broadcast.jl:643 [inlined] [29] getindex @ ./broadcast.jl:597 [inlined] [30] copy @ ./broadcast.jl:899 [inlined] [31] materialize @ ./broadcast.jl:860 [inlined] [32] save_democards(root::String, page::DemoCards.DemoPage; kwargs::Base.Pairs{Symbol, Any, NTuple{5, Symbol}, NamedTuple{(:project_root, :src, :credit, :nbviewer_root_url, :throw_error), Tuple{String, String, Bool, String, Bool}}}) @ DemoCards ~/.julia/packages/DemoCards/tfzL5/src/generate.jl:389 [33] makedemos(source::String, templates::Nothing; root::String, src::String, build::String, branch::String, edit_branch::String, credit::Bool, throw_error::Bool) @ DemoCards ~/.julia/packages/DemoCards/tfzL5/src/generate.jl:192 [34] makedemos (repeats 2 times) @ ~/.julia/packages/DemoCards/tfzL5/src/generate.jl:88 [inlined] [35] top-level scope @ ~/.julia/packages/DemoCards/tfzL5/docs/make.jl:5 [36] include(fname::String) @ Base.MainInclude ./client.jl:476 [37] top-level scope @ REPL[8]:1 in expression starting at /home/pfitzseb/.julia/packages/DemoCards/tfzL5/docs/make.jl:5 ```