Skip to content

Commit c619cf2

Browse files
committed
Address next round of review comments
1 parent 9817874 commit c619cf2

File tree

3 files changed

+3
-58
lines changed

3 files changed

+3
-58
lines changed

src/base/oven.lua

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -899,62 +899,6 @@
899899
return cfg._cfgset.blocks
900900
end
901901

902-
local function buildAppliedPropertyTable(prj, cfg)
903-
local blocks = fetchConfigSetBlocks(cfg)
904-
905-
local properties = {}
906-
907-
local srcprj = cfg.project
908-
909-
for _, blk in ipairs(blocks) do
910-
if blk._isusage then
911-
for key, value in pairs(blk) do
912-
local field = p.field.get(key)
913-
if field then
914-
if field.paths then
915-
-- Translate the paths to be relative to the project's location
916-
-- Get the absolute path of the field values
917-
local absPaths = {}
918-
if type(value) == 'table' then
919-
for i, v in ipairs(value) do
920-
absPaths[i] = path.getabsolute(path.join(srcprj.location, v))
921-
end
922-
else
923-
absPaths = path.getabsolute(path.join(srcprj.location, value))
924-
end
925-
926-
-- Translate the absolute paths to be relative to the target project's location
927-
local relPaths = {}
928-
if type(absPaths) == 'table' then
929-
for i, v in ipairs(absPaths) do
930-
relPaths[i] = path.getrelative(prj.location, v)
931-
end
932-
else
933-
relPaths = path.getrelative(prj.location, absPaths)
934-
end
935-
936-
if type(relPaths) == 'table' then
937-
verbosef('Translated paths - %s = %s', key, table.concat(relPaths, ","))
938-
else
939-
verbosef('Translated paths - %s = %s', key, relPaths)
940-
end
941-
else
942-
properties[key] = p.field.store(field, properties[key], value)
943-
end
944-
end
945-
end
946-
end
947-
end
948-
949-
for key, value in pairs(properties) do
950-
if type(value) == 'table' then
951-
verbosef('%s = %s', key, table.concat(value, ","))
952-
else
953-
verbosef('%s = %s', key, value)
954-
end
955-
end
956-
end
957-
958902
local function fetchPropertiesToApply(src, tgt)
959903
local properties = {}
960904
local srcprj = src.project

src/base/project.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@
576576
name = name:lower()
577577

578578
for _, usage in ipairs(self.usages or self.project.usages) do
579-
if name == usage.name:lower() then
579+
if name == usage.name then
580580
return usage
581581
end
582582
end

website/docs/uses.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@ The `uses` API is used to consume `usage` blocks from within a project.
1111
1. `PUBLIC` and `INTERFACE` usage scopes within a project of the corresponding name.
1212
2. `usage` blocks with the corresponding name in any scopes.
1313

14-
Note: If there are duplicate usage blocks with the same resolved name, the selected usage block is unspecified. `usage` blocks should have unique names if they are not specified as `PUBLIC`, `PRIVATE`, or `INTERFACE`.
14+
Note: If there are duplicate usage blocks with the same resolved name, the selected usage block is unspecified. `usage` blocks should have unique names if they are not specified as `PUBLIC`, `PRIVATE`, or `INTERFACE`. If `links` or `linkoptions` are defined within a usage block, it is recommended that `linkgroups` is also turned on.
1515

1616
### Applies To ###
1717

1818
Projects and usage configurations.
1919

2020
### See Also ###
2121

22+
* [linkgroups](linkgroups.md)
2223
* [usage](usage.md)

0 commit comments

Comments
 (0)