Added NOTE why we have to continue mocking debug
lua's debug library causes a lot of unsafety, to the point of segfaults
all over the place
@@ -62,14 +62,14 @@ fn set_up_awesome_path(lua: &Lua) -> rlua::Result<()> {
xdg_data_path.into_os_string().to_string_lossy()));
package.set("cpath", cpath)?;
- // TODO Real debug, bug in rlua
+ // NOTE We mock debug here because the actual debug library is super duper unsafe
+ // If we tried to load it ourselves, we cause segfaults which is sad.
let debug = lua.create_table();
debug.set("getinfo", lua.create_function(dummy_getinfo))?;
debug.set("traceback", lua.create_function(dummy))?;
globals.set("debug", debug)
}
-// TODO Remove this and actually load the unsafe debug lib
fn dummy_getinfo<'lua>(lua: &'lua Lua, _: rlua::Value) -> rlua::Result<rlua::Table<'lua>> {
fn gsub<'lua>(_: &'lua Lua, _: rlua::Value) -> rlua::Result<String> {
Ok("FIXME Install debug lib!".into())
