Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 20 21:17
    sewbacca commented #924
  • May 18 04:17
    codecov-commenter commented #1419
  • May 18 03:26
    hishamhm opened #1419
  • May 18 03:26

    hishamhm on fix-1418

    avoid crash if variables.LUA* a… (compare)

  • May 18 03:25

    hishamhm on master

    fix error message when Lua libr… binary build: help autodetectio… (compare)

  • May 18 03:24
    hishamhm commented #1418
  • May 18 01:54
    echiesse commented #1418
  • May 18 00:42
    hishamhm commented #1418
  • May 18 00:10
    echiesse opened #1418
  • May 18 00:10
    echiesse labeled #1418
  • May 14 00:16
    actually-reb commented #1001
  • May 13 06:54
    kevinhwang91 labeled #1417
  • May 13 06:54
    kevinhwang91 opened #1417
  • May 09 18:06
    hishamhm deleted #1416
  • May 09 17:46
    BloBroPro opened #1416
  • May 06 14:06
    aashimgarg closed #1137
  • May 03 23:13
    hishamhm commented #1001
  • May 03 21:16
    badrazizi commented #1001
  • May 03 19:42
    hishamhm commented #1412
  • May 03 19:41
    hishamhm closed #1412
Thore Strassburg
@weilbith
Sorry to continue asking question so fast here. But is there any tooling to execute binaries of installed rocks depending on your evironment? Means if the rock is installed in your local project, it uses the binary from ./lua_modules/bin/<binary>, else it checks the user its module tree etc. Like for example npm exec. I'm trying to figure out how to tell my IDE which busted executable to use to run my tests. I would like to avoid custom functionality around it to check if this path exist or this or this, if luarocks knows all the trees and their order.
Thanks for helping me out so quick!
ben.txt
@bentxt
Hi, also sorry for asking questions without much introduction. But as I wanted to create an issue on github.com/luarocks there is a reference to this gitter chat, so I want to give it a shot. I want to install UTF-8 with luarocks this way luarocks install --check-lua-versions lua-utf8. The installation fails due to a missing lua5.4 installation: "Error: No results matching query were found for Lua 5.4.”. But the thing is: I have Lua5.4 installed. lua -v Lua 5.4.3 Copyright (C) 1994-2021 Lua.org, PUC-Rio
Thijs Schreijer
@Tieske
my guess would be that the utf8 rockspec doesn't list 5.4 as a compatible version
ben.txt
@bentxt
thanks for the suggestion, I think the problem was actually simpler, I just wrote the rock name wrongfully as ‘lua-utf8’ instead of the correct name ‘luautf8'
Wangmd1994
@Wangmd1994
IMG_0017(20211101-134455).PNG
the alpine output Illegal instruction when run ./luarocks init
hisham_hm
@hisham_hm:matrix.org
[m]
@weilbith There is a luarocks path command which outputs the environment variables needed to set the path, but no direct equivalent to npm exec
Wangmd1994, according to the screenshot you're building luarocks from sources, so that's pure Lua code. this means that the illegal instruction is coming not from luarocks but from something it is calling, such as the lua interpreter or some other command. You probably have an incompatible binary in your PATH.
Wangmd1994
@Wangmd1994
Yes,My lua interpreter is LuaJit,contains Lua.h。This was downloaded automatically by building Neovim,if I have an incompatible binary in my PATH,Do I need to download Lua?if Idownload lua,an error occured with the missing header file。
Mengyao Bie
@DrAugus
image.png
I can't install busted
Anyone want to see what's going on here?
image.png
Pierre Chapuis
@catwell
@DrAugus Most likely the luarocks you are calling is not the one you are showing here but an older version installed on your machine. Try where luarocks.
Mengyao Bie
@DrAugus
oh no
image.png
Pierre Chapuis
@catwell

Hmm I don't know Windows well enough to help but I'm sure it's something like this because the LuaRocks you are running is version 2.0.2 as you can see...

You should probably check on your PATH or something. Sorry I can't help more with Windows :(

diVineProportion
@diVineProportion

@DrAugus where is a CMD command which has no alias in POWERSHELL

for powershell, use Get-Command, so Get-Command luarocks or (Get-Command luarocks).Path

or just open a cmd.exe instance. alternatively, type cmd inside powershell and hit enter. then you can use where

RoyvanEmpel
@RoyvanEmpel_gitlab

Hello!
I'm trying to install luasql-mysql but I am running into a problem.

Currently I have MariaDB installed wich I need for work so I can't change to normal MYSQL, on the github / google I did find some people that got luasql working with MariaDB but nowhere I found how they got it working.

I have luarocks 2.4.2 installed on Ubuntu 20.04 LTS and while running the command sudo luarocks install luasql-mysql I am getting the result:
Installing https://luarocks.org/luasql-mysql-2.6.0-1.rockspec

Error: Could not find header file for MYSQL
No file mysql.h in /usr/local/include
No file mysql.h in /usr/include
You may have to install MYSQL in your system and/or pass MYSQL_DIR or MYSQL_INCDIR to the luarocks command.
Example: luarocks install luasql-mysql MYSQL_DIR=/usr/local

Hopefully it's an easy fix since I have been trying to get lua working with MariaDB for a few hours now.

Mengyao Bie
@DrAugus
@diVineProportion thanks
image.png
Erutuon
@Erutuon
@RoyvanEmpel_gitlab I ran into a similar problem while installing LuaCURL; LuaRocks couldn't find curl.h in a subdirectory under /usr/include. I'm running Ubuntu and I think I ultimately did dpkg -L libcurl-whatever to show the location of curl.h, and then ran sudo luarocks install LuaCURL CURL_DIR=directory-of-curl.h-here. So it might be as simple as looking for mysql.h in the file list for the MariaDB package or searching in /usr , and putting in MYSQL_DIR=whatever after the LuaRocks command. Possibly, judging from the Ubuntu package, sudo luarocks install luasql-mysql MYSQL_DIR=/usr/include/mariadb.
namba
@namba:matrix.org
[m]
Heyho, I got a luarock set up that uses a Makefile as its build type. Is there a way to determine with which lua version I should compile the module? Currently I have essentially hardcoded lua5.3 through pkg-config but the whole thing is also fine to run under 5.4, I just don't know how to make that distinction. The current state can be found here: https://github.com/Nooo37/wau
namba
@namba:matrix.org
[m]
Well nevermind, I'm pivoting to use lua-cffi (https://github.com/q66/cffi-lua/) for binding instead of doing it in C directly. As a sideeffect packaging it on luarocks becomes more easy too
wauterboi
@wauterboi
hello all - how does one specify luajit as a dependency for a luarock?
hisham_hm
@hisham_hm:matrix.org
[m]
@wauterboi: you can use rockspec_format = "3.0" and then add "luajit" to the dependencies array
Greg Leonard
@greg-el
Hey, I'm not quite sure if this question is appropriate for this chat, it's more of a luarocks account problem than dev. Essentially, this project (github) has been sitting for a little while now, and we've just started working on it again, but the luarocks username/email has been lost to time. I'm just wondering if there is any way of us recovering the account/transferring ownership of the package if we make a new account? Thanks :)
hisham_hm
@hisham_hm:matrix.org
[m]
@greg-el yes, you've come to the right place! I can transfer the entry to the current project maintainers. Please let me know to which luarocks.org account the project should be transferred to
The GitHub project you linked marked it as deprecated. Is there an active fork?
ideally it would be best to get a request for transfer from the original authors
you can email me at hisham@luarocks.org with the info
Greg Leonard
@greg-el
Dropped you an email, thanks!
wauterboi
@wauterboi
For some reason whenever I require a .so file installed via Luarocks, I get weird errors:
LuaJIT 2.1.0-beta3 -- Copyright (C) 2005-2022 Mike Pall. https://luajit.org/
JIT: ON SSE3 SSE4.1 BMI2 fold cse dce fwd dse narrow loop abc sink fuse
> local lpeg = require "lpeg"
error loading module 'lpeg' from file '/home/theis/.luarocks/lib/lua/5.1/lpeg.so':
    /home/theis/.luarocks/lib/lua/5.1/lpeg.so:1: unexpected symbol near 'char(127)'
stack traceback:
    [C]: at 0x7f6b291c8bf0
    [C]: in function 'require'
    stdin:1: in main chunk
    [C]: at 0x55ab11f68d40
Doesn't matter if I switch to 5.1
wauterboi
@wauterboi
as it turns out I'm an idiot and severely screwed up my paths so that package.path contained paths to C libs
Matthieu Coudron
@teto
was debugging some lua issue when I stumbled upon luarocks/luarocks#1161 (had completely forgotten). It seems to be triggered only when running tests, for luv or for libmpack for instance.
Matthieu Coudron
@teto
doesnt seem like the wiki is open to editing, https://github.com/luarocks/luarocks/wiki/luarocks misses an entry for the "test" command
Matthieu Coudron
@teto
notably I was looking for docs to define tests in the rockspec. I found my answers first in the code and then looking at luarocks-dev-1.rockspec but would be nice to have it in the doc as well (or I missed it)
Hisham Muhammad
@hishamhm
@teto I added a bit of docs for luarocks test there, thanks for the heads up!
Caleb Maclennan
@alerque
@hishamhm I'm hoping I've just borked something on my system (probable related to luasocket pre-release testing) and not anything more serious, but I'm a little stumped why LuaRocks just quit being useful:
$ luarocks install --local LuaSocket 3.0.0 --check-lua-versions
Warning: Failed searching manifest: Failed downloading https://luarocks.org/manifest-5.4 - HTTP/1.1 404 Not Found
luasocket not found for Lua 5.4.
Checking if available for other Lua versions...
Checking for Lua 5.1...
Checking for Lua 5.2...
Checking for Lua 5.3...

Error: No results matching query were found for Lua 5.4.
luasocket is not available for any Lua versions.
I can download the manifest manually in a browser, but LuaRocks can't seem to fetch it (this is with the older luasocket release per Arch‌ Linux system packages installed, not with the shinny new release yet).
Matthieu Coudron
@teto
@hishamhm thanks <3 Would be cool to have test_dependencies and test added to https://github.com/luarocks/luarocks/wiki/Rockspec-format . I would like more packages to use that since it helps me packaging them on the nixos side but it's hard to ask people to do it without the doc. I've tried with luv https://github.com/luarocks/luarocks/wiki/Rockspec-format luvit/luv#592 and it looks successful so far
Caleb Maclennan
@alerque
Yes, test_dependencies lists and a way to run whatever test function is used programmatically would be great for Arch Linux packaging too.
Hisham Muhammad
@hishamhm
@teto Updated! https://github.com/luarocks/luarocks/wiki/Rockspec-format — added a section on the test table there (and converted the page from MediaWiki to Markdown...)
IIRC we had to block the wiki from general editing due to spam... I wonder if there's a way to accept PRs for wiki pages?? it is a git repo as well, after all
Hisham Muhammad
@hishamhm
@alerque no idea what's the issue there. LuaSocket 3.0.0 just installed fine here! And major kudos for the release milestone!
Caleb Maclennan
@alerque
You might reserve the kudos until we're sure it didn't just blow up, especially on the completely untested Windows side of things! I didn't do the hard work writing the library anyway, most of that work was done years ago by others. I just slapped a tag on it (and a little bit of release machinery). That being said so far we only have one new bug report and that is from openresty and not clearly related to the release, so I'm still crossing my fingers...
Caleb Maclennan
@alerque
On another note, I'm actually kind of surprised a few thousand people have downloaded Luacheck v0.26.0 and not a single one of them has come around to complain about the new lint warnings.