Prints one and exactly one result for datafile and nothing else the second try, and finds nothing before adding the path.
Is the location of my template file correct, because it seems to be in a weird location, or should datafile have dealt with that?
[TOOL] LÖVERocks - A package manager manager
Re: [TOOL] LÖVERocks - A package manager manager
The path is a little odd but luarocks/datafile should understand it because it's the default for misc files, which why it's really weird that it's skipping it entirely.bartbes wrote:Prints one and exactly one result for datafile and nothing else the second try, and finds nothing before adding the path.
Is the location of my template file correct, because it seems to be in a weird location, or should datafile have dealt with that?
Anyways, 0.0.4 adds a config option so you can just manually override datafile:
Code: Select all
$ echo "loverocks_templates = '$(find ~/.luarocks -path "*loverocks*" -name templates)'" >> ~/.config/loverocks/conf.lua
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: [TOOL] LÖVERocks - A package manager manager
You say that...
I kind of feel bad for "hijacking" the thread at this point...
Code: Select all
[bartbes@archery /tmp]$ loverocks new test
Found LOVE version 0.9.2
/usr/bin/lua5.1: ...s/.luarocks/share/lua/5.1/loverocks/commands/new.lua:63: attempt to call global 'config' (a nil value)
stack traceback:
...s/.luarocks/share/lua/5.1/loverocks/commands/new.lua:63: in function 'template_path'
...s/.luarocks/share/lua/5.1/loverocks/commands/new.lua:81: in function <...s/.luarocks/share/lua/5.1/loverocks/commands/new.lua:75>
(tail call): ?
...b/luarocks/rocks-5.1/loverocks/0.0.4-1/bin/loverocks:3: in main chunk
[C]: ?
Re: [TOOL] LÖVERocks - A package manager manager
0.0.4-2! 0.0.4-2 is the version that will work!bartbes wrote:You say that...I kind of feel bad for "hijacking" the thread at this point...Code: Select all
[bartbes@archery /tmp]$ loverocks new test Found LOVE version 0.9.2 /usr/bin/lua5.1: ...s/.luarocks/share/lua/5.1/loverocks/commands/new.lua:63: attempt to call global 'config' (a nil value) stack traceback: ...s/.luarocks/share/lua/5.1/loverocks/commands/new.lua:63: in function 'template_path' ...s/.luarocks/share/lua/5.1/loverocks/commands/new.lua:81: in function <...s/.luarocks/share/lua/5.1/loverocks/commands/new.lua:75> (tail call): ? ...b/luarocks/rocks-5.1/loverocks/0.0.4-1/bin/loverocks:3: in main chunk [C]: ?
Don't worry about it, I'd rather know what can go wrong early before the codebase becomes hard to change
Re: [TOOL] LÖVERocks - A package manager manager
Now when I run in 0.0.4-2, it creates a project but all the default files are blank.
Code: Select all
loverocks new foo
((_((_CRAYOLA_((_((_> GitHub <_((_((_CRAYOLA_((_(()
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: [TOOL] LÖVERocks - A package manager manager
Same, but I did find a reason why datafile might be failing.
It's querying "~/.luarocks/lib/luarocks/manifest" first, and if it doesn't exist it tries the rocks-5.1 dir. This is the wrong order, however, since I also have luarocks for 5.2 and 5.3, so the first path does exist, but refers to the lua 5.2 rocks instead of the lua 5.1 rocks. Reversing this order in my local copy fixed the problem. You seem to have talked to the author of datafile, so maybe you can pass it on?
It's querying "~/.luarocks/lib/luarocks/manifest" first, and if it doesn't exist it tries the rocks-5.1 dir. This is the wrong order, however, since I also have luarocks for 5.2 and 5.3, so the first path does exist, but refers to the lua 5.2 rocks instead of the lua 5.1 rocks. Reversing this order in my local copy fixed the problem. You seem to have talked to the author of datafile, so maybe you can pass it on?
Re: [TOOL] LÖVERocks - A package manager manager
Ah! I found the problem and solution in 0.0.4 for empty new projects. I see in the 0.0.4 release, the spit_file function in util.lua is incorrect; nothing is written to the file!
0.0.4
btw, I would like to contribute to this project
0.0.4
Code: Select all
local function spit_file(str, dest)
log:fs("spit %s", dest)
local file, err = io.open(dest, "w")
if not file then return nil, err end
local ok, err = file:write() -- should be file:write(str)
if not ok then return nil, err end
local ok, err = file:close()
if not ok then return nil, err end
return true
end
((_((_CRAYOLA_((_((_> GitHub <_((_((_CRAYOLA_((_(()
Re: [TOOL] LÖVERocks - A package manager manager
Alright, fixed in 0.0.5~bakpakin wrote:Ah! I found the problem and solution in 0.0.4 for empty new projects. I see in the 0.0.4 release, the spit_file function in util.lua is incorrect; nothing is written to the file!
0.0.4btw, I would like to contribute to this projectCode: Select all
local function spit_file(str, dest) log:fs("spit %s", dest) local file, err = io.open(dest, "w") if not file then return nil, err end local ok, err = file:write() -- should be file:write(str) if not ok then return nil, err end local ok, err = file:close() if not ok then return nil, err end return true end
If you find anything else/want to implement anything, I like pull requests. I'll see if I can crib a contributing.md from somewhere else, but tbh I'm not that picky.
- Positive07
- Party member
- Posts: 1014
- Joined: Sun Aug 12, 2012 4:34 pm
- Location: Argentina
Re: [TOOL] LÖVERocks - A package manager manager
I think the CI in the repo is not doing what it should do:
And in the Test Results it says:
In another note: Are you planning support for Windows? I can help if needed
Code: Select all
busted -o junit > $CIRCLE_TEST_REPORTS/junit/tests.xml
sh: 1: /home/ubuntu/.luarocks/bin/luarocks: not found
Found a suitable copy of luarocks at /usr/local/bin/luarocks
Using template "./templates/love9"
New LOVERocks project installed at "my-project/"
inspect added to rockspec, now installing.
Missing dependencies for my-project:
inspect
No existing manifest. Attempting to rebuild...
Just pointing it out...Your build ran 1 test in with 1 failure.
failures:
failed to parse junit.xml - in ParseError
In another note: Are you planning support for Windows? I can help if needed
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
Re: [TOOL] LÖVERocks - A package manager manager
Just got the homebrew maintainers to make homebrew's luarocks have user configuration enabled. Since most mac users probably have luarocks installed via homebrew, this makes loverocks on mac a lot easier.
((_((_CRAYOLA_((_((_> GitHub <_((_((_CRAYOLA_((_(()
Who is online
Users browsing this forum: Bing [Bot] and 2 guests