Closed Jazzelhawk closed 8 years ago
This adds support for 5.2, so it still works exactly the same with 5.1. There is no need to install 5.1 and 5.2.
LuaDoc needs installing by the host anyway, correct? Also Lua 5.3 exists now, so, when is the 'compatibility' issue going to end. In reality, very few people need to use the documentation generation. Usually only forks etc, and in such instances an environment will be setup to run the code. Therefore, as long as one works it should be fine.
Also, the LuaDoc Github actually states that LDoc is the new replacement as LuaDoc is obsolete. This was 6 months ago.
Similarly, LuaRocks has a stable 5.1 archive/package for most distributions etc. And is easy to come across. As the 5.2 -> 5.3 switch is so recent, stable 5.2 versions don't exist at the moment. Thus this requires the user to configure luarocks manually in order to install lua 5.2 version of LuaDoc.
Okay well if you'd like you can close this PR and just I'll just cherry pick this commit whenever I need to generate docs.
I found the luarocks5.2 package. Also it should be pretty easy to point LuaRocks to an alternative configuration, you just need to specify Lua binary paths etc. Works exactly like 5.1. I have to say, I'm liking the _ENV stuff in 5.2, the justification for it is rather nice - Based on the assumption that a functions environment is immutable outside of debug trickery. setenv allowed this, but was commonly removed because of this ( WE DO THIS IN STARFALL! ), so it made it so sandboxes couldn't themselves implement a sandbox. _ENV would be a damn nice thing to have in Starfall if only Garry's Mod ran actual 5.2 and not some 5.1.5 hybrid mixup stuff.
Is this a conversion to 5.2? Or additional functionality for 5.2? As we use base 5.1 w/ Garry Tweaks. It makes more sense to leave Starfall as a '5.1' Lua project. Having to install both Lua 5.2 and Lua 5.1 to work on Starfall seems like the wrong way to approach it. I understand that 5.1 is now outdated, but as long as GarrysMod is base 5.1, we should be consistent with the project as documentation is a supporting material for the primary codebase.