Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure the solution and project file unchanged by sorting those tables #2438

Merged
merged 2 commits into from
Jun 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions xmake/plugins/project/vsxmake/getinfo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,8 @@ function main(outputdir, vsinfo)

-- init groups
local groups, group_deps = _make_vsinfo_groups()
vsinfo.groups = table.keys(groups)
vsinfo.group_deps = table.keys(group_deps)
vsinfo.groups = table.orderkeys(groups)
vsinfo.group_deps = table.orderkeys(group_deps)
vsinfo._groups = groups
vsinfo._group_deps = group_deps

Expand Down Expand Up @@ -518,7 +518,7 @@ function main(outputdir, vsinfo)
_target.filegroups_extraconf = target:extraconf("filegroups")

-- save deps
_target.deps = table.unique(table.join(_target.deps or {}, table.keys(target:deps()), nil))
_target.deps = table.unique(table.join(_target.deps or {}, table.orderkeys(target:deps()), nil))
end
end
end
Expand Down Expand Up @@ -551,7 +551,7 @@ function main(outputdir, vsinfo)
end
end
target._dirs = dirs
target.dirs = table.keys(dirs)
target.dirs = table.orderkeys(dirs)
target._deps = {}
for _, v in ipairs(target.deps) do
target._deps[v] = targets[v]
Expand All @@ -561,7 +561,7 @@ function main(outputdir, vsinfo)
-- we need set startup project for default or binary target
-- @see https://github.com/xmake-io/xmake/issues/1249
local targetnames = {}
for targetname, target in pairs(project.targets()) do
for targetname, target in table.orderpairs(project.targets()) do
if target:get("default") == true then
table.insert(targetnames, 1, targetname)
elseif target:is_binary() then
Expand Down
1 change: 1 addition & 0 deletions xmake/plugins/project/vsxmake/vsxmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ function _filter_files(files, includeexts, excludeexts)
table.insert(f, file)
end
end
table.sort(f)
return f
end

Expand Down