WIP: awesomerc.tl
should work #85
|
@ -4,6 +4,23 @@ local utils <const> = require("awesomewmdtl.utils")
|
||||||
|
|
||||||
local spread = utils.spread
|
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 function get_all_types_in_node(node: Node): { string }
|
||||||
local parameters_types = {}
|
local parameters_types = {}
|
||||||
if node.parameters then
|
if node.parameters then
|
||||||
|
@ -57,7 +74,7 @@ function Module_Dependencies.visit(node: Node, mod: Node, d: Dag)
|
||||||
goto continue
|
goto continue
|
||||||
end
|
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 then
|
||||||
if dependency.name ~= mod.name then
|
if dependency.name ~= mod.name then
|
||||||
mod.dependencies[dependency.name] = dependency.module_path
|
mod.dependencies[dependency.name] = dependency.module_path
|
||||||
|
|
Loading…
Reference in New Issue