Obscure error message when using Documenter plugin in PkgTemplates.jl


I am trying to initiate a second project by defining a template suitable for use with the package PkgTemplates. The template definition appears to work fine without the Documenter plugin, but as soon as I include it as shown here:

tmpl = Template(;
    user="Michel Verstraete",

I get the error message

ERROR: TypeError: in Type{...} expression, expected UnionAll, got a value of type Module
 [1] top-level scope
   @ REPL[25]:1

even though this is pretty much verbatim what appears in the documentation at

User Guide · PkgTemplates.jl and
PkgTemplates.jl/user.md at master · JuliaCI/PkgTemplates.jl · GitHub

I’ve tried to replace GitHubActions by Nothing on the two lines, and to add the GitHubActions plugin itself, but to no avail. Even the simplest plugin setting Documenter{GitHubActions}(), generates that same error message.

Comments and suggestions will be most welcome.

For what it’s worth, you don’t need to use Template, just doing this usually works:

using PkgTemplates

The above should give some kind of interactive text user interface, so try using that.

Hi @nsajko,

Thanks for your suggestion. I’ve tried to use the interactive approach before, but it is very picky and quits as soon as one makes the slightest mistake, forcing one to restart from scratch. This is very frustrating, in part because one often does not know what the questions or options are all about, what’s the most appropriate answer, or what’s the implication of the setting. I’d rather prepare a template definition first, containing only those options I do understand and need, if that can be made to work.

In any case, I’d like to know what’s wrong with the settings indicated earlier, because similarly answering the same entries in the interactive session would likely lead to the same error.

1 Like