Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installable_on_version doesn't set .server_type, .api_url #190

Open
mortenpi opened this issue Feb 21, 2023 · 1 comment
Open

installable_on_version doesn't set .server_type, .api_url #190

mortenpi opened this issue Feb 21, 2023 · 1 comment

Comments

@mortenpi
Copy link
Member

This makes DocumentationGenerator.build_documentation fail with

ERROR: type NamedTuple has no field server_type
Stacktrace:
 [1] getproperty
   @ ./Base.jl:38 [inlined]
 [2] start_builder(package::NamedTuple{(:name, :url, :uuid, :path, :versions), Tuple{String, String, String, String, Vector{VersionNumber}}}, version::VersionNumber; basepath::String, juliacmd::String, registry_path::String, deployment_url::String, update_only::Bool, src_prefix::Nothing, href_prefix::Nothing, timeout::Int64, max_timeout::Int64, kill_timeout::Int64)
   @ DocumentationGenerator ~/jc/docgen/dev/DocumentationGenerator/src/DocumentationGenerator.jl:271
 [3] (::DocumentationGenerator.var"#74#75"{Int64, Float64, String, String, typeof(last), String, Bool, Int64, Int64, Int64, Vector{NamedTuple{(:name, :url, :uuid, :path, :versions), Tuple{String, String, String, String, Vector{VersionNumber}}}}, Vector{Any}, String})()
   @ DocumentationGenerator ~/jc/docgen/dev/DocumentationGenerator/src/DocumentationGenerator.jl:126
 [4] withenv(f::DocumentationGenerator.var"#74#75"{Int64, Float64, String, String, typeof(last), String, Bool, Int64, Int64, Int64, Vector{NamedTuple{(:name, :url, :uuid, :path, :versions), Tuple{String, String, String, String, Vector{VersionNumber}}}}, Vector{Any}, String})
   @ Base ./env.jl:179
 [5] build_documentation(packages::Vector{NamedTuple{(:name, :url, :uuid, :path, :versions), Tuple{String, String, String, String, Vector{VersionNumber}}}}; processes::Int64, sleeptime::Float64, juliacmd::String, basepath::String, envpath::String, filter_versions::typeof(last), sync_registry::Bool, deployment_url::String, update_only::Bool, registry::String, timeout::Int64, max_timeout::Int64, kill_timeout::Int64)
   @ DocumentationGenerator ~/jc/docgen/dev/DocumentationGenerator/src/DocumentationGenerator.jl:116
 [6] build_documentation(packages::Vector{NamedTuple{(:name, :url, :uuid, :path, :versions), Tuple{String, String, String, String, Vector{VersionNumber}}}})
   @ DocumentationGenerator ~/jc/docgen/dev/DocumentationGenerator/src/DocumentationGenerator.jl:73
 [7] top-level scope
   @ ~/jc/docgen/mwe.jl:10

For an MWE

using DocumentationGenerator
pkgs = DocumentationGenerator.installable_on_version(VERSION)
pkg = let pkgs = collect(pkgs)
    i = findfirst(kv -> kv.second.name == "MarkdownAST", pkgs)
    pkgs[i].second
end
DocumentationGenerator.build_documentation([pkg])

From #186 I think, cc @vdayanand

@mortenpi mortenpi changed the title installable_on_version doesn't set .server_type installable_on_version doesn't set .server_type, .api_url Feb 21, 2023
@mortenpi
Copy link
Member Author

Just noticed that this also breaks the documented ./run/makedocs.jl script:

$ julia --project run/makedocs.jl
┌ Warning: No `xvfb` installed. Running without it.
└ @ DocumentationGenerator ~/juliadocs/clones/DocumentationGenerator.jl/src/DocumentationGenerator.jl:92
Cloning into '/tmp/jl_131yoo/registry'...
remote: Enumerating objects: 14, done.
remote: Counting objects: 100% (14/14), done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 14 (delta 0), reused 7 (delta 0), pack-reused 0
Receiving objects: 100% (14/14), 7.75 KiB | 7.75 MiB/s, done.
    Updating registry at `~/.julia/registries/General.toml`
ERROR: LoadError: type NamedTuple has no field server_type
Stacktrace:
 [1] getproperty
   @ ./Base.jl:37 [inlined]
 [2] start_builder(package::NamedTuple{(:name, :url, :uuid, :path, :versions), Tuple{String, String, String, String, Vector{VersionNumber}}}, version::VersionNumber; basepath::String, juliacmd::String, registry_path::String, deployment_url::String, update_only::Bool, src_prefix::Nothing, href_prefix::Nothing, timeout::Int64, max_timeout::Int64, kill_timeout::Int64)
   @ DocumentationGenerator ~/juliadocs/clones/DocumentationGenerator.jl/src/DocumentationGenerator.jl:270
 [3] (::DocumentationGenerator.var"#74#75"{Int64, Float64, String, String, typeof(last), String, Bool, Int64, Int64, Int64, Vector{Any}, Vector{Any}, String})()
   @ DocumentationGenerator ~/juliadocs/clones/DocumentationGenerator.jl/src/DocumentationGenerator.jl:125
 [4] withenv(f::DocumentationGenerator.var"#74#75"{Int64, Float64, String, String, typeof(last), String, Bool, Int64, Int64, Int64, Vector{Any}, Vector{Any}, String})
   @ Base ./env.jl:204
 [5] build_documentation(packages::Vector{Any}; processes::Int64, sleeptime::Float64, juliacmd::String, basepath::String, envpath::String, filter_versions::typeof(last), sync_registry::Bool, deployment_url::String, update_only::Bool, registry::String, timeout::Int64, max_timeout::Int64, kill_timeout::Int64)
   @ DocumentationGenerator ~/juliadocs/clones/DocumentationGenerator.jl/src/DocumentationGenerator.jl:115
 [6] top-level scope
   @ ~/juliadocs/clones/DocumentationGenerator.jl/run/makedocs.jl:15
in expression starting at /home/mortenpi/juliadocs/clones/DocumentationGenerator.jl/run/makedocs.jl:15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant