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

Stabilize vs and vsxmake project generation #2959 #2971

Merged
merged 12 commits into from
Oct 26, 2022
Merged

Stabilize vs and vsxmake project generation #2959 #2971

merged 12 commits into from
Oct 26, 2022

Conversation

waruqi
Copy link
Member

@waruqi waruqi commented Oct 24, 2022

@waruqi waruqi changed the base branch from master to dev October 24, 2022 13:00
@SirLynix
Copy link
Member

SirLynix commented Oct 24, 2022

lynix@SirDesktop:/mnt/c/Projets/Perso/NazaraNext/ShaderLang$ xmake.exe project -k vsxmake -a x86,x64
checking for Microsoft Visual Studio (x64) version ... 2022
checking for coverage.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for coverage.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for tsan.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for tsan.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for ubsan.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for ubsan.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for release.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for release.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for debug.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for debug.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for asan.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for asan.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for releasedbg.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for releasedbg.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
create ok!
lynix@SirDesktop:/mnt/c/Projets/Perso/NazaraNext/ShaderLang$ git.exe add * && git.exe commit -m "temp"
The following paths are ignored by one of your .gitignore files:
build
hint: Use -f if you really want to add them.
hint: Turn this message off by running
hint: "git config advice.addIgnoredFile false"
lynix@SirDesktop:/mnt/c/Projets/Perso/NazaraNext/ShaderLang$ git.exe diff
lynix@SirDesktop:/mnt/c/Projets/Perso/NazaraNext/ShaderLang$ xmake.exe project -k vsxmake -a x86,x64 && git.exe diff
checking for Microsoft Visual Studio (x64) version ... 2022
checking for debug.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for debug.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for tsan.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for tsan.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for release.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for release.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for coverage.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for coverage.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for releasedbg.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for releasedbg.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for ubsan.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for ubsan.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for asan.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for asan.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
create ok!
diff --git a/vsxmake2022/NZSL.sln b/vsxmake2022/NZSL.sln
index 8430b36..11f3ed1 100644
--- a/vsxmake2022/NZSL.sln
+++ b/vsxmake2022/NZSL.sln
@@ -37,30 +37,30 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Properties", "Properties",
 EndProject
 Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
-               coverage|x86 = coverage|x86
+               debug|x86 = debug|x86
                tsan|x86 = tsan|x86
-               ubsan|x86 = ubsan|x86
                release|x86 = release|x86
-               debug|x86 = debug|x86
-               asan|x86 = asan|x86
+               coverage|x86 = coverage|x86
                releasedbg|x86 = releasedbg|x86
-               coverage|x64 = coverage|x64
+               ubsan|x86 = ubsan|x86
+               asan|x86 = asan|x86
+               debug|x64 = debug|x64
                tsan|x64 = tsan|x64
-               ubsan|x64 = ubsan|x64
                release|x64 = release|x64
-               debug|x64 = debug|x64
-               asan|x64 = asan|x64
+               coverage|x64 = coverage|x64
                releasedbg|x64 = releasedbg|x64
+               ubsan|x64 = ubsan|x64
+               asan|x64 = asan|x64
        EndGlobalSection
...

mode isn't sorted/stable.

@waruqi
Copy link
Member Author

waruqi commented Oct 24, 2022

I know, it still in progress

@waruqi
Copy link
Member Author

waruqi commented Oct 25, 2022

lynix@SirDesktop:/mnt/c/Projets/Perso/NazaraNext/ShaderLang$ xmake.exe project -k vsxmake -a x86,x64
checking for Microsoft Visual Studio (x64) version ... 2022
checking for coverage.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for coverage.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for tsan.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for tsan.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for ubsan.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for ubsan.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for release.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for release.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for debug.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for debug.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for asan.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for asan.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for releasedbg.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for releasedbg.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
create ok!
lynix@SirDesktop:/mnt/c/Projets/Perso/NazaraNext/ShaderLang$ git.exe add * && git.exe commit -m "temp"
The following paths are ignored by one of your .gitignore files:
build
hint: Use -f if you really want to add them.
hint: Turn this message off by running
hint: "git config advice.addIgnoredFile false"
lynix@SirDesktop:/mnt/c/Projets/Perso/NazaraNext/ShaderLang$ git.exe diff
lynix@SirDesktop:/mnt/c/Projets/Perso/NazaraNext/ShaderLang$ xmake.exe project -k vsxmake -a x86,x64 && git.exe diff
checking for Microsoft Visual Studio (x64) version ... 2022
checking for debug.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for debug.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for tsan.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for tsan.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for release.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for release.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for coverage.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for coverage.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for releasedbg.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for releasedbg.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for ubsan.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for ubsan.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for asan.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for asan.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
create ok!
diff --git a/vsxmake2022/NZSL.sln b/vsxmake2022/NZSL.sln
index 8430b36..11f3ed1 100644
--- a/vsxmake2022/NZSL.sln
+++ b/vsxmake2022/NZSL.sln
@@ -37,30 +37,30 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Properties", "Properties",
 EndProject
 Global
        GlobalSection(SolutionConfigurationPlatforms) = preSolution
-               coverage|x86 = coverage|x86
+               debug|x86 = debug|x86
                tsan|x86 = tsan|x86
-               ubsan|x86 = ubsan|x86
                release|x86 = release|x86
-               debug|x86 = debug|x86
-               asan|x86 = asan|x86
+               coverage|x86 = coverage|x86
                releasedbg|x86 = releasedbg|x86
-               coverage|x64 = coverage|x64
+               ubsan|x86 = ubsan|x86
+               asan|x86 = asan|x86
+               debug|x64 = debug|x64
                tsan|x64 = tsan|x64
-               ubsan|x64 = ubsan|x64
                release|x64 = release|x64
-               debug|x64 = debug|x64
-               asan|x64 = asan|x64
+               coverage|x64 = coverage|x64
                releasedbg|x64 = releasedbg|x64
+               ubsan|x64 = ubsan|x64
+               asan|x64 = asan|x64
        EndGlobalSection
...

mode isn't sorted/stable.

try it again

@waruqi waruqi marked this pull request as ready for review October 25, 2022 01:31
@SirLynix
Copy link
Member

Modes still aren't stable.
We can make them stable by changing target:orderules()

-- get target ordered rules
function _instance:orderules()
    local rules = self._RULES
    local orderules = self._ORDERULES
    if orderules == nil and rules then
        orderules = {}
        local rulerefs = {}
        for _, r in pairs(rules) do
            instance_deps.sort_deps(rules, orderules, rulerefs, r)
        end
        self._ORDERULES = orderules
    end
    return orderules
end

=>

        for _, r in table.orderpairs(rules) do

with this change applied I still however get an unstable generation on run envs:

lynix@SirDesktop:/mnt/c/Projets/Perso/NazaraNext/ShaderLang$ xmake.exe project -k vsxmake -a x86,x64 && git.exe diff
checking for Microsoft Visual Studio (x64) version ... 2022
checking for asan.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for asan.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for coverage.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for coverage.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for debug.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for debug.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for release.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for release.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for releasedbg.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for releasedbg.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for tsan.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for tsan.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for ubsan.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for ubsan.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
create ok!
diff --git a/vsxmake2022/UnitTests/UnitTests.vcxproj b/vsxmake2022/UnitTests/UnitTests.vcxproj
index a35ad65..51d4708 100644
--- a/vsxmake2022/UnitTests/UnitTests.vcxproj
+++ b/vsxmake2022/UnitTests/UnitTests.vcxproj
@@ -98,7 +98,7 @@ xmake version 2.7.2+HEAD.d88193698
     <XmakeCudaVersion><!-- nil --></XmakeCudaVersion>
     <XmakeWindowsSdkVersion><!-- nil --></XmakeWindowsSdkVersion>
     <XmakeMfcKind><!-- nil --></XmakeMfcKind>
-    <XmakeRunEnvs>PATH=C:\Users\lynix\AppData\Local\.xmake\packages\c\catch2\3.1.0\486934a359df43199b2cf27bc32a83fd\lib;C:\Users\lynix\AppData\Local\.xmake\packages\g\glslang\1.3.211+0\cab6a03222c247638805d5c8095596f3\lib;C:\Users\lynix\AppData\Local\.xmake\packages\s\spirv-tools\2022.2\cf50b974f2bc450b9ce49668b310f037\lib;C:\Users\lynix\AppData\Local\.xmake\packages\f\fmt\9.1.0\f4b9d4bd44c8438aaa4ce4a53d77a5a3\lib;C:\Users\lynix\AppData\Local\.xmake\packages\t\tiny-process-library\v2.0.4\c3979315e80e4251ac02c53aabbc47d0\lib;C:\Users\lynix\AppData\Local\.xmake\packages\s\spirv-tools\2022.2\cf50b974f2bc450b9ce49668b310f037\bin;C:\Users\lynix\AppData\Local\.xmake\packages\c\cmake\3.24.2\5430022e3acc47008f94857b498c53c6\bin;C:\Users\lynix\AppData\Local\.xmake\packages\p\python\3.10.6\4e45e074b41644f89c52050475514edb\bin;C:\Users\lynix\AppData\Local\.xmake\packages\p\python\3.10.6\4e45e074b41644f89c52050475514edb\Scripts;C:\Users\lynix\AppData\Local\.xmake\packages\s\spirv-headers\1.3.211+0\efd85152e4af4959928925c5d7fed1f5\bin;C:\Users\lynix\AppData\Local\.xmake\packages\f\fmt\9.1.0\f4b9d4bd44c8438aaa4ce4a53d77a5a3\bin;C:\Users\lynix\AppData\Local\.xmake\packages\n\nazarautils\2022.10.08\ce56447002a4472699972da4b3ef336e\bin;C:\Users\lynix\AppData\Local\.xmake\packages\g\glslang\1.3.211+0\cab6a03222c247638805d5c8095596f3\bin;C:\Users\lynix\AppData\Local\.xmake\packages\t\tiny-process-library\v2.0.4\c3979315e80e4251ac02c53aabbc47d0\bin;C:\Users\lynix\AppData\Local\.xmake\packages\c\catch2\3.1.0\486934a359df43199b2cf27bc32a83fd\bin;C:\Users\lynix\AppData\Local\.xmake\packages\f\fast_float\v3.5.1\2008e12e98c544ffa115da771f42eb00\bin;C:\Users\lynix\AppData\Local\.xmake\packages\f\frozen\1.1.1\d7900ab5a89945f3bfee8bec0d5dd96c\bin;C:\Users\lynix\AppData\Local\.xmake\packages\e\efsw\1.1.0\a2c849dd79ef44388808179a94c191be\bin;C:\Users\lynix\AppData\Local\.xmake\packages\o\ordered_map\v1.0.0\6087f1d45e114b269a57cd3159ef180b\bin;C:\Users\lynix\AppData\Local\.xmake\packages\c\cxxopts\v3.0.0\eee03262b5e54534b8251151320e63ac\bin;C:\Users\lynix\AppData\Local\.xmake\packages\n\nlohmann_json\v3.11.2\7efb49bace6e4bf2a9a9013e86f776ee\bin;$([System.Environment]::GetEnvironmentVariable('PATH'))
+    <XmakeRunEnvs>PATH=C:\Users\lynix\AppData\Local\.xmake\packages\c\catch2\3.1.0\486934a359df43199b2cf27bc32a83fd\lib;C:\Users\lynix\AppData\Local\.xmake\packages\g\glslang\1.3.211+0\cab6a03222c247638805d5c8095596f3\lib;C:\Users\lynix\AppData\Local\.xmake\packages\s\spirv-tools\2022.2\cf50b974f2bc450b9ce49668b310f037\lib;C:\Users\lynix\AppData\Local\.xmake\packages\f\fmt\9.1.0\f4b9d4bd44c8438aaa4ce4a53d77a5a3\lib;C:\Users\lynix\AppData\Local\.xmake\packages\t\tiny-process-library\v2.0.4\c3979315e80e4251ac02c53aabbc47d0\lib;C:\Users\lynix\AppData\Local\.xmake\packages\t\tiny-process-library\v2.0.4\c3979315e80e4251ac02c53aabbc47d0\bin;C:\Users\lynix\AppData\Local\.xmake\packages\c\cmake\3.24.2\5430022e3acc47008f94857b498c53c6\bin;C:\Users\lynix\AppData\Local\.xmake\packages\c\catch2\3.1.0\486934a359df43199b2cf27bc32a83fd\bin;C:\Users\lynix\AppData\Local\.xmake\packages\s\spirv-tools\2022.2\cf50b974f2bc450b9ce49668b310f037\bin;C:\Users\lynix\AppData\Local\.xmake\packages\p\python\3.10.6\4e45e074b41644f89c52050475514edb\bin;C:\Users\lynix\AppData\Local\.xmake\packages\p\python\3.10.6\4e45e074b41644f89c52050475514edb\Scripts;C:\Users\lynix\AppData\Local\.xmake\packages\s\spirv-headers\1.3.211+0\efd85152e4af4959928925c5d7fed1f5\bin;C:\Users\lynix\AppData\Local\.xmake\packages\f\fmt\9.1.0\f4b9d4bd44c8438aaa4ce4a53d77a5a3\bin;C:\Users\lynix\AppData\Local\.xmake\packages\n\nazarautils\2022.10.08\ce56447002a4472699972da4b3ef336e\bin;C:\Users\lynix\AppData\Local\.xmake\packages\g\glslang\1.3.211+0\cab6a03222c247638805d5c8095596f3\bin;C:\Users\lynix\AppData\Local\.xmake\packages\f\fast_float\v3.5.1\2008e12e98c544ffa115da771f42eb00\bin;C:\Users\lynix\AppData\Local\.xmake\packages\o\ordered_map\v1.0.0\6087f1d45e114b269a57cd3159ef180b\bin;C:\Users\lynix\AppData\Local\.xmake\packages\f\frozen\1.1.1\d7900ab5a89945f3bfee8bec0d5dd96c\bin;C:\Users\lynix\AppData\Local\.xmake\packages\e\efsw\1.1.0\a2c849dd79ef44388808179a94c191be\bin;C:\Users\lynix\AppData\Local\.xmake\packages\n\nlohmann_json\v3.11.2\7efb49bace6e4bf2a9a9013e86f776ee\bin;C:\Users\lynix\AppData\Local\.xmake\packages\c\cxxopts\v3.0.0\eee03262b5e54534b8251151320e63ac\bin;$([System.Environment]::GetEnvironmentVariable('PATH'))

it seems pkgs:orderkeys() doesn't work well, I added a log in core/project/target.lua (on ligne 983 in target:pkgsenvs)

        for _, dep in ipairs(self:orderdeps()) do
            print("dep: " .. dep:name())
            for _, pkgname in ipairs(table.wrap(dep:get("packages", {interface = true}))) do
                local pkg = dep:pkg(pkgname)
                if pkg then
                    pkgs:insert(pkg)
                end
            end
        end
        for _, pkg in pkgs:orderkeys() do
            print("pkg:name() = " .. pkg:name())

and I get this:

lynix@SirDesktop:/mnt/c/Projets/Perso/NazaraNext/ShaderLang$ xmake.exe f
pkg:name() = nazarautils
pkg:name() = fast_float
pkg:name() = fmt
pkg:name() = frozen
pkg:name() = ordered_map
pkg:name() = efsw
dep: nzsl
pkg:name() = nazarautils
pkg:name() = fmt
pkg:name() = nlohmann_json
pkg:name() = cxxopts
dep: nzsl
dep: nzslc
pkg:name() = nazarautils
pkg:name() = glslang
pkg:name() = fmt
pkg:name() = catch2
pkg:name() = spirv-tools
pkg:name() = tiny-process-library
dep: nzsl
pkg:name() = nazarautils
pkg:name() = sfml
lynix@SirDesktop:/mnt/c/Projets/Perso/NazaraNext/ShaderLang$ xmake.exe f
pkg:name() = fmt
pkg:name() = ordered_map
pkg:name() = nazarautils
pkg:name() = frozen
pkg:name() = fast_float
pkg:name() = efsw
dep: nzsl
pkg:name() = fmt
pkg:name() = nazarautils
pkg:name() = cxxopts
pkg:name() = nlohmann_json
dep: nzsl
dep: nzslc
pkg:name() = catch2
pkg:name() = fmt
pkg:name() = spirv-tools
pkg:name() = glslang
pkg:name() = nazarautils
pkg:name() = tiny-process-library
dep: nzsl
pkg:name() = sfml
pkg:name() = nazarautils

to my understanding this is because

function hashset_impl:orderkeys()
    local orderkeys = table.keys(self._DATA)
    table.sort(orderkeys, function (a, b)
        if a == hashset._NIL then
            a = math.inf
        end
        if b == hashset._NIL then
            b = math.inf
        end
        if type(a) == "table" then
            a = tostring(a)
        end
        if type(b) == "table" then
            b = tostring(b)
        end
        print(a, b)
        return a < b
    end)

sorts two tostring(target) which produces table pointers which are unstable:

table: 000002AB45F3A670 table: 000002AB45F39DB0
table: 000002AB45F3A3B0 table: 000002AB45F39DB0
table: 000002AB45F3A670 table: 000002AB45F3A3B0
table: 000002AB45F3AA30 table: 000002AB45F3A3B0
table: 000002AB45F3A3B0 table: 000002AB45F39EB0
table: 000002AB45F3A0B0 table: 000002AB45F3A3B0
table: 000002AB45F3AA30 table: 000002AB45F3A3B0
table: 000002AB45F3A3B0 table: 000002AB45F3A0B0
table: 000002AB45F3A670 table: 000002AB45F3AA30
table: 000002AB45F3A0B0 table: 000002AB45F39DB0
table: 000002AB45F39EB0 table: 000002AB45F39DB0
table: 000002AB45F3A0B0 table: 000002AB45F39EB0

maybe it could take a functor by parameter on how to sort them

function hashset_impl:orderkeys(sort)
    local orderkeys = table.keys(self._DATA)
    table.sort(orderkeys, sort or function (a, b)
for _, pkg in pkgs:orderkeys(function (a, b) return a:name() < b:name() end) do

or maybe using target metatable and __lt metamethod

@waruqi
Copy link
Member Author

waruqi commented Oct 25, 2022

try it again.

@SirLynix
Copy link
Member

I tested vsxmake multiple times and it seems to be stable now.

However vs generator isn't:

lynix@SirDesktop:/mnt/c/Projets/Perso/NazaraNext/ShaderLang$ git.exe add * && git.exe commit -m "temp"
The following paths are ignored by one of your .gitignore files:
build
hint: Use -f if you really want to add them.
hint: Turn this message off by running
hint: "git config advice.addIgnoredFile false"
lynix@SirDesktop:/mnt/c/Projets/Perso/NazaraNext/ShaderLang$ xmake.exe project -k vs -a x86,x64 && git.exe diff
checking for Microsoft Visual Studio (x64) version ... 2022
checking for asan.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for asan.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for coverage.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for coverage.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for debug.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for debug.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for release.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for release.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for releasedbg.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for releasedbg.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for tsan.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for tsan.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for ubsan.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for ubsan.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
create ok!
warning: please use the new vs project generator, .e.g xmake project -k vsxmake
warning: add -v for getting more warnings ..
diff --git a/vs2022/NZSL.sln b/vs2022/NZSL.sln
index 32ac36f..0b1599a 100644
--- a/vs2022/NZSL.sln
+++ b/vs2022/NZSL.sln
@@ -5,11 +5,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nzslc", "nzslc\nzslc.vcxpro
                {DD56632D-6253-4FAD-A0E3-03AD8BBF4C24} = {DD56632D-6253-4FAD-A0E3-03AD8BBF4C24}
        EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sfml-mandelbrot", "sfml-mandelbrot\sfml-mandelbrot.vcxproj", "{F541989E-E0E7-4A99-8498-1706B72387AE}"
-       ProjectSection(ProjectDependencies) = postProject
-               {DD56632D-6253-4FAD-A0E3-03AD8BBF4C24} = {DD56632D-6253-4FAD-A0E3-03AD8BBF4C24}
-       EndProjectSection
-EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnitTests", "UnitTests\UnitTests.vcxproj", "{9E39CC98-3BDD-4797-9E89-3D7B4898D660}"
        ProjectSection(ProjectDependencies) = postProject
                {DD56632D-6253-4FAD-A0E3-03AD8BBF4C24} = {DD56632D-6253-4FAD-A0E3-03AD8BBF4C24}
@@ -18,16 +13,21 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnitTests", "UnitTests\Unit
                {DEAF9C12-99DF-4799-B2F2-EAB7970FB190} = {DEAF9C12-99DF-4799-B2F2-EAB7970FB190}
        EndProjectSection
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sfml-mandelbrot", "sfml-mandelbrot\sfml-mandelbrot.vcxproj", "{F541989E-E0E7-4A99-8498-1706B72387AE}"
+       ProjectSection(ProjectDependencies) = postProject
+               {DD56632D-6253-4FAD-A0E3-03AD8BBF4C24} = {DD56632D-6253-4FAD-A0E3-03AD8BBF4C24}
+       EndProjectSection
+EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nzsl", "nzsl\nzsl.vcxproj", "{DD56632D-6253-4FAD-A0E3-03AD8BBF4C24}"
 EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{A943D6DD-7CEC-4D76-BC34-5560CA130741}"
+EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{7B026F0A-FC52-49CE-BEE4-55948D63B773}"
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{460A93D4-DF39-4533-8291-0AC19689431D}"
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Executables", "Executables", "{088581DD-BA47-4493-9D7B-5ADF58B4C3D7}"
 EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{A943D6DD-7CEC-4D76-BC34-5560CA130741}"

looks like a few table.orderpairs are missing in vs201x_solution.lua too

@waruqi
Copy link
Member Author

waruqi commented Oct 26, 2022

I tested vsxmake multiple times and it seems to be stable now.

However vs generator isn't:

lynix@SirDesktop:/mnt/c/Projets/Perso/NazaraNext/ShaderLang$ git.exe add * && git.exe commit -m "temp"
The following paths are ignored by one of your .gitignore files:
build
hint: Use -f if you really want to add them.
hint: Turn this message off by running
hint: "git config advice.addIgnoredFile false"
lynix@SirDesktop:/mnt/c/Projets/Perso/NazaraNext/ShaderLang$ xmake.exe project -k vs -a x86,x64 && git.exe diff
checking for Microsoft Visual Studio (x64) version ... 2022
checking for asan.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for asan.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for coverage.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for coverage.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for debug.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for debug.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for release.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for release.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for releasedbg.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for releasedbg.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for tsan.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for tsan.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
checking for ubsan.x86 ...
checking for Microsoft Visual Studio (x86) version ... 2022
checking for ubsan.x64 ...
checking for Microsoft Visual Studio (x64) version ... 2022
create ok!
warning: please use the new vs project generator, .e.g xmake project -k vsxmake
warning: add -v for getting more warnings ..
diff --git a/vs2022/NZSL.sln b/vs2022/NZSL.sln
index 32ac36f..0b1599a 100644
--- a/vs2022/NZSL.sln
+++ b/vs2022/NZSL.sln
@@ -5,11 +5,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nzslc", "nzslc\nzslc.vcxpro
                {DD56632D-6253-4FAD-A0E3-03AD8BBF4C24} = {DD56632D-6253-4FAD-A0E3-03AD8BBF4C24}
        EndProjectSection
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sfml-mandelbrot", "sfml-mandelbrot\sfml-mandelbrot.vcxproj", "{F541989E-E0E7-4A99-8498-1706B72387AE}"
-       ProjectSection(ProjectDependencies) = postProject
-               {DD56632D-6253-4FAD-A0E3-03AD8BBF4C24} = {DD56632D-6253-4FAD-A0E3-03AD8BBF4C24}
-       EndProjectSection
-EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnitTests", "UnitTests\UnitTests.vcxproj", "{9E39CC98-3BDD-4797-9E89-3D7B4898D660}"
        ProjectSection(ProjectDependencies) = postProject
                {DD56632D-6253-4FAD-A0E3-03AD8BBF4C24} = {DD56632D-6253-4FAD-A0E3-03AD8BBF4C24}
@@ -18,16 +13,21 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UnitTests", "UnitTests\Unit
                {DEAF9C12-99DF-4799-B2F2-EAB7970FB190} = {DEAF9C12-99DF-4799-B2F2-EAB7970FB190}
        EndProjectSection
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sfml-mandelbrot", "sfml-mandelbrot\sfml-mandelbrot.vcxproj", "{F541989E-E0E7-4A99-8498-1706B72387AE}"
+       ProjectSection(ProjectDependencies) = postProject
+               {DD56632D-6253-4FAD-A0E3-03AD8BBF4C24} = {DD56632D-6253-4FAD-A0E3-03AD8BBF4C24}
+       EndProjectSection
+EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nzsl", "nzsl\nzsl.vcxproj", "{DD56632D-6253-4FAD-A0E3-03AD8BBF4C24}"
 EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{A943D6DD-7CEC-4D76-BC34-5560CA130741}"
+EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Libraries", "Libraries", "{7B026F0A-FC52-49CE-BEE4-55948D63B773}"
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{460A93D4-DF39-4533-8291-0AC19689431D}"
 EndProject
 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Executables", "Executables", "{088581DD-BA47-4493-9D7B-5ADF58B4C3D7}"
 EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{A943D6DD-7CEC-4D76-BC34-5560CA130741}"

looks like a few table.orderpairs are missing in vs201x_solution.lua too

done, try it again.

@waruqi waruqi added this to the v2.7.3 milestone Oct 26, 2022
@SirLynix
Copy link
Member

looks good for .sln, however .vcxproj file list isn't stable, adding

        for sourcefile, sourceinfo in table.orderpairs(sourceinfos) do

in

function _make_source_files(vcxprojfile, vsinfo, target)

(vs201x_vcxproj.lua)

with this, it seems good and ready to be merged 👍

@waruqi
Copy link
Member Author

waruqi commented Oct 26, 2022

I have improved it, try it again?

@SirLynix
Copy link
Member

seems stable now, thanks 👍

@waruqi waruqi merged commit 572663c into dev Oct 26, 2022
@waruqi waruqi deleted the sort branch October 26, 2022 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants