Date: Sat, 25 Jan 2020 03:02:45 +0000 (UTC) From: Kyle Evans <kevans@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r357103 - head/stand/lua Message-ID: <202001250302.00P32jhW013820@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kevans Date: Sat Jan 25 03:02:45 2020 New Revision: 357103 URL: https://svnweb.freebsd.org/changeset/base/357103 Log: loader.lua: re-arrange to load local.lua *after* config loading The major problem with the current ordering is that loader.conf may contain all of the magic we need to actually setup the console, so loading local.lua prior to that can make it excessively difficult and annoying to debug (whoops, sorry Ravi & Warner). The new ordering has some implications, but I suspect they are a non-issue. The first is that it's no longer possible for the local module to inject any logic prior to loading config -- I suspect no one has relied on this. The second implication is that the config.loaded hook is now useless, as the local module will always be included after that hook would have fired. For config.loaded, I will opt to leave it in, just in case we add an early point for local lua to get injected or in case one wants to schedule some deferred logic in a custom loader.lua. The overhead of having it if no hooks will be invoked is relatively minimal. Diagnosed by: imp Reported by: imp, rpokala (most likely) MFC after: 3 days Modified: head/stand/lua/loader.lua Modified: head/stand/lua/loader.lua ============================================================================== --- head/stand/lua/loader.lua Sat Jan 25 00:06:18 2020 (r357102) +++ head/stand/lua/loader.lua Sat Jan 25 03:02:45 2020 (r357103) @@ -42,14 +42,14 @@ local password = require("password") -- need it. local menu -try_include("local") - config.load() + -- Our console may have been setup for a different color scheme before we get -- here, so make sure we set the default. if color.isEnabled() then printc(color.default()) end +try_include("local") if not core.isMenuSkipped() then menu = require("menu") end
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202001250302.00P32jhW013820>