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

Plenty Duplicate docs or Missing docstrings messages after update to a new version #1139

Closed
andreasvarga opened this issue Oct 2, 2019 · 10 comments

Comments

@andreasvarga
Copy link

I updated my Julia software https://github.com/andreasvarga/MatrixEquations.jl to version V1.0 and during generation of the documention I got plenty of warning messages like the following one:

Warning: duplicate docs found for 'MatrixEquations.LapackUtil.tgsyl!' in `@docs` block in src\lapackutil.md
│ ```@docs
│ MatrixEquations.LapackUtil.tgsyl!
│ MatrixEquations.LapackUtil.lanv2
│ MatrixEquations.LapackUtil.lag2
│ MatrixEquations.LapackUtil.ladiv
│ MatrixEquations.LapackUtil.lacn2!
│ ```
@ Documenter.Expanders C:\Users\Andreas\.julia\packages\Documenter\3fOeD\src\Expanders.jl:313

In the previous version, there were no such messages and all functions have been properly documented. Now, after the update, I am not anymore able to obtain the documentation with all functions included (see snapshot below). Curriously enough, the documentation for the newly added function MatrixEquations.LapackUtil.lacn2! is included. Similarly happens in another section, where no function is included (see below). I would appreciate any hint how to try to debug this issue. Thanks in advance.

grafik

grafik

@mortenpi
Copy link
Member

mortenpi commented Oct 6, 2019

I looked through your docs and everything looks to be in order. But I am not sure it's version you were building, since when I tried to build your master branch locally, but it does not precompile (with Julia 1.2.0):

$ julia --project make.jl 
ERROR: LoadError: LoadError: syntax: local variable name "T" conflicts with a static parameter
Stacktrace:
 [1] top-level scope at /home/mortenpi/Julia/test/MatrixEquations.jl/src/sylvester.jl:564
 [2] include at ./boot.jl:328 [inlined]
 [3] include_relative(::Module, ::String) at ./loading.jl:1094
 [4] include at ./Base.jl:31 [inlined]
 [5] include(::String) at /home/mortenpi/Julia/test/MatrixEquations.jl/src/MatrixEquations.jl:1
 [6] top-level scope at /home/mortenpi/Julia/test/MatrixEquations.jl/src/MatrixEquations.jl:28
 [7] include at ./boot.jl:328 [inlined]
 [8] include_relative(::Module, ::String) at ./loading.jl:1094
 [9] include(::Module, ::String) at ./Base.jl:31
 [10] top-level scope at none:2
 [11] eval at ./boot.jl:330 [inlined]
 [12] eval(::Expr) at ./client.jl:432
 [13] top-level scope at ./none:3
in expression starting at /home/mortenpi/Julia/test/MatrixEquations.jl/src/sylvester.jl:564
in expression starting at /home/mortenpi/Julia/test/MatrixEquations.jl/src/MatrixEquations.jl:28
ERROR: LoadError: Failed to precompile MatrixEquations [99c1a7ee-ab34-5fd5-8076-27c950a045f4] to /home/mortenpi/.julia/compiled/v1.2/MatrixEquations/1uOBF.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1253
 [3] _require(::Base.PkgId) at ./loading.jl:1013
 [4] require(::Base.PkgId) at ./loading.jl:911
 [5] require(::Module, ::Symbol) at ./loading.jl:906
 [6] include at ./boot.jl:328 [inlined]
 [7] include_relative(::Module, ::String) at ./loading.jl:1094
 [8] include(::Module, ::String) at ./Base.jl:31
 [9] exec_options(::Base.JLOptions) at ./client.jl:295
 [10] _start() at ./client.jl:464
in expression starting at /home/mortenpi/Julia/test/MatrixEquations.jl/docs/make.jl:1

@andreasvarga
Copy link
Author

I thank you for your time. I am still working with Julia 1.1 which is probably more permissible. I am about to install Julia 1.2.0 and I will try to update the package to compile with this version. I hope it will work also with the documentation.

@andreasvarga
Copy link
Author

andreasvarga commented Oct 7, 2019 via email

@bliang26
Copy link

bliang26 commented Oct 8, 2019

Same problem here. It works fine on a Mac but gives a lot of "duplicate docs found" warnings on Ubuntu18.04. Both machines are running Julia v1.2.0 and Documenter v0.23.3.

@bliang26
Copy link

bliang26 commented Oct 8, 2019

Now I know what's going on. The cause is a bit funny. On my Ubuntu machine I used Jupyter Lab to edit the Markdown file (which has a nice preview feature) and it created some temp files. So when I printed normal_pages in function expand(doc::Documents.Document) in Expanders.jl, I got the following

normal_pages = [".ipynb_checkpoints/APIs-checkpoint.md", ".ipynb_checkpoints/index-checkpoint.md", "APIs.md", "index.md"]

Everything got duplicated! After removing the temp files, everything runs fine. It would be nice if Documenter could automatically filters out such hidden files.

@mortenpi
Copy link
Member

mortenpi commented Oct 8, 2019

Hmm, this is interesting. I am slightly hesitant to add this type of automagical behavior where Documenter would just ignore these files. But we could maybe print silenceable warnings.

@andreasvarga
Copy link
Author

andreasvarga commented Oct 9, 2019 via email

@fredrikekre
Copy link
Member

So this happens because you don't explicitly define what pages you want to include with the pages keyword argument then? Otherwise Documenter should not pick up those temporary files.

@bliang26
Copy link

bliang26 commented Oct 15, 2019

I did have pages=[...] in my makedocs(). But it still picked up the hidden files.

@andreasvarga
Copy link
Author

andreasvarga commented Oct 15, 2019 via email

@mortenpi mortenpi closed this as completed Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants