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

Documented basic options, and small cleanups #880

Closed
wants to merge 3 commits into from

Conversation

hintjens
Copy link

Also added --mklocal as a workaround for GYP issue #508.

Reading the code to get command options isn't a problem for anyone
familiar with the tool yet it's a hurdle for beginners.

Solution: document the most common options. We can extend this list
over time.
Solution: document --loglevel=silent and add --silent shortcut
for consistency.

(I did not see any existing regression tests for options so it's
unclear to me where to add a regression test for this... sorry.)
It's unclear why we'd need an explicit option for this, as it's
the default setting. Presumably to allow Release/Debug to be passed
to node-gyp. If so, we need to document it.

Solution: document this option.
@bnoordhuis
Copy link
Member

The first three commits LGTM. The fourth one seems like a subtle change in behavior: it's possible (but for most people not very useful) to have configurations beside Debug and Release. The last commit is one that, if it can be fixed upstream, it should be.

Apropos the commit logs: we use imperative style, e.g. Document command line options. instead of Problem: command options aren't documented.

@hintjens
Copy link
Author

The last commit should be fixed upstream, and I've reported it, but even if that happens we're stuck with gyp installations all over the place and how long before this change makes it into stable packages... right now the behavior of node-gyp with gyp dependencies is so erratic that IMO node-gyp benefits by protecting its users from this.

@hintjens
Copy link
Author

Do you have a CONTRIBUTING.md with guidelines for commits and pull requests? That would be helpful. I looked for something, did not find it.

@bnoordhuis
Copy link
Member

The last commit should be fixed upstream, and I've reported it, but even if that happens we're stuck with gyp installations all over the place and how long before this change makes it into stable packages...

That's not an issue for node-gyp because we bundle gyp. When the fix lands upstream, I can upgrade the bundled copy or cherry-pick the fix.

Do you have a CONTRIBUTING.md with guidelines for commits and pull requests?

Um, I thought we did... but looks like we don't. Filed #881.

@hintjens
Copy link
Author

Ah, OK, that is neat. I'm not sure I'm ready to start hacking on gyp though. What's your experience with fixes in gyp? If you're pessimistic they'll fix it soon then I'll see what I can do.

@hintjens
Copy link
Author

FWIW I think --mklocal is useful in any case, as it makes node-gyp work the same way as gyp, with makefiles in the working directory. That makes things simpler on Windows IME.

@bnoordhuis
Copy link
Member

What's your experience with fixes in gyp?

They're pretty responsive (they're quicker with reviews than I am with updating the CL) but you'll have to get used to Google's way of doing code reviews (depot_tools, git-cl, rietveld.)

FWIW I think --mklocal is useful in any case, as it makes node-gyp work the same way as gyp, with makefiles in the working directory.

I see you've removed the commit but IIRC, it only touched the configure step, didn't it? The build step will try to invoke make -C build and fail.

@hintjens
Copy link
Author

I'd changed both the configure and build steps, and have that change on a branch so if we need to we can still use it. I'm skeptical that gyp upstream will take this problem seriously, so I may come back with a "pretty please," or better argumentation.

@rvagg
Copy link
Member

rvagg commented Feb 14, 2016

Thanks @hintjens. I'm fine with this as it is now, pretty minimal. Would you mind lining up the table separators to make it consistent with the previous table?

Re contributing, we've recently been adopting the same style as Node core, most relevant section is here: https:/nodejs/node/blob/master/CONTRIBUTING.md#step-3-commit minus the need for a subsystem, so in terms of this PR, you could squash the commits down to a single commit and adopt @bnoordhuis' suggestion for summary it should be good to go.

@rvagg
Copy link
Member

rvagg commented Feb 15, 2016

Re squashing, I think that should probably be 2 commits, one for adding new functionality and one for adding docs.

@tomjakubowski
Copy link

It might be worth noting that some commands also accept trailing -- [args] options to pass on to the tool invoked by the command. For example, I use node-gyp configure -- -f ninja to ask gyp to produce Ninja files for use with rtags.

@hintjens
Copy link
Author

This is a lot of talk for minor documentation fixes.

At this stage, I can't even use node-gyp properly without the --mklocal patch. That means I'm looking to either fork it (and fix it) or write another tool that doesn't depend on gyp.

@rvagg with all respect, to ask me to align those columns (obviously I already did, except for the long options as that would make the table unusably wide) and reworking into different sized commits (I've already reworked the commits more than once) is a poor thank you. I'm more than happy to polish the docs and help make node-gyp really shiny, except not like this. Your project doesn't even have written rules, until I asked for them.

To enforce unwritten rules and stifle new contributors in discussion over trivial issues is sure way to kill a project. Is there any technical reason you couldn't merge the patches, and then improve them?

@bnoordhuis
Copy link
Member

Is there any technical reason you couldn't merge the patches, and then improve them?

Not a technical reason but a social one: it's easier for us maintainers to get it right from the start than trying to fix things up post facto (if for no other reason that it's probably forgotten about.)

I know you work on 0mq and that's a pretty busy project in its own right, but you may underestimate the amount of churn, issues and pull requests we work through each day. Just GH notifications alone are 50 to 200 emails every day (and I do try to keep track of them all.)

All that aside, I'm fine with the changes but can you squash and reword the commit log? Cheers!

@hintjens
Copy link
Author

I appreciate the work you do. Yet this morning I forked node-gyp to node-ninja and will take it from there. I need to improve the native toolchain significantly, bring in a lot of new contributors, and it's not plausible using this process. There are reasons I can do 10-20 commits a day to different projects, while patches flow from other people in all directions. (All the time without things breaking.)

My goal is to eventually switch off gyp to ninja, and generate the ninja files directly using the code generation tools (gsl) we're using in ZeroMQ.

@hintjens hintjens closed this Feb 15, 2016
@gibfahn
Copy link
Member

gibfahn commented May 19, 2016

@bnoordhuis Could this be merged in? I understand it needs some work, but I'd really like to see this go in. I'm happy to polish it up if necessary.

@bnoordhuis
Copy link
Member

@gibm Sure, if you're willing to adopt this, just file a new PR with the requested changes.

gibfahn added a commit to gibfahn/node-gyp that referenced this pull request May 23, 2016
Continuation of nodejs#880. Documents options accepted by node-gyp.
gibfahn added a commit to gibfahn/node-gyp that referenced this pull request May 23, 2016
Continuation of nodejs#880. Documents options accepted by node-gyp.
gibfahn added a commit to gibfahn/node-gyp that referenced this pull request May 23, 2016
Documents options accepted by node-gyp. Continuation of nodejs#880.
gibfahn added a commit to gibfahn/node-gyp that referenced this pull request May 23, 2016
Documents options accepted by node-gyp.
Continuation of nodejs#880.
gibfahn added a commit to gibfahn/node-gyp that referenced this pull request May 24, 2016
Documents options accepted by node-gyp.
Continuation of nodejs#880.
gibfahn added a commit to gibfahn/node-gyp that referenced this pull request May 24, 2016
Documents options accepted by node-gyp.
Continuation of nodejs#880.
gibfahn added a commit to gibfahn/node-gyp that referenced this pull request May 24, 2016
Documents options accepted by node-gyp.
Continuation of nodejs#880.
gibfahn added a commit to gibfahn/node-gyp that referenced this pull request May 24, 2016
Documents options accepted by node-gyp.
Continuation of nodejs#880.
gibfahn added a commit to gibfahn/node-gyp that referenced this pull request May 24, 2016
Documents options accepted by node-gyp.
Continuation of nodejs#880.
gibfahn added a commit to gibfahn/node-gyp that referenced this pull request May 24, 2016
Documents options accepted by node-gyp.
Continuation of nodejs#880.
gibfahn added a commit to gibfahn/node-gyp that referenced this pull request May 24, 2016
Documents options accepted by node-gyp.
Continuation of nodejs#880.
gibfahn added a commit to gibfahn/node-gyp that referenced this pull request May 24, 2016
Documents options accepted by node-gyp.
Continuation of nodejs#880.
gibfahn added a commit to gibfahn/node-gyp that referenced this pull request May 31, 2016
Documents options accepted by node-gyp.
Continuation of nodejs#880.
bnoordhuis pushed a commit that referenced this pull request May 31, 2016
Documents options accepted by node-gyp.

PR-URL: #937
Refs: #880
Reviewed-By: Ben Noordhuis <[email protected]>
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.

5 participants