-
-
Notifications
You must be signed in to change notification settings - Fork 13
Revert setting of --force-process-config…
#162
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
Conversation
…now that we’re on Electron 30.
|
Honestly, the screwiness of node-gyp, Node and Electron feels like a so-called Mexican standoff at times. This feels very par for the course. Thank you past me for leaving some sort of code comment justifying/contextualizing the I can try and find some time to follow those relatively simple verification steps. |
|
From the Electron 16.0 blog post PR discussion, of all places...: electron/website#143 (comment)
That clarifies which Electron versions are meant by "old." (I don't think I've known that set of version ranges before in my life, despite my past digging around/researching in this space... or if I did know, I've had plenty of time to forget. But anyway!... Found it!) |
The existing dummy native module (spec fixture) exemplifies an extremely basic native module. It doesn't (I invoke the usual incantation "I'm not really that good at C" to ward off nasal demons at this point, for safety's sake. But alas, I [get to / must] deal with C to some extent. And deal with it I will, from time to time. Anyhow.) In conclusion:
|
|
Hey, at least we caught it before 1.131.0 shipped. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested in the manner suggested at the bottom of the PR body.
Confirming the issue: Yep. B0rked without this change.
CXX(target) Release/obj.target/superstring/src/bindings/bindings.o
In file included from ../src/bindings/bindings.cc:1:
In file included from ../src/bindings/marker-index-wrapper.h:1:
In file included from ../../nan/nan.h:56:
/Users/User/.pulsar/.node-gyp/Library/Caches/node-gyp/30.0.9/include/node/node.h:27:2: error: "It looks like you are building this native module without using the right config.gypi. This normally means that you need to update electron-rebuild (>=3.2.8) or node-gyp (>=9.0.0) if you're building modules directly."
#error "It looks like you are building this native module without using the right config.gypi. This normally means that you need to update electron-rebuild (>=3.2.8) or node-gyp (>=9.0.0) if you're building modules directly."
^
In file included from ../src/bindings/bindings.cc:1:
In file included from ../src/bindings/marker-index-wrapper.h:1:
In file included from ../../nan/nan.h:176:
../../nan/nan_callbacks.h:55:23: error: no member named 'AccessorSignature' in namespace 'v8'
typedef v8::Local<v8::AccessorSignature> Sig;
~~~~^
Result: Still some errors with this change (error: no member named 'AccessorSignature' in namespace 'v8'), but no "It looks like you are building this native module without using the right config.gypi. [and so on]".
So, I think this is progress?
(Note: ppm install the second time "succeeds" but probably skips rebuilding packages with partly-built native code stuff. The more clean-slate ppm rebuild still has errors for me.)
I may want to double-check I can actually build something at some point, but github package is a rather heavy test-case, maybe I can find something easier to build...
I hope to give an Approve if I find further success building a package due to this change specifically, or if much time goes by without a chance for me to confirm the fix does/doesn't fully work, given basic indication of it being an improvement, despite my testing hurdles locally.
|
To get |
|
Oh, also: I bet that's related to trying to install old It might be easier to just checkout github#46, since it makes both of these changes. My deepest apologies for not writing better testing instructions. |
|
I for some reason assumed we were stuck on older |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, let's try this again. Round 2, go!
Testing:
-
Confirming the reported issue, again: Checking out pulsar-edit/github#46 and doing
rm -rf node_modulesandppm installwithout this fix:- It no work. Error is long but includes the "[not] using the right config.gypi" part as expected.
-
Manually applying this fix as mentioned in this PR's body text, then
rm -rf node_modulesandppm install:- It work! 🎉
Conclusion:
LGTM! 👍 It fixes the thing. This appears consistent with the lore (ancient Electron blog post discussions).
Thank you for digging into the weeds and finding the fix for this one!! Much appreciated!
|
Nothing else needed on this and I confirmed it can help, and seems consistent with explanations I could find on upstream projects, so, merging! Thanks again! 🙇 |
…now that we’re on Electron 30.
This is the result of an afternoon-long investigation trying to determine why
ppm installdidn't work right in CI for thegithubrepo. Turns out it doesn't work right on my local machine, either!ppmis using Node 20.11.1 to match the version that Electron 30.0.9 runs. But Node'snode_module_versionfor 20.11.1 is115, whereas Electron's is123. So our usage offorce-process-config(inheritingnode-gypconfiguration fromprocess.configrather than from$nodedir/include/node/config.gypi) was leading to a version mismatch and this error:All this goes away if we remove the
force-process-configoption. (Thegithubpackage needs further massaging for CI to work properly, but that's another story.)Usage of this option was introduced in #79 and was documented properly in the code:
The PR in question explains that “old” Electron versions would still need
--force-process-configto betrueso as to work around “a malformedconfig.gypi.” I don't know exactly how to define “old” in this context, but I take it to mean that any version of Electron newer than that PR itself (from September 2021) would not fall under that definition. Our Electron is certainly newer than that, so that's further confirmation that removing this option is the correct thing to do.I don't know why having this option set didn't result in errors in the spec suite. But you can test this change the same way I did:
ppmdirectory within your Pulsar installationsrc/command.jsand remove the two usages offorce_process_configtemporarilygithubrepo,cdto its root, and runppm installAnnoyingly, this is now probably a must-land before 1.131.0. But once this gets approved I can bump the
ppmwe use in Pulsar and put out a new rolling release.