Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ignoring path and cpath? #202

Open
Frityet opened this issue Nov 8, 2022 · 6 comments
Open

ignoring path and cpath? #202

Frityet opened this issue Nov 8, 2022 · 6 comments

Comments

@Frityet
Copy link

Frityet commented Nov 8, 2022

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
@actboy168
Copy link
Owner

Fails in dlopen, which is not something cpath or path can change.

@Frityet
Copy link
Author

Frityet commented Nov 9, 2022

Fails in dlopen, which is not something cpath or path can change.

why is it failing? running manually works fine

@Frityet
Copy link
Author

Frityet commented Nov 11, 2022

its tryna dlopen a directory, this is lua-debug doing this, right?

@Frityet
Copy link
Author

Frityet commented Nov 11, 2022

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

@Frityet
Copy link
Author

Frityet commented Nov 11, 2022

the first one is correct, the next ones are not

@Frityet
Copy link
Author

Frityet commented Nov 11, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants