Skip to content

1.6.0: node-rdkafka@2.2.1 rebuilt every time anything is installed #5680

Closed

Description

Do you want to request a feature or report a bug?
bug

What is the current behavior?
node-rdkafka@2.2.1 is rebuilt if installing five.

If the current behavior is a bug, please provide the steps to reproduce.
See below.

What is the expected behavior?
Installing five does not cause a rebuild of node-rdkafka.

Please mention your node.js, yarn and operating system version.

  • Node.js 8.9.4
  • yarn 1.6.0
  • Ubuntu 17.10

Description
This is a follow-up issue to #932. yarn 1.6.0 seem like a big step in the right direction! Thanks! I have one really odd case where the "native modules always rebuilt" problem still persists, though.

In short, if I install node-rdkafka@2.2.1 (that exact version) and then five (which depends on nothing and nothing depends on), node-rdkafka is rebuilt unnecessarily.

The strange thing is that if I install any later version of node-rdkafka, such as 2.3.2, everything works as expected (no rebuild)!

Steps to reproduce:

~/stuff  
❯ yarn cache clean -f
yarn cache v1.6.0
success Cleared cache.
Done in 0.03s.

~/stuff  
❯ mkdir tmp

~/stuff  
❯ cd tmp

~/stuff/tmp  
❯ echo '{"private":true}' > package.json

~/stuff/tmp  
❯ yarn add node-rdkafka@2.2.1
yarn add v1.6.0
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 3 new dependencies.
info Direct dependencies
└─ node-rdkafka@2.2.1
info All dependencies
├─ bindings@1.3.0
├─ nan@2.10.0
└─ node-rdkafka@2.2.1
Done in 40.62s.

~/stuff/tmp 40s  
❯ yarn add five
yarn add v1.6.0
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 1 new dependency.
info Direct dependencies
└─ five@0.8.0
info All dependencies
└─ five@0.8.0
Done in 39.06s.

~/stuff/tmp 39s  
❯ echo Kafka was rebuilt!

I've tried this on two different computers, one of which I had never installed node-rdkafka on before.

I apologize if this turns out not to be a problem with yarn after all. But considering the number of people interested in #932 I think it can be good to have an answer in this issue tracker that people might find. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions