Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 25 21:01
    hishamhm commented #1390
  • Jan 25 21:01

    hishamhm on master

    fix `--pin` option so it appear… (compare)

  • Jan 25 21:01
    hishamhm closed #1390
  • Jan 25 21:01
    hishamhm closed #1389
  • Jan 25 20:58
    hishamhm closed #1391
  • Jan 25 20:58
    hishamhm commented #1391
  • Jan 23 01:22
    nfearnley edited #1391
  • Jan 23 01:22
    nfearnley labeled #1391
  • Jan 23 01:22
    nfearnley opened #1391
  • Jan 20 18:05
    codecov-commenter commented #1390
  • Jan 20 18:02
    codecov-commenter commented #1390
  • Jan 20 17:59
    codecov-commenter commented #1390
  • Jan 20 17:50
    codecov-commenter commented #1390
  • Jan 20 17:29
    Aire-One opened #1390
  • Jan 20 17:09
    Aire-One commented #1389
  • Jan 20 04:04
    daurnimator commented #1389
  • Jan 19 20:07
    Aire-One labeled #1389
  • Jan 19 20:07
    Aire-One opened #1389
  • Jan 11 21:02
    hishamhm closed #1388
  • Jan 11 21:01
    hishamhm commented #1388
Hisham Muhammad
@hishamhm
@teto this sounds like a bug! could you file an issue? thank you!
william behrens
@WilliamBehrens_gitlab
Is there an enviroment variable I can change so that luarocks install installs modules in a different directory
like how gem has GEM_HOME
Pierre Chapuis
@catwell
@WilliamBehrens_gitlab An env var I don't think so, but you can pass the flags --lua-dir and --tree (or at build time --with-lua to configure).
Thore Strassburg
@weilbith
Hey :wave:
I just started to setup my first project using Luarocks (v3.7.0). I set the rockspec_format to version 3.0 (though this should not matter, as this appears to be the same since 1.0). My problem is now that I'm not able to set version to a version that uses the semantic version scheme. According to the sources of Luarock, a version scheme matching [%w.]+-[%d]+ is expected. I don't know the naming of this version scheme and I fail to find it so I could read up how this scheme works. So I started to browse the registry at luarocks.org to see how version strings look in practice. But I only see semantic versioning everywhere. Also if I check the rocks their sources rockspec, they just have plain semantic version strings. I thought they might just ignore the errors of luarocks lint <rockspec_file>. But also if I run other commands like luarocks test I get always this error that my version is not correctly formatted.
It seems like all theses projects have in common that they don't specify rockspec_format. But then the default is 1.0 and it doesn't change anything. So is it about the the luarock version itself and this was a breaking change in a more recent version?
hisham_hm
@hisham_hm:matrix.org
[m]
Hi! The version key really means your project's version, dash, your rockspec's revision. So if you're using SemVer and your project is version 2.5.1, use version = "2.5.1-1". The revision suffix is for when you need to make changes to the rockspec itself but not to your project.
The rockspec_format entry is at "3.0" because there were additions to the format in LuaRocks version 3; for example test_dependencies. So, if you write a rockspec without a rockspec_format key you can't use some newer features, but your rockspec will work on older LuaRocks installations.
Thore Strassburg
@weilbith
Nice. Thank you very much for the help! It works now. :pray:
Thore Strassburg
@weilbith
Stupid question, but am I supposed too add dependencies by hand in the rockspec file or is there a command similar to cargo add or yarn add. Just that I don't start do stupid things... :laughing:
hisham_hm
@hisham_hm:matrix.org
[m]
yes, you can write them directly in the file
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