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

protobuf 0.8.6 is recompiled every time #25

Closed
alexfernandez opened this issue Mar 20, 2013 · 7 comments
Closed

protobuf 0.8.6 is recompiled every time #25

alexfernandez opened this issue Mar 20, 2013 · 7 comments

Comments

@alexfernandez
Copy link

Every time I run "npm install protobuf" it is recompiled. This does not happen with other packages, even those with native code. It makes our deployment process very slow. On Mac OS X, Ubuntu and Debian.

@chrisdew
Copy link
Owner

Hi, I'm confused as to why this makes your deployment process slow.

Are you running "npm install protobuf" more than once on each machine? If so, why do you need to do this?

Perhaps I haven't understood the issue here?

@alexfernandez
Copy link
Author

We need to run "npm install protobuf" multiple times on each machine, because our deployment process makes sure that all packages are installed before proceeding. It is quite convenient for us to have a single script that installs all npm dependencies, so that it is idempotent and it runs the same on new and on old machines.

This setup works well with all packages except for protobuf, which is compiled every time.

@chrisdew
Copy link
Owner

The current build system was contributed by @seishun - perhaps you could ask him whether he know why it recompiles on each install?

Unfortunately for most users this is likely to be an irrelevant issue - though I do see why it is annoying for you. Perhaps you could create and contribute a fix?

@chrisdew
Copy link
Owner

P.S. Build system was contributed here: a1205e7

Note: this page is huge and takes a minute or two to load on 10MBit broadband.

@alexfernandez
Copy link
Author

We already have a workaround in place: one script to install and another to update. It is a bit annoying, and the issue is likely to bite others in the future, but my current knowledge of the npm build system is more likely to cause damage than to solve anything. At least now the issue is documented.

@AdamMagaluk
Copy link

@alexfernandez What are your install scripts doing that the normal npm process doesn't. If I have a package that depends on protobuf I just put '"protobuf" : "~0.8.6" in dependencies object in package.json. Then run npm install, it will compile protobuf and download any other needed packages, any npm install calls later skip the compiling and installation of the already installed package.

@alexfernandez
Copy link
Author

@AdamMagaluk that is not our use case. Just run "npm install protobuf" from the command line. The output will look like:

$ npm install protobuf
npm http GET https://registry.npmjs.org/protobuf
npm http 304 https://registry.npmjs.org/protobuf

> protobuf@0.8.6 install /.../node_modules/protobuf
> node-gyp rebuild

and it will recompile all native code in the package every time.

On second inspection, apparently all native modules are recompiled every time, it is just that protobuf takes much, much longer than the rest. Closing issue. Thanks for your time!

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

No branches or pull requests

3 participants