nodejs/node-convergence-archive

[Converge] child_process argument type checking

Closed this issue · 6 comments

These commits add argument type checking to methods within child_process. This needs to be reconciled with the current io.js behavior. The change introduces a new throw so there's a potential API compatibility issue.
/cc @trevnorris

@piscisaureus I think these are the commits you said you didn't bring over. My primary involvement in this was to make the code actually match the docs in terms of what args were or were not optional. But that fell into a can of worms because some vocal users wanted very specific type checking on the args. Which isn't a bad thing, but with four args, most optional, it gets a bit hairy. I leave it to you all to decide what to do about this.

And note that the originally claimed "API incompatiblity" was a LACK of a throw...

I think at least the tests should be ported over, since they demonstrate the very wide variety of calling conventions that are possible... what the correct behaviour should be for each one can then be discussed more readily.

@nodejs/tsc ... this may be one we need broader review on.

The changes look reasonable to me. If one of you turns this into a PR and cc's me, I'll sign off on it.

I'll be working on doing so

rvagg commented

now active @ nodejs/node#2515