Open Howld opened 2 years ago
Where are these paths are coming from? What's the location of the IDE itself? engine/?.lua
is not something that the IDE would generate, so I'm not sure how this path is formed and how to reproduce this issue. What's the content of LUA_PATH variable?
I confirmed that ....lualibs/?/init.lua
location is the last one that the IDE usually adds, so whatever is added after that is either added by some of the plugins or by your script itself. Do you know where the engine/?.lua
path is coming from?
It's my code path. I use Love2D engine, and running by cmd on Windows. Sure, the location is the last one that IDE adds, but lacks semicolon. The engine generate package path with semicolon last, so I think the IDE should do same to avoid some error message about not find file.
Sure, the location is the last one that IDE adds, but lacks semicolon.
I don't see where this happens. Can you better describe your configuration and show full content of the Output window when you launch your love2d script and the selected interpreter in the IDE? Thanks.
Code in main.lua
package.path = package.path .. ';engine/?.lua;engine/SLAXML-master/?.lua;engine/middleclass-master/?.lua'
print(package.path)
Output in Cmd:
D:\PersonalFiles\Love\p1>love.exe ../p1
.\?.lua;D:\NormalPrograms\LOVE\lua\?.lua;D:\NormalPrograms\LOVE\lua\?\init.lua;;engine/?.lua;engine/SLAXML-master/?.lua;engine/middleclass-master/?.lua
Look path before my added path, you will find two semicolon. Because the Love2D engine adds one semicolon by itself.
Output in IDE:
;.\?.lua;D:\NormalPrograms\LOVE\lua\?.lua;D:\NormalPrograms\LOVE\lua\?\init.lua;;./?.lua;./?/init.lua;./lua/?.lua;./lua/?/init.lua;D:\NormalPrograms\ZeroBrane\lualibs/?/?.lua;D:\NormalPrograms\ZeroBrane\lualibs/?.lua;D:\NormalPrograms\ZeroBrane\lualibs/?/?/init.lua;D:\NormalPrograms\ZeroBrane\lualibs/?/init.lua;engine/?.lua;engine/SLAXML-master/?.lua;engine/middleclass-master/?.lua
...D:\NormalPrograms\ZeroBrane\lualibs/?/init.luaengine/?.lua;... ...D:\NormalPrograms\ZeroBrane\lualibs/?/init.lua ; engine/?.lua;...
Please fix that.