Page 2 of 4

Re: [TOOL] LÖVERocks - A package manager manager

Posted: Mon Jun 08, 2015 3:39 pm
by bakpakin
Yep, I had the same experience at bartbes for installing rocks, but only for rocks that have a dependency on love. As for setting it up, loverocks worked pretty well for me.

It would also be nice to have a remove command to complement the install command, but there are other problems that need more attention right now. That said, this project is a great idea that should have been made a while ago.

Re: [TOOL] LÖVERocks - A package manager manager

Posted: Mon Jun 08, 2015 3:44 pm
by bakpakin
bartbes wrote:So I figured I'd give this a go.. it didn't work:

Code: Select all

[[email protected] async-futures]$ loverocks init
ERROR: NYI. For now, try making an empty project with `loverocks new` and moving your code into the result.

Code: Select all

[[email protected] love-misc-libs]$ loverocks new futures
Found LOVE version 0.9.2
Using template "love9"
/usr/bin/lua5.1: ...e/bartbes/.luarocks/share/lua/5.1/loverocks/util.lua:30: bad argument #1 to 'attributes' (string expected, got nil)
stack traceback:
	[C]: in function 'attributes'
	...e/bartbes/.luarocks/share/lua/5.1/loverocks/util.lua:30: in function 'slurp'
	...s/.luarocks/share/lua/5.1/loverocks/commands/new.lua:71: in function <...s/.luarocks/share/lua/5.1/loverocks/commands/new.lua:62>
	(tail call): ?
	...b/luarocks/rocks-5.1/loverocks/0.0.3-1/bin/loverocks:3: in main chunk
	[C]: ?

Code: Select all

[[email protected] futures]$ loverocks install

Missing dependencies for futures:
love ~> 0.9


Error: Could not satisfy dependency: love ~> 0.9
I'm sure some/all of it is my fault, but it wasn't exactly a nice first experience.
Are you on the most updated version, 0.0.3? It setup for me fine on OSX.

Re: [TOOL] LÖVERocks - A package manager manager

Posted: Mon Jun 08, 2015 4:45 pm
by bartbes
bakpakin wrote: Are you on the most updated version, 0.0.3?
Just checked, I am on 0.0.3.

EDIT: Maybe it's related to me having lua 5.1, 5.2 and 5.3 on my machine (with the 'lua' binary being lua 5.3)? Or because it's a local install?

Re: [TOOL] LÖVERocks - A package manager manager

Posted: Mon Jun 08, 2015 8:14 pm
by alloyed
bartbes wrote:So I figured I'd give this a go.. it didn't work:

Code: Select all

[[email protected] async-futures]$ loverocks init
ERROR: NYI. For now, try making an empty project with `loverocks new` and moving your code into the result.

Code: Select all

[[email protected] love-misc-libs]$ loverocks new futures
Found LOVE version 0.9.2
Using template "love9"
/usr/bin/lua5.1: ...e/bartbes/.luarocks/share/lua/5.1/loverocks/util.lua:30: bad argument #1 to 'attributes' (string expected, got nil)
stack traceback:
	[C]: in function 'attributes'
	...e/bartbes/.luarocks/share/lua/5.1/loverocks/util.lua:30: in function 'slurp'
	...s/.luarocks/share/lua/5.1/loverocks/commands/new.lua:71: in function <...s/.luarocks/share/lua/5.1/loverocks/commands/new.lua:62>
	(tail call): ?
	...b/luarocks/rocks-5.1/loverocks/0.0.3-1/bin/loverocks:3: in main chunk
	[C]: ?

Code: Select all

[[email protected] futures]$ loverocks install

Missing dependencies for futures:
love ~> 0.9


Error: Could not satisfy dependency: love ~> 0.9
I'm sure some/all of it is my fault, but it wasn't exactly a nice first experience.
Can you run

Code: Select all

 find ~/.luarocks -path "*loverocks*" 
quickly? It looks like we didn't find the appropriate template and my bad error handling didn't warn about it in time to avoid making the project in the first place.

Re: [TOOL] LÖVERocks - A package manager manager

Posted: Mon Jun 08, 2015 8:30 pm
by bartbes
Sure:

Code: Select all

/home/bartbes/.luarocks/bin/loverocks
/home/bartbes/.luarocks/share/lua/5.1/loverocks
/home/bartbes/.luarocks/share/lua/5.1/loverocks/log.lua
/home/bartbes/.luarocks/share/lua/5.1/loverocks/main.lua
/home/bartbes/.luarocks/share/lua/5.1/loverocks/util.lua
/home/bartbes/.luarocks/share/lua/5.1/loverocks/commands
/home/bartbes/.luarocks/share/lua/5.1/loverocks/commands/init.lua
/home/bartbes/.luarocks/share/lua/5.1/loverocks/commands/install.lua
/home/bartbes/.luarocks/share/lua/5.1/loverocks/commands/new.lua
/home/bartbes/.luarocks/share/lua/5.1/loverocks/commands/help.lua
/home/bartbes/.luarocks/share/lua/5.1/loverocks/commands/lua.lua
/home/bartbes/.luarocks/share/lua/5.1/loverocks/commands.lua
/home/bartbes/.luarocks/share/lua/5.1/loverocks/config.lua
/home/bartbes/.luarocks/share/lua/5.1/loverocks/versions.lua
/home/bartbes/.luarocks/lib/luarocks/rocks-5.1/loverocks
/home/bartbes/.luarocks/lib/luarocks/rocks-5.1/loverocks/0.0.3-1
/home/bartbes/.luarocks/lib/luarocks/rocks-5.1/loverocks/0.0.3-1/bin
/home/bartbes/.luarocks/lib/luarocks/rocks-5.1/loverocks/0.0.3-1/bin/loverocks
/home/bartbes/.luarocks/lib/luarocks/rocks-5.1/loverocks/0.0.3-1/templates
/home/bartbes/.luarocks/lib/luarocks/rocks-5.1/loverocks/0.0.3-1/templates/love9
/home/bartbes/.luarocks/lib/luarocks/rocks-5.1/loverocks/0.0.3-1/templates/love9/.gitignore
/home/bartbes/.luarocks/lib/luarocks/rocks-5.1/loverocks/0.0.3-1/templates/love9/PROJECT-scm-1.rockspec
/home/bartbes/.luarocks/lib/luarocks/rocks-5.1/loverocks/0.0.3-1/templates/love9/conf.lua
/home/bartbes/.luarocks/lib/luarocks/rocks-5.1/loverocks/0.0.3-1/templates/love9/rocks
/home/bartbes/.luarocks/lib/luarocks/rocks-5.1/loverocks/0.0.3-1/templates/love9/rocks/init.lua
/home/bartbes/.luarocks/lib/luarocks/rocks-5.1/loverocks/0.0.3-1/templates/love9/rocks/config.lua
/home/bartbes/.luarocks/lib/luarocks/rocks-5.1/loverocks/0.0.3-1/loverocks-0.0.3-1.rockspec
/home/bartbes/.luarocks/lib/luarocks/rocks-5.1/loverocks/0.0.3-1/rock_manifest
By the way, is there some trick to telling luarocks love is installed, or is that something loverocks does for me?

Re: [TOOL] LÖVERocks - A package manager manager

Posted: Mon Jun 08, 2015 10:22 pm
by alloyed
bartbes wrote:Sure:

Code: Select all

/home/bartbes/.luarocks/bin/loverocks
/home/bartbes/.luarocks/share/lua/5.1/loverocks
/home/bartbes/.luarocks/share/lua/5.1/loverocks/log.lua
/home/bartbes/.luarocks/share/lua/5.1/loverocks/main.lua
/home/bartbes/.luarocks/share/lua/5.1/loverocks/util.lua
/home/bartbes/.luarocks/share/lua/5.1/loverocks/commands
/home/bartbes/.luarocks/share/lua/5.1/loverocks/commands/init.lua
/home/bartbes/.luarocks/share/lua/5.1/loverocks/commands/install.lua
/home/bartbes/.luarocks/share/lua/5.1/loverocks/commands/new.lua
/home/bartbes/.luarocks/share/lua/5.1/loverocks/commands/help.lua
/home/bartbes/.luarocks/share/lua/5.1/loverocks/commands/lua.lua
/home/bartbes/.luarocks/share/lua/5.1/loverocks/commands.lua
/home/bartbes/.luarocks/share/lua/5.1/loverocks/config.lua
/home/bartbes/.luarocks/share/lua/5.1/loverocks/versions.lua
/home/bartbes/.luarocks/lib/luarocks/rocks-5.1/loverocks
/home/bartbes/.luarocks/lib/luarocks/rocks-5.1/loverocks/0.0.3-1
/home/bartbes/.luarocks/lib/luarocks/rocks-5.1/loverocks/0.0.3-1/bin
/home/bartbes/.luarocks/lib/luarocks/rocks-5.1/loverocks/0.0.3-1/bin/loverocks
/home/bartbes/.luarocks/lib/luarocks/rocks-5.1/loverocks/0.0.3-1/templates
/home/bartbes/.luarocks/lib/luarocks/rocks-5.1/loverocks/0.0.3-1/templates/love9
/home/bartbes/.luarocks/lib/luarocks/rocks-5.1/loverocks/0.0.3-1/templates/love9/.gitignore
/home/bartbes/.luarocks/lib/luarocks/rocks-5.1/loverocks/0.0.3-1/templates/love9/PROJECT-scm-1.rockspec
/home/bartbes/.luarocks/lib/luarocks/rocks-5.1/loverocks/0.0.3-1/templates/love9/conf.lua
/home/bartbes/.luarocks/lib/luarocks/rocks-5.1/loverocks/0.0.3-1/templates/love9/rocks
/home/bartbes/.luarocks/lib/luarocks/rocks-5.1/loverocks/0.0.3-1/templates/love9/rocks/init.lua
/home/bartbes/.luarocks/lib/luarocks/rocks-5.1/loverocks/0.0.3-1/templates/love9/rocks/config.lua
/home/bartbes/.luarocks/lib/luarocks/rocks-5.1/loverocks/0.0.3-1/loverocks-0.0.3-1.rockspec
/home/bartbes/.luarocks/lib/luarocks/rocks-5.1/loverocks/0.0.3-1/rock_manifest
By the way, is there some trick to telling luarocks love is installed, or is that something loverocks does for me?
One more try. can you quickly patch with

Code: Select all

$ curl https://raw.githubusercontent.com/Alloyed/loverocks/master/loverocks/commands/new.lua >! /home/bartbes/.luarocks/share/lua/5.1/loverocks/commands/new.lua
and tell me what "loverocks new foo" does then?

Re: [TOOL] LÖVERocks - A package manager manager

Posted: Tue Jun 09, 2015 6:18 am
by bartbes
I see you added a more descriptive error:

Code: Select all

[[email protected] /tmp]$ loverocks new stuff
Found LOVE version 0.9.2
ERROR: file 'templates/love9' not found:
	no file '/home/bartbes/.luarocks/share/lua/5.1/templates/love9'
	no file '/home/bartbes/.luarocks/lib/lua/5.1/templates/love9'
	no file '/home/bartbes/.luarocks/share/lua/5.1/loverocks/templates/love9'
	no file '/home/bartbes/.luarocks/share/lua/5.1/templates/love9'
	no file '/home/bartbes/.luarocks/share/lua/templates/love9'
	no file '/home/bartbes/.luarocks/share/templates/love9'
	no file '/home/bartbes/.luarocks/templates/love9'
	no file '/home/bartbes/templates/love9'
	no file '/home/templates/love9'
	no file '/home/bartbes/.local/share/templates/love9'
	no file '/usr/local/share/templates/love9'
	no file '/usr/share/templates/love9'
	templates/love9: No such file or directory

Re: [TOOL] LÖVERocks - A package manager manager

Posted: Tue Jun 09, 2015 4:07 pm
by alloyed
bartbes wrote:I see you added a more descriptive error:

Code: Select all

[[email protected] /tmp]$ loverocks new stuff
Found LOVE version 0.9.2
ERROR: file 'templates/love9' not found:
	no file '/home/bartbes/.luarocks/share/lua/5.1/templates/love9'
	no file '/home/bartbes/.luarocks/lib/lua/5.1/templates/love9'
	no file '/home/bartbes/.luarocks/share/lua/5.1/loverocks/templates/love9'
	no file '/home/bartbes/.luarocks/share/lua/5.1/templates/love9'
	no file '/home/bartbes/.luarocks/share/lua/templates/love9'
	no file '/home/bartbes/.luarocks/share/templates/love9'
	no file '/home/bartbes/.luarocks/templates/love9'
	no file '/home/bartbes/templates/love9'
	no file '/home/templates/love9'
	no file '/home/bartbes/.local/share/templates/love9'
	no file '/usr/local/share/templates/love9'
	no file '/usr/share/templates/love9'
	templates/love9: No such file or directory
So I asked hisham and he thinks there might be a regression in datafile. Can you test his patch by doing

Code: Select all

$ luarocks remove loverocks datafile
$ luarocks install https://raw.githubusercontent.com/hishamhm/datafile/master/rockspecs/datafile-scm-1.rockspec
$ luarocks install https://raw.githubusercontent.com/Alloyed/loverocks/master/loverocks-scm-0.rockspec

Re: [TOOL] LÖVERocks - A package manager manager

Posted: Tue Jun 09, 2015 4:17 pm
by bartbes
That doesn't work either, it gets weirder and weirder.. Again, may it be related to my multiple lua and luarocks versions and/or having this all installed with --local?

Code: Select all

[[email protected] ~]$ luarocks-5.1 --local remove loverocks datafile

Error: Could not find rock 'loverocks datafile' in /home/bartbes/.luarocks
[[email protected] ~]$ luarocks-5.1 --local remove loverocks
Checking stability of dependencies on the absence of
loverocks 0.0.3-1...

Removing loverocks 0.0.3-1...
Removal successful.
[[email protected] ~]$ luarocks-5.1 --local remove datafile 
Checking stability of dependencies on the absence of
datafile 0.1-1...

Removing datafile 0.1-1...
Removal successful.
[[email protected] ~]$ luarocks-5.1 --local install https://raw.githubusercontent.com/hishamhm/datafile/master/rockspecs/datafile-scm-1.rockspec
Using https://raw.githubusercontent.com/hishamhm/datafile/master/rockspecs/datafile-scm-1.rockspec... switching to 'build' mode
Cloning into 'datafile'...
remote: Counting objects: 26, done.
remote: Compressing objects: 100% (21/21), done.
remote: Total 26 (delta 2), reused 17 (delta 1), pack-reused 0
Receiving objects: 100% (26/26), 7.85 KiB | 0 bytes/s, done.
Resolving deltas: 100% (2/2), done.
Checking connectivity... done.
Updating manifest for /home/bartbes/.luarocks/lib/luarocks/rocks-5.1
datafile scm-1 is now built and installed in /home/bartbes/.luarocks (license: MIT/X11)
[[email protected] ~]$ luarocks-5.1 --local install https://raw.githubusercontent.com/Alloyed/loverocks/master/loverocks-scm-0.rockspec         
Using https://raw.githubusercontent.com/Alloyed/loverocks/master/loverocks-scm-0.rockspec... switching to 'build' mode
Cloning into 'loverocks'...
remote: Counting objects: 51, done.
remote: Compressing objects: 100% (46/46), done.
remote: Total 51 (delta 5), reused 29 (delta 2), pack-reused 0
Receiving objects: 100% (51/51), 19.79 KiB | 0 bytes/s, done.
Resolving deltas: 100% (5/5), done.
Checking connectivity... done.
Updating manifest for /home/bartbes/.luarocks/lib/luarocks/rocks-5.1
loverocks scm-0 is now built and installed in /home/bartbes/.luarocks (license: MIT)
[[email protected] /tmp]$ loverocks new test
Found LOVE version 0.9.2
ERROR: file 'templates/love9' not found:
	can't open /home/bartbes/.luarocks/share/lua/5.1/templates/love9: No such file or directory
	can't open /home/bartbes/.luarocks/lib/lua/5.1/templates/love9: No such file or directory
	can't open /home/bartbes/.luarocks/share/lua/5.1/templates/love9: No such file or directory
	can't open /home/bartbes/.luarocks/share/lua/5.1/loverocks/templates/love9: No such file or directory
	can't open /home/bartbes/.local/share/templates/love9: No such file or directory
	can't open /usr/local/share/templates/love9: No such file or directory
	can't open /usr/share/templates/love9: No such file or directory
	can't open /run/user/1000/templates/love9: No such file or directory
	can't open /usr/share/templates/love9: No such file or directory
	can't open /usr/lib/templates/love9: No such file or directory
	templates/love9: No such file or directory

Re: [TOOL] LÖVERocks - A package manager manager

Posted: Tue Jun 09, 2015 4:33 pm
by alloyed
bartbes wrote:That doesn't work either, it gets weirder and weirder.. Again, may it be related to my multiple lua and luarocks versions and/or having this all installed with --local?

Code: Select all

[[email protected] ~]$ luarocks-5.1 --local remove loverocks datafile

Error: Could not find rock 'loverocks datafile' in /home/bartbes/.luarocks
[[email protected] ~]$ luarocks-5.1 --local remove loverocks
Checking stability of dependencies on the absence of
loverocks 0.0.3-1...

Removing loverocks 0.0.3-1...
Removal successful.
[[email protected] ~]$ luarocks-5.1 --local remove datafile 
Checking stability of dependencies on the absence of
datafile 0.1-1...

Removing datafile 0.1-1...
Removal successful.
[[email protected] ~]$ luarocks-5.1 --local install https://raw.githubusercontent.com/hishamhm/datafile/master/rockspecs/datafile-scm-1.rockspec
Using https://raw.githubusercontent.com/hishamhm/datafile/master/rockspecs/datafile-scm-1.rockspec... switching to 'build' mode
Cloning into 'datafile'...
remote: Counting objects: 26, done.
remote: Compressing objects: 100% (21/21), done.
remote: Total 26 (delta 2), reused 17 (delta 1), pack-reused 0
Receiving objects: 100% (26/26), 7.85 KiB | 0 bytes/s, done.
Resolving deltas: 100% (2/2), done.
Checking connectivity... done.
Updating manifest for /home/bartbes/.luarocks/lib/luarocks/rocks-5.1
datafile scm-1 is now built and installed in /home/bartbes/.luarocks (license: MIT/X11)
[[email protected] ~]$ luarocks-5.1 --local install https://raw.githubusercontent.com/Alloyed/loverocks/master/loverocks-scm-0.rockspec         
Using https://raw.githubusercontent.com/Alloyed/loverocks/master/loverocks-scm-0.rockspec... switching to 'build' mode
Cloning into 'loverocks'...
remote: Counting objects: 51, done.
remote: Compressing objects: 100% (46/46), done.
remote: Total 51 (delta 5), reused 29 (delta 2), pack-reused 0
Receiving objects: 100% (51/51), 19.79 KiB | 0 bytes/s, done.
Resolving deltas: 100% (5/5), done.
Checking connectivity... done.
Updating manifest for /home/bartbes/.luarocks/lib/luarocks/rocks-5.1
loverocks scm-0 is now built and installed in /home/bartbes/.luarocks (license: MIT)
[[email protected] /tmp]$ loverocks new test
Found LOVE version 0.9.2
ERROR: file 'templates/love9' not found:
	can't open /home/bartbes/.luarocks/share/lua/5.1/templates/love9: No such file or directory
	can't open /home/bartbes/.luarocks/lib/lua/5.1/templates/love9: No such file or directory
	can't open /home/bartbes/.luarocks/share/lua/5.1/templates/love9: No such file or directory
	can't open /home/bartbes/.luarocks/share/lua/5.1/loverocks/templates/love9: No such file or directory
	can't open /home/bartbes/.local/share/templates/love9: No such file or directory
	can't open /usr/local/share/templates/love9: No such file or directory
	can't open /usr/share/templates/love9: No such file or directory
	can't open /run/user/1000/templates/love9: No such file or directory
	can't open /usr/share/templates/love9: No such file or directory
	can't open /usr/lib/templates/love9: No such file or directory
	templates/love9: No such file or directory
huh. I've got multiple versions of luarocks/lua installed using the --local tree too, but I can't reproduce. Maybe another install of luarocks/datafile is finding its way in? try

Code: Select all

$ lua -e for i, loader in ipairs(package.loaders) do print(i) print(loader("datafile")) print(loader("luarocks")) end
$ eval `luarocks path`
$ lua -e for i, loader in ipairs(package.loaders) do print(i) print(loader("datafile")) print(loader("luarocks")) end