WIP: awesomerc.tl should work #85

Draft
Aire-One wants to merge 40 commits from feat/#58 into master
1 changed files with 18 additions and 1 deletions
Showing only changes of commit 086ab2a474 - Show all commits

View File

@ -4,6 +4,23 @@ local utils <const> = require("awesomewmdtl.utils")
local spread = utils.spread
-- Very hacky way to get the module path of a capi class
-- We shouldn't rely on partial record for Node
local capi_class <const>: { string : Node } = {
Client = {
name = "Client",
module_path = "awful.client",
},
Screen = {
name = "Screen",
module_path = "awful.screen",
},
Tag = {
name = "Tag",
module_path = "awful.tag",
},
}
local function get_all_types_in_node(node: Node): { string }
local parameters_types = {}
if node.parameters then
@ -57,7 +74,7 @@ function Module_Dependencies.visit(node: Node, mod: Node, d: Dag)
goto continue
end
local dependency = d.modules[type_name] or d.modules[utils.lowercase(type_name)]
local dependency = d.modules[type_name] or d.modules[utils.lowercase(type_name)] or capi_class[type_name]
if dependency then
if dependency.name ~= mod.name then
mod.dependencies[dependency.name] = dependency.module_path