Alloyed/loverocks

Error: Could not satisfy dependency: love ~> 0.9

bakpakin opened this issue · 7 comments

When installing new dependencies with loverocks install, I have to comment out 'love ~> 0.9` in the rockspec to get the install to work. Using lua 5.2 and luarocks 2.2.2.

the not resolving the love ~> 0.9 thing was a dumb mistake, fixed in 0.0.3.
That said, a bunch of preliminary testing with a Lua 5.3 install made it pretty clear that luarocks expects you to use the same interpreter for both luarocks and your own code. Without upstream changes I don't think Lua 5.2 will work without hiccups anytime soon (unless you plan on using Lua 5.2 with love, which is not something I've thought nearly hard enough about)

Switched my luarocks to use lua 5.1 and upgraded to loverocks 0.0.3. I still have the problem. With a little fiddling, I found that rocks with a dependency on love (namely repler and async by bartbes) don't install correctly, while other rocks seem ok.

What do you get when you do

$ loverocks --verbose lua help | tail

and what does rocks/config.lua look like inside your project?

Here's the result of the above command:

$ LUAROCKS_CONFIG='rocks/config.lua' luarocks-5.1 --tree='rocks' help

        Write a template for a rockspec file.

CONFIGURATION
    Lua version: 5.1
    Configuration files:
        System: /usr/local/etc/luarocks51/config-5.1.lua (ok)
        User  : disabled in this LuaRocks installation.

    Rocks trees in use:
        /usr/local ("system")

I installed luarocks with homebrew and then used luarocks-5.1 install loverocks to install loverocks.

Here's rocks/config.lua:

rocks_provided = {

    lua = "5.1-1",

    utf8 = "0.1.0-1",

    love = "0.9.2-1",

    luasocket = "2.0.2-5",

    enet = "1.2-1",

}

User : disabled in this LuaRocks installation.

Found the problem~
Your luarocks install never reads rocks/config.lua because it was compiled with the non-default --force-config flag enabled. This precludes any kind of user configuration, at all.

That's is probably worth complaining to the maintainer about but in the meantime you can probably just luarocks-5.1 install luarocks and use that copy of luarocks instead. I'll add "has to not be compiled with --force-config" to the list of things loverocks has to verify too for everyone else.

Thanks!