-
Notifications
You must be signed in to change notification settings - Fork 3
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
[Lua] Windows install instructions for Lua / Busted for this track do not work #80
Comments
@exercism/lua |
Thanks @NobbZ for the heads up. @Mythricia sorry for the mess! Those instructions were written by a former maintainer and I don't have a Windows machine available to me. Would you mind submitting a PR with step-by-step instructions for implementing your workarounds? |
@ryanplusplus I could, however, I'm not sure the workarounds are really suitable, as they could be system dependent and the Lua install requires manually editing the system path variables which, if done incorrectly, can easily really mess up a users system, on top of downloading files from a source that may change in the future. Installing Ubuntu WSL also requires making changes to the Windows installed features, and it seems a bit outside the scope of the Exercism experience. As far as I know, it's also strictly only possible on Windows 10 and is version dependent even then. I'll write up some steps if you think it's a good idea, but it is a pretty significant change to the user's system. Some additional thoughts: LuaRocks is unfortunately notoriously difficult to get working on a Windows system (the install instructions for LuaRocks on Windows are, also, broken), and due to the fact so many Lua libraries and addons (like Busted) rely solely on LuaRocks for distribution and compilation, that makes getting them on Windows more or less impossible for mere mortals. There are no compilers of any kind on a default Windows system, and there are about one million slightly different and mostly incompatible options to choose from if you want to get one that works with LuaRocks, that are all impossibly difficult to configure correctly. Maybe a better solution is to put together a small package that includes a Lua executable (which is tiny) and a simple raw Lua testing library instead of a fully-fledged unit test library like Busted, which requires C libraries to be compiled? All it's really doing is making simple comparisons, it seems like an unnecessarily complicated choice to use Busted to run the very basic tests needed for Exercism. Just my 2¢ anyway. |
The reality is that Maybe we should just recommend WSL for users that can, and if their Windows installation is not a suitable environment for Lua, we could recommend a VM or a tool like Cloud9. |
Ah, I didn't mean Busted etc are exotic tools but I just meant it feels largely overkill for the exercism exercises. Since the user doesn't really write the tests themselves I doubt they will see it as much more than a command they need to type with no care for what it actually does behind the scenes. Either way, I've never successfully gotten LuaRocks to work on Windows, even when the C compilers are in place, many Rocks are simply not Windows compatible. So they still fail to build, or run. I think the easiest solution is WSL, since it's not a VM, doesn't take much space, and works well straight from the native command line. The only caveat being it's Windows 10 exclusive. I can write up the steps to get a basic setup with Ubuntu WSL w/ Lua and Busted set up. Which Lua version are we targeting? |
That would be great!
Anything 5.1-5.3 should be manageable, but all of the sample solutions are 5.3 so I'd target that. |
Do you mind if I post it here or should I PR against the Lua install documentation repo or somewhere else? |
This is where the actual source documentation lives: You can paste your writeup here, but doing a PR against exercism/lua would be best. |
Previous instructions no longer work for a multitude of reasons outlined in exercism/support#80 LuaRocks is notoriously difficult to set up on Windows, and many Rocks are not compatible regardless. Chocolatey as used in previous instructions only installed LuaRocks, but no C compiler, and doesn't know how to configure such a compiler to work with LuaRocks even if it did install one, et cetera. These new instructions unfortunately *require* Windows 10, since they rely on Windows Subsystem for Linux, but I believe it's by far the easiest way to get Busted running on a Windows 10 machine. I don't have any good answers for what to do tell Windows 7 users.
Previous instructions no longer work for a multitude of reasons outlined in exercism/support#80 LuaRocks is notoriously difficult to set up on Windows, and many Rocks are not compatible regardless. Chocolatey as used in previous instructions only installed LuaRocks, but no C compiler, and doesn't know how to configure such a compiler to work with LuaRocks even if it did install one, et cetera. These new instructions unfortunately *require* Windows 10, since they rely on Windows Subsystem for Linux, but I believe it's by far the easiest way to get Busted running on a Windows 10 machine. I don't have any good answers for what to do tell Windows 7 users.
https://exercism.io/tracks/lua/installation
This does not work on a fresh Windows 10 system, and although I went through a lot of attempts at workarounds I eventually had to give up on getting Lua, LuaRocks, or Busted working natively. But along the way I discovered a whole cascade of issues:
choco install lua
installs a version of LuaRocks that is incapable of completing the next step, throws error:Error: Parse error processing dependency 'lua_cliargs = 3.0
luarocks install busted
fails, because the wrong LuaRocks version is incapable of processing the dependecies for Busted.choco install luarocks
,luarocks install busted
still fails for not one, but two reasons:choco install lua
installation, and overrides the newer LuaRocks install from workingchoco install lua
installation in favor of the LuaRocks one, Lua is no longer on the path either...My workarounds were:
wsl busted
, but it's still a massive hack.The text was updated successfully, but these errors were encountered: