lit
lit copied to clipboard
lit make luvit/tap - fail: [string "bundle:deps/git/db.lua"]:402: Kind mismatch
This looks like a bug:
$ lit make luvit/tap
lit version: 2.2.16
luvi version: v2.4.0
command: make luvit/tap
load config: .../.litconfig
connecting: wss://lit.luvit.io/
fetching: 1 object
fetching: 1 object
fetching: 1 object
including dependency: pretty-print (1.0.4)
fail: [string "bundle:deps/git/db.lua"]:402: Kind mismatch
stack traceback:
[C]: in function 'assert'
[string "bundle:deps/git/db.lua"]:402: in function 'loadAs'
[string "bundle:libs/install-deps.lua"]:30: in function 'installDeps'
[string "bundle:libs/core.lua"]:476: in function 'makeUrl'
[string "bundle:/commands/make.lua"]:12: in function 'fn'
[string "bundle:deps/require.lua"]:293: in function 'require'
[string "bundle:main.lua"]:50: in function <[string "bundle:main.lua"]:38>
[C]: in function 'xpcall'
[string "bundle:main.lua"]:38: in function <[string "bundle:main.lua"]:31>
I believe tap is a single-file package. You can't use these with lit make because it's expecting a tree with a main.lua file to act at the bootstrap for luvi code.
It's more of a case of poor error reporting than a bug. I'm not sure why it isn't triggering this path. https://github.com/luvit/lit/blob/b394203fa7fab2f330ce936601575c62d70c3e54/libs/core.lua#L473-L475
Ahh, operator precedence strikes again.
not tagObj.type == "tree" is not the same as tagObj.type ~= "tree".