awesomeWM / awesome

awesome window manager
https://awesomewm.org/
GNU General Public License v2.0
6.39k stars 597 forks source link

Generate apidoc doesn't use the discount markdown formatter #3500

Open Aire-One opened 3 years ago

Aire-One commented 3 years ago

This is something I think I have seen (mentioned?) before when we started our migration to GitHub Actions.

In our ldoc config, we explicitly ask to use the discount formatter to build the doc :

https://github.com/awesomeWM/awesome/blob/bf74f249d4d82e553174ebcf6f89f8b1553a9be5/docs/config.ld#L11

And in the workflow, we install the corresponding package :

https://github.com/awesomeWM/awesome/blob/bf74f249d4d82e553174ebcf6f89f8b1553a9be5/.github/workflows/apidoc.yml#L77

However, looking at the build logs (let's take the last merged PR for this example), we have the following output :

(https://github.com/awesomeWM/awesome/runs/4149453262?check_suite_focus=true#step:14:501)

found master module /home/runner/work/awesome/awesome/build/lib/naughty/core.lua
format: using built-in markdown
/home/runner/work/awesome/awesome/build/lib/wibox/widget/progressbar.lua:620: margins: function not found: padding in this module
output written to /home/runner/work/awesome/awesome/build/doc

The important part is the format: using built-in markdown line. It appears because ldoc can't resolve the format="discount" setting and fallback to the default built-in formatter.

The lua-discount formatter is faster than the built-in markdown formatter, so we would have benefices for the CI runtime if we can resolve this dependency issue.

However, I have it working on my machine, and it seems it doesn't interpret all makdown the way it should. As an example, here is a screenshot of a "bug" from the generated pages with this formatter :

2021-11-12-142421_438x135_scrot

So, I guess another possible fix would be to remove this formatter setting.

Aire-One commented 2 years ago

Reopening this issue since we need to revert 8d5c74f.

I'll come back to this later with a fresh head...