lua - Why have I errors when installing from Luarocks? -
i developer of small library: https://github.com/martin-damien/babel , have problem luarocks releases.
from source
when install source luarocks have no problem:
$ luarocks make --local rockspecs/babel-1.2-2.rockspec
from internet
but when deployed (using: tag master
, add new rockspec release , publish luarocks), can't install using
$ luarocks install --local babel
because encounter following error:
installing https://luarocks.org/babel-1.2-2.src.rock... using https://luarocks.org/babel-1.2-2.src.rock... switching 'build' > mode stat: malsukcesis eltrovi statinformon pri «locales/zh-hk.lua»: no such > file or directory
error: build error: failed installing locales/zh-hk.lua in /home/damien/.luarocks/lib/luarocks/rocks/babel/1.2-2/lua/locales/zh-hk.lua: locales/zh-hk.lua: no such file or directory
as can see in https://github.com/martin-damien/babel/issues/14 error occure on different files (but until now, locale files, not babel.lua
file).
i have no idea why randomly crash this, if know why or have idea come from...
thanks in advance,
damien
the location of files in build.modules
table (from the docs on rockspec format):
relative source.dir
where source.dir
is
source.dir (string) - name of directory created when source archive unpacked. can omitted if can inferred source.file field. example: "luasocket-2.0.1"
and source.file
is
source.file (string) - filename of source archive. can omitted if can inferred source.url field. example: "luasocket-2.0.1.tar.gz"
you don't specify source.dir
or source.file
in your rockspec set source.url
(because have to).
so have source.url
= https://github.com/martin-damien/babel/archive/v1.2-2.zip
(presumably) ends source.file
= v1.2-2.zip
, source.dir
= v1.2-2
zip file extracts babel-1.2
luarocks
can't find source files. (the screenshot in linked issue seems indicate luarocks
uses source.file
= v1.2.zip
, archive extracts babel-1.2
i'm not sure how that's possible.)
add dir = "babel-1.2"
rockspec's source
table expect work.
Comments
Post a Comment