Page MenuHomePhabricator

[windows] override C++20 and upgrade nan package
ClosedPublic

Authored by varun on Aug 6 2024, 6:16 PM.
Tags
None
Referenced Files
F2772110: D13004.id43209.diff
Fri, Sep 20, 12:34 AM
F2772039: D13004.id43195.diff
Fri, Sep 20, 12:28 AM
Unknown Object (File)
Fri, Sep 6, 11:52 PM
Unknown Object (File)
Fri, Sep 6, 11:52 PM
Unknown Object (File)
Fri, Sep 6, 11:52 PM
Unknown Object (File)
Fri, Sep 6, 11:40 PM
Unknown Object (File)
Thu, Sep 5, 3:05 AM
Unknown Object (File)
Sun, Sep 1, 8:39 AM
Subscribers

Details

Summary

We specify C++17 to override the default C++ edition for Visual Studio, C++20, which is not compatible with ZW. Additionally, the addon needs a newer version of the nan package to compile.

Test Plan

able to build the windows push notifications addon now

Diff Detail

Repository
rCOMM Comm
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

varun requested review of this revision.Aug 6 2024, 6:33 PM
ashoat added inline comments.
desktop/addons/windows-pushnotifications/binding.gyp
26

Did we confirm this was necessary after we upgraded nan? Want to make sure it’s necessary… would rather have fewer config options if they’re not necessary

This revision is now accepted and ready to land.Aug 6 2024, 6:37 PM

realized i forgot to add the lockfile. will update before landing

desktop/addons/windows-pushnotifications/binding.gyp
26

we need both. the build fails with the "incompatibility between c++20 and ZW" error otherwise

yarn.lock
17858 ↗(On Diff #43209)

Looks like these dependencies are for fsevents and macos-alias, which are still using the old nan:

  • macos-alias is used by @electron-forge/maker-dmg, which is used in our electron-forge config
  • Version 1 of fsevents requires nan, but version 2 doesn't. We have dependencies on version 1 due to an old version of Jest that is required by hazel-server (we have the latest version of hazel-server)

Don't think either of those will be affected by the Windows issues we've seen, so we can leave it. But in the future, one thing we could do here would've been to update all of these to 2.20.0, since it looks like it just fixes bugs and shouldn't have negative effects

yarn.lock
17858 ↗(On Diff #43209)

D13012 is this the right way to update all of these to 2.20.0?