-
Hi There, Sorry for the noobie question. I'm really enjoying this application so far! I'm trying to run amalgamation on the follow repo into my project. I have LuaORM installed into my system via luarocks. My amalg.cache file looks something like this: https://gist.github.com/erichowey/50a9a29568081e9188f1f1181a8d6cdd However, I can't seem to get the directory structure to work right. For example: -- API to configure the ORM
local ORM = require("LuaORM/ORM")
LuaORM_API.ORM = ORM(sourceDirectoryPath) Which in turns throws the following error on my application:
When believe the module should actually be:
Any advice would be greatly appreciated. Thank You! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi! This will be a tough one, because LuaORM very much depends on file paths derived from Lua module files. Your
Basically, the module name (key in the cache) must be exactly the same as the argument to The second issue is that LuaORM uses the This should be possible using something like this: LUA_PATH_5_3="/usr/share/lua/5.3/LuaORM/?.lua;;" amalg.lua -s script.lua -o out.lua -c And the third issue is that LuaORM uses the path derived from the first module as the base path for reading template files. The derived path is probably nonsense because the first module doesn't exist as a file anymore after amalgamation but HTH, |
Beta Was this translation helpful? Give feedback.
Hi!
This will be a tough one, because LuaORM very much depends on file paths derived from Lua module files.
Your
amalg.cache
file looks good, but it doesn't match with how LuaORM uses its modules. How did you generate it? By hand?!Basically, the module name (key in the cache) must be exactly the same as the argument to
require
in the source code of LuaORM, and the same as the module name in the error message. If LuaORM wantsLuaORM/ORM
, this is what must be in the cache, notLuaORM.ORM
or evenLuaORM.LuaORM.ORM
. Most modules in the LuaORM source code arerequire
d this way. (For the record: you should not use directory separat…