-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
doc: add note to ninjia build for macOS using -jn flag #53187
Merged
nodejs-github-bot
merged 2 commits into
nodejs:main
from
jakecastelli:add-note-to-ninjia-build-for-macos
May 30, 2024
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
If
JOBS=n
works for allmake
versions, why don’t we just change the docs to recommend it as the only solution? It’s much more straightforward than telling people to upgrade theirmake
.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.
IMO I guess it would be better to leave people with options that they can choose? e.g. some people may have already used to the
make -jn
and wanna keep using it across Linux and Mac.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.
What's the advantage of listing both options if they do the same thing?
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.
make -jn
is a widely used convention and shorter to type than settingJOBS
. Also, if one accidentally mistyped-jn
, there will almost certainly be an error, whereas mistyping the name of a variable usually doesn't even give a warning.I don't know why Apple ships an ancient version of
make
by default, but it seems that upgrading it is easy enough.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.
I upgraded it via brew and I still got the error. Switching to the variable worked for me. Presumably the upgrade didn't put the new version in my path or something but I didn't dig into it.
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.
So essentially the instructions are:
The second option is so complex that I don’t really see the point in mentioning it?
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.
Honestly it's up to Apple to provide their users with a version of
make
that isn't old enough to vote in most countries.As long as they don't, we can — and probably should — give users both options. Clearly, there is an expectation among contributors that
-jn
should work, and it can.If you think the details of upgrading to a version of
make
from the last decade are too complex/verbose, we can probably omit those and just say "please upgrade to version 4 of GNU make" as option two.In any case, if probably doesn't hurt to make
does not work
a hyperlink to the issue that Yagiz created so that readers can find plenty of context there.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.
I also don’t understand how this broke. I’ve used
-j8
for years on Mac and it was only recently that it started erroring for me, and fortunately I happened to find this PR. So I’m all for updating the instructions, but did we change something recently that requires a newermake
? If so, is this the only thing that’s broken in the oldmake
or should we do some kind of check that users are runningmake
4+?If using the old
make
is okay, I would update all the places we currently mention-jN
to instead beJOBS=N
and then add a note like “If you are using a current version ofmake
, which is likely for most Linux OSes but currently not for macOS, you can replaceJOBS=N
with-jN
.” As in, we should default to the instruction that should work for everyone.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.
FWIW I installed an up-to-date version using Nix, I had to restart my shell and it worked fine. I'm -1 on Goeffrey's proposal, I agree with Tobias it's up to the user to use an up-to-date version of
make
. If it's upgrading is too complicated, not passing-j
is also an option – and you'd get the same behavior as before – and also building with ninja is not the default.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.
The sad story is that
-jn
may never have truly worked. see #53176 (comment),#53176 (comment),
#53176 (comment).
(the tldr is that I have tested on the previous "working" version and found the
-jn
was not being propagated)