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

Restore VS2022 support #13524

Merged
merged 7 commits into from
Mar 24, 2022
Merged

Restore VS2022 support #13524

merged 7 commits into from
Mar 24, 2022

Conversation

LeonarddeR
Copy link
Collaborator

@LeonarddeR LeonarddeR commented Mar 22, 2022

Link to issue number:

Fix-up of #13387
Fixes #13033

Summary of the issue:

Pr #13387 introduced support for custom UIA extensions, there by using the Microsoft UIA Automation remote operations library. This pr disabled building support for Visual Studio 2022. This has now been solved.

Description of how this pull request fixes the issue:

Fixes build on Visual Studio 2022 by ensuring that the windir environment variable is available. This should eventually be fixed in scons itself, though there's a note in their source code stating that adding environment variables to the basic set that's imported from os.environ should be considered very carefully.

Testing strategy:

Ensured NVDA builds with Visual Studio 2022 and runs properly.

Known issues with pull request:

I tried overriding the platform toolset defined in the vcxproj files with the current toolset as used by SCons for everything else. This would ensure that Visual Studio 2022 uses the V143 toolset (i.e. it would no longer require an explicit install of V142), whereas an update of the UIA libraries that would update the projects to the V143 wouldn't break our build on VS2019. It looks like essential parts of WinRT are also built with VS2019 and therefore this trategy might work, but results in a much slower build. Therefore I explicitly noted the requirement of the V142 (2019) toolset on vs 2022.

Change log entries:

For Developers

Code Review Checklist:

  • Pull Request description:
    • description is up to date
    • change log entries
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • API is compatible with existing add-ons.
  • Documentation:
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English

@LeonarddeR LeonarddeR requested a review from a team as a code owner March 22, 2022 18:22
@seanbudd
Copy link
Member

@michaelDCurran - any idea on a testing strategy here?

@LeonarddeR
Copy link
Collaborator Author

As far as I know, the only differences in code between the situation before and after this pr consist of review actions by @michaelDCurran on microsoft/Microsoft-UI-UIAutomation#84

@LeonarddeR LeonarddeR changed the title UIA Remote operations library back to upstream UIA Remote operations library back to upstream and restore VS2022 builds Mar 23, 2022
@LeonarddeR
Copy link
Collaborator Author

The fact that I required Visual Studio 2019 on both my systems while I am using VS2022 for personal work really frustrated me. After several hours of research, I found the solution 🙌🏻 It's now part of this pr as well.

Copy link
Member

@michaelDCurran michaelDCurran left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would much prefer that these were two separate PRs.
May I suggest you keep this one for reintroducing support for VS 2022, and move the submodule change to a separate pr.
However, it is worth noting that I have several PRs open on microsoft/microsoft-ui-uiautomation so there may be future points where my fork is still necessary. At very least, the pr to switch the submodule is perhaps not as urgent or necessary for wide testing as the reintroduction of VS 2022.
But, I'm really glad you were able to track down the issue :)

sconstruct Outdated
@@ -125,7 +125,7 @@ env = Environment(variables=vars,HOST_ARCH='x86',tools=[
# Specifically request to use Visual Studio 2019 (MSVC 14.2).
# This will ensure that this specific version is selected if there are multiple versions installed,
# And fail the build if this version is not installed at all.
env.SetDefault(MSVC_VERSION='14.2')
#env.SetDefault(MSVC_VERSION='14.2')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please delete this line and the comment above.
But, we should also reintroduce code into nvdaHelper/archBuild_sconscript to ensure the chosen msvc version is 14.2 or higher.

@LeonarddeR LeonarddeR changed the title UIA Remote operations library back to upstream and restore VS2022 builds Restore VS2022 support Mar 24, 2022
@LeonarddeR
Copy link
Collaborator Author

@michaelDCurran Thanks, I addressed your comments.

@michaelDCurran michaelDCurran merged commit 7f53efd into nvaccess:master Mar 24, 2022
@nvaccessAuto nvaccessAuto added this to the 2022.2 milestone Mar 24, 2022
@michaelDCurran
Copy link
Member

michaelDCurran commented Oct 11, 2022 via email

@seanbudd
Copy link
Member

@michaelDCurran - is this the right issue/PR? do we need to (re)open an issue?

@michaelDCurran
Copy link
Member

michaelDCurran commented Oct 12, 2022

@seanbudd Err, certainly is not related to this pr. In fact, I tracked down that comment of mine... it was on pr #13524 on March 23. I have no idea why it shows up here and says it was sent 17 hours ago. Based on other github eails in the last 12 hours seeming to be on old issues... something might be up with Github and timestamps... Very odd.

@michaelDCurran
Copy link
Member

Oh... it is the right pr number, just the wrong date.

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.

Support building with Visual Studio 2022
4 participants