Created noThrow Wrapper for which(), Fixed Arch Map for MSVC#60
Created noThrow Wrapper for which(), Fixed Arch Map for MSVC#60diefbell-grabcad wants to merge 9 commits intoEmbeddedEnterprises:masterfrom
noThrow Wrapper for which(), Fixed Arch Map for MSVC#60Conversation
There was a problem hiding this comment.
pnpm add which@3.0.1 decided it needed to reformat the entire file
There was a problem hiding this comment.
Which then made linting fail 🤦
There was a problem hiding this comment.
Thanks for the change. However, since cmake-ts is a build tool that can be used on older Nodejs to build binaries, we want to keep the code compatible with old versions. Does this update break compatibility?
We can create our own which nothrow, if that's the only reason for the bump. Alternatively, we can add polyfils to maintain compatibility.
Unsure if this breaks cmake/ninja on Windows
which, bumped cmake-ts's versionnoThrow Wrapper for which(), Fixed Arch Map for MSVC
| arm64: "arm64", | ||
| x64: "AMD64", | ||
| ia32: "X86", | ||
| arm64: "ARM64", | ||
| x64: "x64", | ||
| ia32: "Win32", |
There was a problem hiding this comment.
Any reason to change this? I tested it when I created this to make sure it works.
|
@aminya One year later, I've made the change, as requested :') |
I completely forgot about this. Haha. It's great you made the changes. I'll test in the coming days. |
|
I was thinking that we perhaps want to add an MSVC test to the workflows, such as with https://github.com/ilammy/msvc-dev-cmd |
When trying to build
ZeroMQ.js, I got the error[ERROR cmake-ts] Error: not found: ninja. It seems that this is caused by thenothrowoption not being respected herecmake-ts/src/generator.ts
Line 18 in 44d3794
There was some discussion regarding this on the
node-whichrepo, seems the issue is fixed in v3+: npm/node-which#80. However this would require bumping the required Node version.Instead, I've just created a
whichNoThrowfunction to handle catching and returningnull.There was also an issue in
argumentBuilder.tswherecmakeArchMap.win32.x64was mapping incorrectly to"AMD64", but MSVC expects"x64". I'm not sure though if this breaks other Windows build tools... Can check with CI?Please also add into ZeroMQ after merge ^_^