[latex3-commits] [git/LaTeX3-latex3-luaotfload] dev: Allow restoring old submodule handling (0f606d6)
Marcel Fabian Krüger
tex at 2krueger.de
Sun Sep 6 01:14:56 CEST 2020
Repository : https://github.com/latex3/luaotfload
On branch : dev
Link : https://github.com/latex3/luaotfload/commit/0f606d6d5737ffc2ff1054edecafdbaf0ac4034d
>---------------------------------------------------------------
commit 0f606d6d5737ffc2ff1054edecafdbaf0ac4034d
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date: Sun Sep 6 01:14:56 2020 +0200
Allow restoring old submodule handling
Can be enabled with the environment variable
LUAOTFLOAD_TRACE_SUBMODULES=1
>---------------------------------------------------------------
0f606d6d5737ffc2ff1054edecafdbaf0ac4034d
src/luaotfload.lua | 39 ++++++++++++++++++++++-----------------
1 file changed, 22 insertions(+), 17 deletions(-)
diff --git a/src/luaotfload.lua b/src/luaotfload.lua
index 3818815..e00a5d0 100644
--- a/src/luaotfload.lua
+++ b/src/luaotfload.lua
@@ -37,23 +37,28 @@ if luaotfload_module == nil then
return texio.write_nl("%s WARNING: %s", module, text)
end
local saved_version = ProvidesLuaModule.version
- function luaotfload_module(module)
- local module_version = module.version
- if module_version ~= saved_version then
- local filenames
- if debug then
- filenames = string.format("luaotfload.lua is found at\n%q\n%s.lua is found at\n%q\n",
- debug.getinfo(1, "S").source:sub(2),
- module.name,
- debug.getinfo(2, "S").source:sub(2))
- else
- filenames = ""
- end
- print_warning("luaotfload", string.format("Version inconsistency detected.\n\z
- luaotfload is loaded in version %s, while %q is loaded \z
- in version %s.\n%sI will try to continue anyway.\nHIC SUNT DRACONES",
- saved_version, module.name, module_version, filenames))
- end
+ local trace_submodules = tonumber(os.getenv'LUAOTFLOAD_TRACE_SUBMODULES')
+ if luatexbase and luatexbase.provides_module and trace_submodules and trace_submodules ~= 0 then
+ luaotfload_module = luatexbase.provides_module
+ else
+ function luaotfload_module(module)
+ local module_version = module.version
+ if module_version ~= saved_version then
+ local filenames
+ if debug then
+ filenames = string.format("luaotfload.lua is found at\n%q\n%s.lua is found at\n%q\n",
+ debug.getinfo(1, "S").source:sub(2),
+ module.name,
+ debug.getinfo(2, "S").source:sub(2))
+ else
+ filenames = ""
+ end
+ print_warning("luaotfload", string.format("Version inconsistency detected.\n\z
+ luaotfload is loaded in version %s, while %q is loaded \z
+ in version %s.\n%sI will try to continue anyway.\nHIC SUNT DRACONES",
+ saved_version, module.name, module_version, filenames))
+ end
+ end
end
else
error[[luaotfload is reloading itself nested. This can't happen.]]
More information about the latex3-commits
mailing list.