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

[CI] - problem building on Visual Studio 2022 Preview v17.13.0 Preview 4.0 #37199

Closed
mikeclayton opened this issue Jan 31, 2025 · 4 comments
Closed
Labels
Issue-Bug Something isn't working Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams Resolution-Already Fixed/Doesn't Apply A change in the product has made the issue obsolete.

Comments

@mikeclayton
Copy link
Contributor

Microsoft PowerToys version

main

Installation method

GitHub

Running as admin

None

Area(s) with issue?

General

Steps to reproduce

Trying to build the main branch of the PowerToys solution in Visual Studio 2022 Preview v17.13.0 Preview 4.0 results in the following errors from the ApplicationUpdate project:

Image

Severity Code Description Project File Line Suppression State
Error C2039 'make_unexpected': is not a member of 'nonstd' ApplicationUpdate C:\src\github\microsoft\PowerToys\src\common\updating\updating.cpp 90
Error C3861 'make_unexpected': identifier not found ApplicationUpdate C:\src\github\microsoft\PowerToys\src\common\updating\updating.cpp 90
Error C2039 'make_unexpected': is not a member of 'nonstd' ApplicationUpdate C:\src\github\microsoft\PowerToys\src\common\updating\updating.cpp 142
Error C3861 'make_unexpected': identifier not found ApplicationUpdate C:\src\github\microsoft\PowerToys\src\common\updating\updating.cpp 142
Error C2672 'std::experimental::coroutine_traits<std::future<std::expectedupdating::github_version_info,std::wstring>,bool>::promise_type::return_value': no matching overloaded function found ApplicationUpdate C:\src\github\microsoft\PowerToys\src\common\updating\updating.cpp 90
Error C2672 'std::experimental::coroutine_traits<std::future<std::expectedupdating::github_version_info,std::wstring>,bool>::promise_type::return_value': no matching overloaded function found ApplicationUpdate C:\src\github\microsoft\PowerToys\src\common\updating\updating.cpp 142

Building the same solution in Microsoft Visual Studio Professional 2022 v17.12.4 works fine by comparison.

To reproduce:

Note that the errors disappear if you subsequently build the solution in Microsoft Visual Studio Professional 2022 v17.12.4. However if you perform a "clean" on the ApplicationUpdate project and try to build it again in Preview v17.13.0 Preview 4.0 the error reappears.

I'm not a C / C++ dev so I'm struggling to find a root cause or fix (other than the build in Pro first and then switch back to Preview), but it looks like it's related to the expected-lite submodule - possibly compatibility with different versions of MSVC compiler?

In VS Pro 17.12.4 the version of MSVC in "detailed" build logs is 14.42.34433 (C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.42.34433\bin\HostX64\x64\CL.exe), but in VS 17.13.0 Preview 4,0 it's 14.43.34808 (C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.43.34808\bin\HostX64\x64\CL.exe) - I'm not sure if that's relevant though.

✔️ Expected Behavior

Build completes successfully in Visual Studio 2022 Preview v17.13.0 Preview 4.0

❌ Actual Behavior

Build fails with above errors.

Other Software

No response

@mikeclayton mikeclayton added Issue-Bug Something isn't working Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams labels Jan 31, 2025
Copy link

We've found some similar issues:

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

@mikeclayton
Copy link
Contributor Author

The "similar issue above" is similar in that it's a build issue with a Preview version of Visual Studio but I suspect the root cause is different this time.

@LNKLEO
Copy link
Contributor

LNKLEO commented Feb 6, 2025

Image

looked inside the header file, after may be 17.16 preview 2? MSVC begin to provide C++23 std::excepted with <excepted>, and excepted-lite will check this, and take it as default

Image

just change C++ standard to C++20, before C++23 std::excepted fully developed

@LNKLEO
Copy link
Contributor

LNKLEO commented Feb 6, 2025

Image

looked inside the header file, after may be 17.16 preview 2? MSVC begin to provide C++23 std::excepted with , and excepted-lite will check this, and take it as default

Image

just change C++ standard to C++20, before C++23 std::excepted fully developed

after a deep research, MSVC introduce C++ <excepted> beginning from 17.3/MSVC 14.33 (or 1933), the problem is that expected-lite constructing a excepted/unexpected with a make_XXX() function, but ISO C++ standard using a constructor without provide a make_XXX() func.

and I have make a PR for this compatibility

@jaimecbernardo jaimecbernardo added the Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release. label Feb 12, 2025
@jaimecbernardo jaimecbernardo added this to the PowerToys 0.89 milestone Feb 12, 2025
@cinnamon-msft cinnamon-msft added Resolution-Already Fixed/Doesn't Apply A change in the product has made the issue obsolete. and removed Resolution-Fix Committed Fix is checked in, but it might be 3-4 weeks until a release. labels Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug Something isn't working Needs-Triage For issues raised to be triaged and prioritized by internal Microsoft teams Resolution-Already Fixed/Doesn't Apply A change in the product has made the issue obsolete.
Projects
None yet
Development

No branches or pull requests

4 participants