JuliaDocs / Documenter.jl

A documentation generator for Julia.

Home Page:https://documenter.juliadocs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LoadError: `makedocs` encountered an error [:missing_docs] -- terminating build before rendering.

kdheepak opened this issue · comments

I have the following source code in my project:

"""
    CursorStyle

Different styles for the terminal cursor.
"""
@enumx CursorStyle::UInt32 begin
  DEFAULT_USER_SHAPE = 0
  BLINKING_BLOCK = 1
  STEADY_BLOCK = 2
  BLINKING_UNDER_SCORE = 3
  STEADY_UNDER_SCORE = 4
  BLINKING_BAR = 5
  STEADY_BAR = 6
end
Base.cconvert(::Type{LibCrossterm.crossterm_CursorStyle}, v::CursorStyle.T) = LibCrossterm.crossterm_CursorStyle(UInt32(v))

And in my docs, I have

See API documentation below.

```@autodocs
Modules = [Crossterm]
```

But I get an error when building docs on CI

image

https://github.com/kdheepak/Crossterm.jl/actions/runs/8430336211/job/23086017914

I'm not quite sure what is going on here? How do I get the docs to build properly?

Bit of a guess, but what happens if you do

```@autodocs
Modules = [Crossterm, Crossterm.CursorStyle, Crossterm.ClearType]
```

?

Weirdly I'm not able to reproduce this locally:

image

Explicitly specifying it solves the problem.

https://github.com/kdheepak/Crossterm.jl/actions/runs/8431301904/job/23088490229

I'm happy to close this issue but I'm still not sure why this happens? Does Documenter not handle recursive modules?

Does Documenter not handle recursive modules

It does not. I think this was a design decision

Weirdly I'm not able to reproduce this locally:

Your're just running doctests. That doesn't try to build the whole manual, and therefore doesn't check for missing docstrings etc.

I think this was a design decision

It seems like a good default though, because you can always add submodules by hand in Modules, but you can't remove them if they're included implicitly. But it could be nice to have some syntax here to "expand" recursively to all submodules. And we should probably also document this behavior explicitly -- I don't think we do right now.

I thought I ran the same command I was running on GitHub actions. I believe @enumx creates a Module, so it would be nice to recursively expand it.