ignoring `path` and `cpath`?
The debug seems to be ignoring what I set for path/cpath
{
"version": "0.2.0",
"configurations": [
{
"type": "lua",
"request": "launch",
"name": "Debug",
"program": "${workspaceFolder}/lua_modules/lib/luarocks/rocks-5.1/thor/dev-1/bin/thor.lua",
"path": "${workspaceFolder}/lua_modules/share/lua/5.1/?.lua;${workspaceFolder}/lua_modules/share/lua/5.1/?/init.lua",
"cpath": "${workspaceFolder}/lua_modules/lib/lua/5.1/?.so",
"luaVersion": "jit",
"stopOnEntry": false,
"luaexe": "${workspaceFolder}/lua",
"preLaunchTask": "Build"
}
]
}
❯ cd /Users/frityet/Documents/Thor ; /Users/frityet/Documents/Thor/lua -e dofile\"/Users/frityet/.vscode/extensions/actboy168.lua-debug-1.60.1-darwin-x64/script/launch.lua\"\;DBG\"96815-ansi\" /Users/frityet/Documents/Thor/lua_modules/lib/luarocks/rocks-5.1/thor/dev-1/bin/thor.lua
/usr/local/opt/luajit/bin/luajit-2.1.0-beta3: error loading module 'ssl.core' from file '/usr/local/share/lua/':
dlopen(/usr/local/share/lua/, 0x0006): tried: '/usr/local/share/lua/' (not a file), '/usr/local/Cellar/luarocks/3.9.1/share/lua' (not a file)
stack traceback:
[C]: at 0x01071d4af2
[C]: in function 'require'
...frityet/Documents/Thor/lua_modules/share/lua/5.1/ssl.lua:8: in main chunk
[C]: in function 'require'
...t/Documents/Thor/lua_modules/share/lua/5.1/ssl/https.lua:10: in main chunk
[C]: in function 'require'
...a_modules/lib/luarocks/rocks-5.1/thor/dev-1/bin/thor.lua:1: in main chunk
[C]: at 0x010718436c
Fails in dlopen, which is not something cpath or path can change.
Fails in dlopen, which is not something cpath or path can change.
why is it failing? running manually works fine
its tryna dlopen a directory, this is lua-debug doing this, right?
Printing out the cpath gives me this. the extension is adding these errors
/Users/frityet/Documents/Thor/lua_modules/lib/lua/5.1/?.so;/usr/local/share/lua/;/usr/local/lib/lua/;%{workspaceFolder}/?.so
the first one is correct, the next ones are not
Got it to work, but in the worst way.
package.cpath = "/Users/frityet/Documents/Thor/lua_modules/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/?.so"
this is bad, but it works, I would like a real fix