Open Tieske opened 3 years ago
@hishamhm any ideas on that last part? why it doesn't find the .all.rock
?
what's the difference between the two formats? I managed to upload a .all.rock using curl, but then a luarocks install would not find it
.all.rock
is a suffix for binary rocks that have no C-library component (.so
/.dll
) to it, only .lua
modules (i.e. they are (theoretically at least) portable "binary" rocks). It's strange that luarocks install
couldn't find it.
I'll do some experiments here to figure out what's going on!
BTW, what is the file size of the .src.rock
you were trying to upload?
I hacked around it and uploaded it, zipping my own file, and then using curl to upload
current .src.rock
is 4945172 bytes
Do you mind uploading the two files you were trying to upload somewhere so I can grab them and do a test run locally? Should be an easy fix once I reproduce it
@leafo just any rock will do. It never worked for me. Only rockspec files I can upload via the site. Rocks won't work. But the LuaRocks command line allowed to work around that, so it never was a big issue.
It's just that with my current project the rock cannot be uploaded via LuaRocks cli, and hence I'm out of luck here, and came up with the hacks in my previous post.
@leafo I reproduced the issue at the site upload by attempting to upload Thijs's two files that appear here through the website.
It's just that with my current project the rock cannot be uploaded via LuaRocks cli
@Tieske I took a look at your repo — that's because the rockspec is playing a trick there with the update_api_files.sh to build the list of files, right? So technically the rockspec does not really contain the correct sequence of steps to download and install the files. One way around this would be to use type="make"
and have the Makefile produce the list of generated files and install them (see docs here). That way the rockspec itself doesn't need to list the files, and luarocks upload
would work correctly.
I'm aware I'm pulling some tricks here to not have to include the AWS repo files in this repo to keep it lean and mean. It just makes some existing issues more visible (as confirmed by @hishamhm ):
.all.rock
that was uploaded@hishamhm yes, using make also crossed my mind, but sacrifices compatibility (Windows, though not an immediate need)
wrt the rock format, while crafting my own ones I noticed that the .all.rock
and .src.rock
have completely different formats. Could that be the reason it cannot find it? I assume that after an upload the manifest/index is rebuild, so maybe that step doesn't properly pick up the .all.rock
contents?
LuaRocks not finding the .all.rock that was uploaded
The repository does have some .all.rock
files added, and it seems to work. If you do for example luarocks search cqueues-pgsql
it does list it under "Binary and pure-Lua rocks", and you can see that it gets used if you run luarocks install cqueues-pgsql --verbose
(note that luarocks make
and luarocks build
prefer source rocks, but luarocks install
prefers binary and pure-Lua rocks whenever available).
wrt the rock format, while crafting my own ones I noticed that the .all.rock and .src.rock have completely different formats.
They do, because .all.rock is a "binary rock" format, akin to a .linux-x86_64.rock format; .src.rock is a "source rock" format (containing typically a tarball or a git checkout).
I am having the same issue. From luarocks.org/upload, i can upload the rockspec, but the browser does not recognize any .src.rock file as a candidate for upload. I confirmed this using both Chrome and Safari. It is just a guess, but i suspect that the input tag's accept parameter is causing this problem:
input accept=".src.rock"
I am guessing that the browser will interpret values with a single leading dot as an filename extension, but because ".src.rock" has two dots, it is treated as a literal file name. That would explain while the accept=".rockspec" works, but ".src.rock" does not. I would try changing this to:
input accept=".rock"
or perhaps
input accept="*.src.rock"
using an explicit wildcard.
@sburke-ce are you able to upload using the luarocks upload
CLI?
@sburke-ce are you able to upload using the
luarocks upload
CLI?
Yes, @hishamhm, the luarockt upload
command works for me.
Using the GUI I can only upload a rockspec, the rock upload fails.
If I add a
rockspec
and arock
to the GUI, only therockspec
is uploaded and added. If I only add arock
I get "Errors: missing file".I tried with both
.src.rock
and.all.rock
.(what's the difference between the two formats? I managed to upload a
.all.rock
using curl, but then aluarocks install
would not find it.)