Skip to content

Commit

Permalink
Merge pull request #2226 from shuax/dev
Browse files Browse the repository at this point in the history
Improve group name uuid
  • Loading branch information
waruqi authored Mar 30, 2022
2 parents 0dab3ad + 38a8b1b commit 06b374d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions xmake/plugins/project/vstudio/impl/vs201x_solution.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function _make_projects(slnfile, vsinfo)
local group_path = target:get("group")
if group_path then
for _, group_name in ipairs(path.split(group_path)) do
groups[group_name] = hash.uuid4(group_name)
groups[group_name] = hash.uuid4("group." .. group_name)
end
end
end
Expand Down Expand Up @@ -126,14 +126,14 @@ function _make_global(slnfile, vsinfo)
if group_path then
-- target -> group
local group_name = path.filename(group_path)
slnfile:print("{%s} = {%s}", hash.uuid4(targetname), hash.uuid4(group_name))
slnfile:print("{%s} = {%s}", hash.uuid4(targetname), hash.uuid4("group." .. group_name))
-- group -> group -> ...
local group_names = path.split(group_path)
for idx, group_name in ipairs(group_names) do
local key = group_name .. (group_name_sub or "")
local group_name_sub = group_names[idx + 1]
if group_name_sub and not subgroups[key] then
slnfile:print("{%s} = {%s}", hash.uuid4(group_name_sub), hash.uuid4(group_name))
slnfile:print("{%s} = {%s}", hash.uuid4(group_name_sub), hash.uuid4("group." .. group_name))
subgroups[key] = true
end
end
Expand Down
2 changes: 1 addition & 1 deletion xmake/plugins/project/vsxmake/getinfo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ function _make_vsinfo_groups()
for idx, name in ipairs(group_names) do
local group = groups["group." .. name] or {}
group.group = name
group.group_id = hash.uuid4(name)
group.group_id = hash.uuid4("group." .. name)
if idx > 1 then
group_deps["group_dep." .. name] = {current_id = group.group_id, parent_id = hash.uuid4(group_names[idx - 1])}
end
Expand Down

0 comments on commit 06b374d

Please sign in to comment.