[+] [soft]dependency filtering in json and auFilterOf calls

[*] Fix double auLinkProject call within processor start call tree didn't refresh link guard cache for each call to link
This commit is contained in:
Reece Wilson 2022-03-07 23:49:57 +00:00
parent 0b27f6fc13
commit 162283b5eb
2 changed files with 24 additions and 0 deletions

View File

@ -194,6 +194,18 @@ local function auFilterOf(configFilter, ...)
table.insert(andOptions, "not options:" .. option)
end)
auForEach(configFilter.depends, function(dependency)
if (not _auProjects[dependency]) then
table.insert(andOptions, "platforms:none")
end
end)
auForEach(configFilter.notDepends, function(dependency)
if (_auProjects[dependency]) then
table.insert(andOptions, "platforms:none")
end
end)
local supportedArchs = {}
auForEach(validArchs, function(arch)
table.insert(supportedArchs, "architecture:" .. auFetchGlobal("Architectures")[arch].architecture)

View File

@ -433,6 +433,8 @@ local function linkAuProject(dep, soft)
end
end
local linkStart = false
if (auGetCurrentProjectMeta()) then
if (_auLinkGuard[dep] ) then
return
@ -440,6 +442,11 @@ local function linkAuProject(dep, soft)
_auLinkGuard[dep] = dep
end
if (not _auLinkGuardStart) then
_auLinkGuardStart = true
linkStart = true
end
dependson(dep)
--if (not processor:getMeta().isStatic) then
@ -449,6 +456,11 @@ local function linkAuProject(dep, soft)
_auFatalMsg["processing project link"] = nil
end)
--end
if (linkStart) then
_auLinkGuard = {}
_auLinkGuardStart = false
end
return true
end