Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
JumBê
@JumBe08
Should I? I dont even know what im really doing most of the time
welp, but some things i surely could
i noteiced, for example, that the docs for luarocks-admin add still document an --index flag
but that isnt at the respective terminal command help
daurnimator
@daurnimator
JumBe08: if you're not sure about something, just ask here and I or hisham can probably clarify. But otherwise please do update the wiki!
JumBê
@JumBe08
@daurnimator oki, thanks O.o
_kacper
@dracconi
hi, i have this problem when i execute luarocks i get Access is denied. and that it cant find 5.1 interpreter :/. i have compiled lua 5.1.5 with mingw i believe and i have it under d:\lua\5.1, luarocks lives in a neighboring directory. it doesnt show this error while i am in elevated prompt, so i suppose this is some kind of permissions issue?
_kacper
@dracconi
also, i am on windows 10 64bit
luarocks 3.1.3-win32
_kacper
@dracconi
ok so when im in C: it shows warning and access denied but in D: it works and in C: i installed a rock so welp
Hisham Muhammad
@hishamhm
@dracconi running with --verbose might help us figure out what's going on wrong. There might be a bug with dealing with different drive letters, since LuaRocks is mostly tested on Unix (where there are no drive letters) and the Windows CI runs on Appveyor where everything runs off a single drive
@dracconi please run the failing command with --verbose and paste the full output into gist.github.com then send us a link
the full output of running luarocks config may also help
(actually, you may want to open an issue for that in github.com/luarocks/luarocks/issues and just paste there! )
Patrick Carey
@paddycarey
Is there a way to create a .src.rock file without reaching out to the internet for sources? I have a rockspec and the sources available locally and just want to create a rock without first having to push to git.
I know I can luarocks make to create a binary rock locally, but I'm curious about the same for source rocks
Hisham Muhammad
@hishamhm
@paddycarey unfortunately not , currently. I'm sure it's doable, but it's slightly tricky to implement as a general feature: how to ensure you're packing just the right stuff and not your entire current working directory -- object and temp files and all -- and do it in a way that is build-type agnostic (i.e. can't assume builtin and get the list of files from build.modules) and SCM-agnostic (can't assume git and use it to get the list of files).
I wouldn't mind accepting a patch for that feature which assumes builtin and/or git and fails gracefully with a nice error message it case it isn't using one of them.
Patrick Carey
@paddycarey
Sorry I missed this response, thanks for the reply @hishamhm , I'll definitely consider submitting a patch as it'll be useful for our (my employer's) users I think
wmoors
@wmoors
Hey all... I'm having problems trying to manage different lua versions on my system. I used luaver to switch until now, but I started to use network namespaces now for testing purposes (ip netns NS_X exec lua -lluarocks.loader ...) but this fails as the luaver script is only available in my user shell and not as the root user.
So I was wondering how this typically done.
I tried to check the wiki, but their is little to no documentation on how to work with luarocks with different lua versions.
Hisham Muhammad
@hishamhm
Hi @wmoors, there are many ways that people go about this and indeed it can get pretty confusing! the luarocks tool has gotten better at maintaining multiple lua versions at the same time recently, but when launching lua to run it, everything always boils down to your environment variables
the variables that matter are LUA_PATH_5_3 and LUA_CPATH_5_3 for Lua 5.3 (with unversioned variants LUA_PATH and LUA_CPATH as fallbacks), same thing for Lua 5.2, and only the unversioned ones for Lua 5.1
the command luarocks path --lua-version=5.x outputs the correct values for the Lua version 5.x you want to use
I don't know about the specifics of your setup to say what the values of these environment variables should be, but comparing their current values with the output of luarocks path should lead you in the right direction!
Milind Gupta
@aryajur
I have been doing multiple Lua versions by using self contained LuaRocks versions. I documented it here (for windows): https://milindsweb.amved.com/LuaRocks_.html#L5 . I just need to open a command line terminal and run the batch file to initilize the environment variables. I also have a video for it: https://www.youtube.com/watch?v=403rjwb8gfc
A question I had for external dependencies packages and libraries in LuaRocks. Is there a way that we can specify compilation of an external package? Another thing is if we don't want to go the compile route can we specify the library files directly that should be downloaded for the platform? I am thinking about say LuaCURL which needs the curl library which may be compiled and also for IUP which has all the binaries of the libraries we can just download them as part of rock installation.
Hisham Muhammad
@hishamhm
@aryajur you can't specifiy which files to be compiled or installed externally (because the procedures for installation vary from OS to OS and from distro to distro), but you can specify which libraries can be checked using the external_dependencies table
Milind Gupta
@aryajur
@hishamhm it would be nice if there is a way to run scripts or download external dependencies and specify them in the rockspec. Even though it depends from OS to OS have a method to write it in rockspec and just give some API to figure out the OS etc can open doors for developers to take care of platform dependence and make installation of complex modules more painless. LuaRocks can just enable just some mechanisms that can guve the choice to package managers to tackle this problem.
Hisham Muhammad
@hishamhm
@aryajur I was thinking that a minimal first step would be to add an error_message field for external_dependencies entries, where the rockspec author could give customized instructions. A slight complicator of putting something like a script field there would be the fact that system package managers usually need root privileges, while rocks can be installed locally.
Milind Gupta
@aryajur
@hishamhm I would still think that having the script option would be very useful since it allows the package creator to create and add the script. Even if the installer does not have root privilege existence of a premade script greatly simplifies installation because that script can then be passed to the system administrator who can use it and save time. Although lot of users may already have root privileges. The users I have talked to always state as this being the major hurdle for usage and getting the right packages. If the mechanism is started the problem can then slowly resolve over time for popular packages.
Caleb Maclennan
@alerque
Has anybody successfully setup Github's new Actions CI to test a Lua Rocks repository? I have one I'd like to run Busted on... If not that any good examples of any CI (Travis, Circle, Gitlab, etc.) being run on a Rock (including against a couple Lua versions) would be nice.
daurnimator
@daurnimator
alerque: see a few of my repositories
alerque: you want a pure-lua library? or C library?
Caleb Maclennan
@alerque
Pure Lua.
@daurnimator It looks like you're using Travis. Thanks for the example.
If anybody has Lua working Github Actions CI I'm still all ears. I seem to have container with Lua/Luarocks running but actually getting it to do anything is another story.
Caleb Maclennan
@alerque
Interesting use of hererocks by the way, I've never seen that. It looks cleaner than the Lua rigging we have for sile.
daurnimator
@daurnimator
alerque: I think my usage of hererocks was straight out of the hererocks readme....
leaf
@leafo
I just setup github actions for lua/luajit + luarocks tonight for one of my repos, works great
I'm going to make a reusable action for it
Caleb Maclennan
@alerque
Thanks for pointing that out @leafo. That's quite a bit of tooling though! I'm hoping some of that gets extracted to a reusable action that can live outside of my repository ;-) I have a working Travis setup now. I think I'm going to wait on implementing Actions until there is something with a little less plumbing to debug and maintain.
leaf
@leafo
I'm working on reusable thing as we speak
for travis I've always used this: https://github.com/moteus/lua-travis-example
Caleb Maclennan
@alerque
I'm familiar with that setup and use it too but again it's a lot of tooling to include in the parent repository and changing any part of it involves a lot of round trip trial-and-error with Travis.
Matthieu Coudron
@teto
is there a changelog for the new release ? couldn't find any specific in changelog.md. Also it doesn't appear in https://luarocks.github.io/luarocks/releases/
Caleb Maclennan
@alerque
Thanks @leafo! I set those actions up on simoncozens/cassowary.lua#7 and it appears to work great (At least in my fork, I guess PR's don't work in Actions until it's been started on master?).
Thijs Schreijer
@Tieske
@leafo the install-lua one is giving me a 404 ?