gyp.js icon indicating copy to clipboard operation
gyp.js copied to clipboard

Use cases

Open ibc opened this issue 8 years ago • 10 comments

Given #9 it seems that this project needs to define its own targets. Here a suggested list:

  1. Be a replacement for Python gyp (currently bundled into node-gyp), so node-gyp would include gyp.js as dependency and Python would not be needed to build Node.js native addons.
  2. Be able to produce ninja projects from Node.js (not just tiled to Node.js native addons), for example bud.
  3. Be able to compile a newer version of Node.js from an older version of Node.js (?)

ibc avatar Jun 20 '16 08:06 ibc

Thank you for bringing it up, @ibc !

The bigger our goals - the longer it will take us to get there. Thus, I think that it may be a good idea to start small with node.js addons and node-gyp, and eventually come to the full support of all GYP features.

This doesn't mean that gyp.js won't be usable in its current form for the most of the projects though.

indutny avatar Jun 20 '16 21:06 indutny

Getting rid of the python dependency in node-gyp would make a lot of people happy campers

RangerMauve avatar Jun 20 '16 21:06 RangerMauve

Nice. I hope use-case 2 above will be implemented in the future, so I can replace Python gyp with gyp.js in my project :)

ibc avatar Jun 20 '16 21:06 ibc

4. Bootstrap and build any version of node without a node binary using Duktape + duktape bindings + C++ compiler.

kzc avatar Jun 20 '16 21:06 kzc

The way I see it compiling addons or Node itself are not that different, are they? Then there is the bootstraping issue.

saghul avatar Jun 22 '16 07:06 saghul

I wonder whether with gyp.js something like gyp_bud could be replaced by a pure JS API, so there is no even need to launch a child process to run gyp.js.

ibc avatar Jun 22 '16 10:06 ibc

@ibc yeah, this would be great. On other hand, embedding it in gypkg should be good too ;)

indutny avatar Jun 22 '16 17:06 indutny

Sorry for coming back to this issue with an off-topic question:

Given that there is no activity in this project and given that GYP does not receive support for Python 3, which is the expectation within the next 2 years? Python 2 will be deprecated in 2020. Why didn't Node move to gyp.js as the proper migration path? What should we expect those who also run projects that depend on GYP and don't want to also depend on Python 2 forever?

ibc avatar Nov 19 '18 00:11 ibc

The Node.js project is forking GYP, and the first item in the backlog is python3 support. We already landed it for node-gyp https://github.com/nodejs/node-gyp/pull/1335

You can follow the progress at https://github.com/refack/GYP which might soon move to the nodejs org.

BTW I do plan on integrating gyp.js into GYP to have it cross-runtime portable.

refack avatar Nov 19 '18 01:11 refack

Thanks for the update, @refack.

ibc avatar Nov 19 '18 12:11 ibc