Git Product home page Git Product logo

Comments (13)

ewestbrook avatar ewestbrook commented on June 9, 2024

Occurring here as well, exactly as above, with HEAD at f583bd6. Please let me know if more info would be helpful.

from luaposix.

ewestbrook avatar ewestbrook commented on June 9, 2024

Doing this allowed the build to finish for me: ewestbrook@e3a9a4d

from luaposix.

avnik avatar avnik commented on June 9, 2024

docs/index.html should be generated by ldoc, but ldoc not yet integrated into build process.

from luaposix.

gvvaughan avatar gvvaughan commented on June 9, 2024

Sounds like a simple shell function addition to bootstrap.conf, and EXTRA_DIST += docs/index.html docs/style.css in Makefile.am.

If you tell me the ldocs command line that needs to be executed, I'll make a pull request to fix up the build system.

from luaposix.

gvvaughan avatar gvvaughan commented on June 9, 2024

ping?

from luaposix.

avnik avatar avnik commented on June 9, 2024

ldoc . should be enought.
I try to find some time and fix build on this weekend

from luaposix.

gvvaughan avatar gvvaughan commented on June 9, 2024

Okay, thanks. ldoc from luarocks doesn't install properly -- I don't get an ldoc binary, only ldoc.lua, and when I try to run it, it chokes on the config.ld in the luaposix root directory -- otherwise I'd have sent you a patch, sorry. Does it require lua-5.1?

In any case, I'd recommend ensuring that ldoc.css and index.html are added to EXTRA_DIST so that users can build from release tarballs without needing to install a working ldoc (especially as ldoc in luarocks appears to be broken). I think it might also be prudent to add Makefile rules to fallback to creating empty files, along with a warning, when ldoc is missing or broken so that the build from a fresh git checkout doesn't require figuring out how to install and fix ldoc before installing luaposix.

I'm not sure that bootstrap.conf is the right place for ldoc any longer though, I think it better to write a configure test to check whether there is a working ldoc on $PATH, and then make will be able to use the build-aux/missing script to create empty index.html and ldocs.css when ldocs is missing or broken on the build host.

from luaposix.

ewestbrook avatar ewestbrook commented on June 9, 2024

Just a data point in case it's helpful. I don't use (nor favor) luarocks anyway, so I installed LDoc and dependencies manually, after which I was able to "make doc" without problem.

from luaposix.

gvvaughan avatar gvvaughan commented on June 9, 2024

I found Steve Donovan's ldoc repo on github, and followed the instructions in the readme.md (make a script that runs lua /path/to/ldoc.lua "$@"). That done, running ldoc . in the root of the luaposix tree, with ldoc checked out at HEAD of master fails with:

reading configuration from /Volumes/Home/Devo/luaposix--gvvaughan--0/config.ld
/Volumes/Home/Devo/luaposix--gvvaughan--0/curses.lua:warning: /Volumes/Home/Devo/luaposix--gvvaughan--0/curses.lua
/Volumes/Home/Devo/luaposix--gvvaughan--0/examples/dir.lua:11: no module() call found; no initial doc comment
/Volumes/Home/Devo/luaposix--gvvaughan--0/examples/fork2.lua:21: no module() call found; no initial doc comment
/Volumes/Home/Devo/luaposix--gvvaughan--0/examples/getopt.lua:31: no module() call found; no initial doc comment
/Volumes/Home/Devo/luaposix--gvvaughan--0/examples/glob.lua:9: no module() call found; no initial doc comment
/Volumes/Home/Devo/luaposix--gvvaughan--0/examples/poll.lua:25: no module() call found; no initial doc comment
/Volumes/Home/Devo/luaposix--gvvaughan--0/examples/signal.lua:60: no module() call found; no initial doc comment
/Volumes/Home/Devo/luaposix--gvvaughan--0/luarocks-config.lua:4: no module() call found; no initial doc comment
lua: /Volumes/Home/Devo/ldoc--github--0/ldoc/parse.lua:177: attempt to call method 'add' (a nil value)
stack traceback:
        /Volumes/Home/Devo/ldoc--github--0/ldoc/parse.lua:177: in function 'add_module'
        /Volumes/Home/Devo/ldoc--github--0/ldoc/parse.lua:205: in function 'parse_file'
        /Volumes/Home/Devo/ldoc--github--0/ldoc/parse.lua:333: in function 'file'
        /Volumes/Home/Devo/ldoc--github--0/ldoc.lua:332: in function 'process_file'
        /Volumes/Home/Devo/ldoc--github--0/ldoc.lua:367: in main chunk
        [C]: in ?

With variations in line numbers, git tags 1.3.2 1.3.1 and 1.3.0 die in the same way.

Git tag 1.2.0 dies with the same error message as my luarocks installation of ldoc:

reading configuration from /Volumes/Home/Devo/luaposix--gvvaughan--0/config.ld
error loading config file /Volumes/Home/Devo/luaposix--gvvaughan--0/config.ld: [string "-- -*- lua -*-..."]:10: attempt to call global 'custom_see_handler' (a nil value)

Maybe ldoc requires lua 5.1? But I'm not willing to uninstall my whole lua 5.2 stack, or figure out how to side-load a separate parallel 5.1 stack just to run ldoc, especially as luaposix itself is being built and used with 5.2 on all my projects.

I now recommend checking in all the ldoc generated files so that luaposix users who have moved forward to lua 5.2 don't trip over this problem. Or fork and fix ldoc to work with lua 5.2. Or find an alternative documentation format that works with 5.2 and 5.1.

from luaposix.

agladysh avatar agladysh commented on June 9, 2024

Casting @stevedonovan to the thread :-) Steve, any hints?

from luaposix.

stevedonovan avatar stevedonovan commented on June 9, 2024

The LDoc in luarocks is too old; I'll do something about that this week. We are trying to keep it Lua 5.1/5.2 compatible so if it does break with 5.2 I would consider that a bug to be fixed ASAP. Meanwhile I'll try it out on luaposix sources here and see if I get some hints.

from luaposix.

stevedonovan avatar stevedonovan commented on June 9, 2024

OK, with latest 1.3.3 LDoc and Lua 5.2, everything works fine. There is a warning about not finding module 'options' for getopt_long, but the docs look ok otherwise, including the examples. The errors about no module() found should not occur, since these are examples after all!

from luaposix.

gvvaughan avatar gvvaughan commented on June 9, 2024

Thanks @stevedonovan, I can now build luaposix with LDoc 1.3.3 and Lua 5.2 on my Mac.

I have no idea what the getopt_long warning is about... but that's a different issue, so I'm closing this issue now that it is resolved.

from luaposix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.